how to load .3ds files

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
Ultimate_fusion
Posts: 4
Joined: Sat May 20, 2006 7:28 pm

how to load .3ds files

Post by Ultimate_fusion »

I used the tutorial to load the sydney.md2 file fine with the texture.
I replaced the .md2 file with a 3ds max model (.3ds) which the model loaded was all white.

I think the .3ds file has a texture inbuilt, so how do I load these files completely.

thanks for looking
UF
ASPamd87
Posts: 6
Joined: Fri May 19, 2006 10:15 pm

Post by ASPamd87 »

So far as i know the .3Ds file hasen´t the textures included, just the Path and the settings of the textures...
In my Opinion, irrlicht will just find the textures, if they in the same Folder or .zip file like your .3Ds file!

Or try: node->setMaterialTexture/getTexture like in the Tutorials...

And last: Search the Forum!

Sorry for my bad English :-)
hybrid
Admin
Posts: 14143
Joined: Wed Apr 19, 2006 9:20 pm
Location: Oldenburg(Oldb), Germany
Contact:

Post by hybrid »

Yes, indeed if your mesh was correctly textures (uvmapped) the loader should at least try to load the texture. If it does not find the file it will issue a warning to the console. Just read it there and post it if you don't understand what it tells you.
If you do not have textures, but still want to have colors in 3ds files you'll have to patch Irrlicht and recompile it. Patch file found on my web page.
Ultimate_fusion
Posts: 4
Joined: Sat May 20, 2006 7:28 pm

Post by Ultimate_fusion »

I have got the textures to load, but now I have 3 animations I want to put in.
idle, walk, run.

On all 3 of the models on still.

scene::IAnimatedMeshSceneNode* anms = smgr->addAnimatedMeshSceneNode(smgr->getMesh("../../media/run.3ds"));

this is what I use to load it.
hybrid
Admin
Posts: 14143
Joined: Wed Apr 19, 2006 9:20 pm
Location: Oldenburg(Oldb), Germany
Contact:

Post by hybrid »

No animation support in 3ds files. Use directx, md2 or milkshape for that.
cr_itm
Posts: 57
Joined: Sun May 01, 2005 10:13 am

Post by cr_itm »

Hello,

this topic fits well for my problem. I also try to load an animated mesh file. The syndey.md2 file works well. then I created my own animation and converted it to a .x file. I have a viewer that play that .x animation, but when I try to get it working in Irrlicht, the model sits just there and does nothing, here is my code:

Code: Select all

IAnimatedMesh mesh = scene.getMesh("c:/temp/sydney.x");
IAnimatedMeshSceneNode node = scene.addAnimatedMeshSceneNode(mesh);

node.setFrameLoop(0, 30);
node.setAnimationSpeed( 30 );

node.setMaterialFlag( E_MATERIAL_FLAG.EMF_LIGHTING, false );

(it's java syntax, because Im using Jirr, this should be not the problem understanding what Im doing).


Does anyone has an idea why my model (.x) is not animated in the scene (I checked, that the .x file is correct and has an animation)?

Thanks a lot
Post Reply