how to laod this .3ds

If you are a new Irrlicht Engine user, and have a newbie-question, this is the forum for you. You may also post general programming questions here.
Post Reply
HashLing
Posts: 7
Joined: Fri Oct 21, 2005 10:23 pm
Location: south africa

how to laod this .3ds

Post by HashLing »

Hi,
Please note that i am brand new to irrlicht and also learning the principles of 3d as i go on....

I created a .3ds with balls in it to simulate it as planets. Quite a big file. but i don't know how or as what to import it in to irrlicht. i have a space ship flying. i want these "planets" to load sothat i can fly to and from them.

I don't know if i should load them as a node or a terrain???
I have a mesh

IAnimatedMesh* mesh = smgr->getMesh("planets.3ds");

and tried to load it as a node
ISceneNode* node = smgr->addAnimatedMeshSceneNode(mesh)

when i compile like this nothing is shown, as soon as i do anything with the node then the programs crashes....

Please help!!!!
JP
Posts: 4526
Joined: Tue Sep 13, 2005 2:56 pm
Location: UK
Contact:

Post by JP »

turn off the lighting on the node, otherwise they will just show up black, and hence you might not be able to see them if your background is black also.

node->setMaterialFlag(E_MATERIAL_FLAG.EMF_LIGHTING, false);

That might not help you much but it's all i can think of that would be causing problems.. see if it helps at all
Image Image Image
The Real Jack

Post by The Real Jack »

You might also want to create a camera if you didnt already.
JP
Posts: 4526
Joined: Tue Sep 13, 2005 2:56 pm
Location: UK
Contact:

Post by JP »

:lol: that would certainly be useful.

Are you trying to build your own class from scratch? What would be best would be to use the HelloWorld test class and just change the sydney model to your model.
Image Image Image
bearSoft
Posts: 165
Joined: Fri Apr 01, 2005 9:55 pm
Location: Denmark

Post by bearSoft »

be best would be to use the HelloWorld test class
or perhaps the tutorial 8 'FX'
in that tutorial a 3ds mesh is used and it should be as simple as changing the filename to ur own
DO remember that the path must be correct!
eg -place ur own 3ds file in the same folder (media) as the tutorials uses for models.
Regards.
Tech: win98se| 320mb ram| abitbe6| 433mhzceleron| atiRadeon7000.64mb| soundblaster125| dx9.0b | devCPP | IRR 0.12.0 |
HashLing
Posts: 7
Joined: Fri Oct 21, 2005 10:23 pm
Location: south africa

Post by HashLing »

Okay.... The lightning i didn't do.... I only saw that in the sydney example. Then the planet thingys i created was way to small to be noticed on the black screen when i eventually got it displayed, i literally hat to enlarge them .

What made my program crash was also solved as soon as i started to test everything in if (xxx) statements.

The .3ds was in my folder but had a space abefore the dot. so all that is solved and now my planets are visible.


THANX ALOT!

Now i need to figure out how movements work.... i will look in the forums for movement without and FPS camera..... cause i seem to struggle when the node gets rotated then my Y tilts snode.setRotation(vector3df(0,1.0F,0)) a certain degrees and i don't know how to make things move in that new Y direction...
Athlon_Jedi
Posts: 156
Joined: Wed Jul 21, 2004 4:29 am
Location: Mishawaka, In

scale in irrlicht NOT 3ds max

Post by Athlon_Jedi »

one useful function for making things of usful size is :

Code: Select all


mynode->setScale(core::vector3df(x,y,z));



mynode = whatever you named the node.

(x,y,z) = the x y and z coodenance you want to scale.

this is alot easyer than going back into your modeling package and adjusting the size.

a better example is in the special fx tutorial
HashLing
Posts: 7
Joined: Fri Oct 21, 2005 10:23 pm
Location: south africa

Post by HashLing »

I stumbled upon that after i enlarged everything. ThanX I take that it translates it to 1.0f being one times larger and 3.5f being 3 and a half times larger than the original?
Post Reply