Page 1 of 1

Blender/Model or Irrlicht/Code error

Posted: Mon Nov 19, 2007 8:37 pm
by simo
Blender/Model or Irrlicht/Code error

I use Blender 2.45 to modeling my own flat and Irrlich.net (C#).
I used simple plane with extrude option I made walls and hole for windows.
Then I loaded model as a IAnimatedMesh and all works ok. I can show it with all walls.
When I was try to add UV texture in Blender (UV FACE SELECT mode) it doesn’t represents all faces of plane. In Blender I show faces if set twoside button on Texture face. If then I try to load model in Irrlicht, front faces dissapear and model seems hollow (You may see picture on http://blenderartists.org/forum/attachm ... 1195583181).

I use following code:

Code: Select all

IAnimatedMesh flat = device.SceneManager.GetMesh("flat.3ds");
ITexture walls = device.VideoDriver.GetTexture("walls.jpg");
ISceneNode node = device.SceneManager.AddAnimatedMeshSceneNode(flat, null, -1);
node.SetMaterialTexture(0, walls);
node.SetMaterialFlag(MaterialFlag.LIGHTING, false);
Is error in model or I something missed in code?

All suggestion are welcome.

Thanks in advance.

Posted: Wed Nov 21, 2007 3:37 pm
by hindupower
try using "setMaterialFlag(BACK_FACE_CULLING,false);".

Posted: Wed Nov 21, 2007 6:44 pm
by simo
That's it!

Thank you!