Importing models for a game

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
Listing
Posts: 12
Joined: Wed Jan 28, 2009 9:30 am

Importing models for a game

Post by Listing »

Hi I am trying to import a model I made in Cinema4d since
several hours but it doesn't seem to work.

Currently I do

Code: Select all

scene::IAnimatedMeshSceneNode* anms =
		smgr->addAnimatedMeshSceneNode(smgr->getMesh("../../media/aplogo.3ds"));
I also tried adding it as a ".x" or a ".obj" file. The mesh of the file is properly added but the object is completely black...
I cannot get it to load the material I added to it. I also tried

Code: Select all

anms->setMaterialTexture(0, driver->getTexture("../../media/aplogo.obj")
But it doesn't work.

I would appreciate any help!
Malgodur
Posts: 195
Joined: Sun Mar 15, 2009 8:22 pm

Post by Malgodur »

Use the brain, luke!! Or documentation! Typical problem, you havent any light in scene so meshs DARK! write something like mesh->setmaterialflag(irr::lightingm, false) ( idont remember how to spell it)
DeM0nFiRe
Posts: 117
Joined: Thu Oct 16, 2008 11:59 pm

Post by DeM0nFiRe »

Your scene node is not being lighted, so it is appearing as completely dark (black)

Either add a light to your scene or do:

Code: Select all

ansm->setMaterialFlag(video::EMF_LIGHTING, false);
Listing
Posts: 12
Joined: Wed Jan 28, 2009 9:30 am

Post by Listing »

It works, thanks
Post Reply