Wrong normals of 3d-Models?

You are an experienced programmer and have a problem with the engine, shaders, or advanced effects? Here you'll get answers.
No questions about C++ programming or topics which are answered in the tutorials!
Post Reply
Kuzy
Posts: 21
Joined: Fri Feb 18, 2011 10:30 am

Wrong normals of 3d-Models?

Post by Kuzy »

Hello experts,

I want to use some models and it seems to be that irrlicht doesn't use the right normals to display them.
This is how Blender shows my forklifter-model:
Image

And this is how irrlicht displays it:
Image

When I turn it, I can see the back-faces of the missing areas.
It is originally an 3ds-file. In this format even more disappears in irrlicht. So I converted it to an obj-file (which is what you see on the pictures).

Does anybody have a clue to solve this?

Thanks in advance
Kuzy
Mel
Competition winner
Posts: 2292
Joined: Wed May 07, 2008 11:40 am
Location: Granada, Spain

Re: Wrong normals of 3d-Models?

Post by Mel »

Disable the backface culling of the materials, or recalculate the normals using the mesh manipulator of the scene manager. Also, make sure that when you export the model, you export the proper normals.
"There is nothing truly useless, it always serves as a bad example". Arthur A. Schmitt
hybrid
Admin
Posts: 14143
Joined: Wed Apr 19, 2006 9:20 pm
Location: Oldenburg(Oldb), Germany
Contact:

Re: Wrong normals of 3d-Models?

Post by hybrid »

Normals are only used for lighting, so missing faces are usually due to a wrong winding order of the indices. Disabling backface culling would be indeed the best option, besides changing the export settings. Note, though, that in the original model, the normals could be a reason why the exporter chose this winding order instead of the other - during modeling the normals are often used for the orientation of faces.
Kuzy
Posts: 21
Joined: Fri Feb 18, 2011 10:30 am

Re: Wrong normals of 3d-Models?

Post by Kuzy »

Thanks Hybrid and Mel,

turning off the backface culling solved it.
I will check out how to manage turning the winding in Blender, but that seems to be a lot of detail work...
Post Reply