Model is inside out?

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
roninmagus
Posts: 91
Joined: Fri Oct 31, 2003 5:03 am

Model is inside out?

Post by roninmagus »

I have downloaded a model from 3dcafe, it is in 3ds format. Any idea why, when textured, the model appears to be "inside out?"

The textures seem to be applied to the inside of the model, and one side of the model cut away, like a cross-section.

I've scoured the material flags in the docs, thinking maybe the material was set wrong. I'm just adding it to the scene name using addAnimatedMeshSceneNode.
daveandrews.org - A Christian Programmer's Weblog | Dusty Engine - A Task Engine for Irrlicht
Unarekin
Posts: 60
Joined: Thu Apr 22, 2004 11:02 pm

Post by Unarekin »

Try something akin to:

scenemanager->getMeshManipulator->flipSurfaces(mesh);

the first time you load the mesh, and only the first time. Irr will only have a single copy of the mesh in memory at one time, and flipping the surfaces once will affect anything that uses that particular mesh, regardless of when it loads it.
dogzer

Post by dogzer »

Yes, this is also a very important matter when modelling characters/levels. Every triangle on an object has a normal.. it can go only 2 ways, back or foward, wich one's back or foward? that´s the modeller/coder's job to determine.
Guest

Post by Guest »

That got it. Thank you very much :)
Post Reply