Blender/Model or Irrlicht/Code error

Irrlicht.Net is no longer developed or supported, Irrlicht.Net Cross Platform is a much more complete wrapper. Please ask your C# related questions on their forums first.
Locked
simo
Posts: 0
Joined: Mon Nov 19, 2007 8:30 pm

Blender/Model or Irrlicht/Code error

Post 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.
hindupower
Posts: 15
Joined: Thu Sep 27, 2007 7:49 pm

Post by hindupower »

try using "setMaterialFlag(BACK_FACE_CULLING,false);".
simo
Posts: 0
Joined: Mon Nov 19, 2007 8:30 pm

Post by simo »

That's it!

Thank you!
Locked