faces dissapear in ogre

The place for artists, modellers, level designers et al to discuss their approaches for creating content for OGRE.
Post Reply
sterra
Gnoblar
Posts: 14
Joined: Thu Jun 02, 2005 4:26 pm

faces dissapear in ogre

Post by sterra »

I've been working with a model that I am exporting from blender to ogre. The problem with it seems to be that faces on the model dissapear when viewed in ogre.

http://img146.imageshack.us/my.php?imag ... ony5vw.jpg
See for image.

I can reimport the image to blender and see it fine so it isn't a problem with that. I am guessing that it is just a problem with the model I made, but I don't really know.
User avatar
xavier
OGRE Retired Moderator
OGRE Retired Moderator
Posts: 9481
Joined: Fri Feb 18, 2005 2:03 am
Location: Dublin, CA, US
x 22

Post by xavier »

Check your mesh to make sure double-sided polygons are OFF (do this in Edit mode). Ogre does not support them (at least not easily).

When you turn them off and look at your mesh in Edit mode using solid shading, you'll see which normals need to be flipped (SHIFT R to select the faces, and W 9 to flip the normals). You can also Select All (with A) to select all the faces and do "Recalculate Normals Outside" (CTRL N) and that should get you most of the way home, if not correct it all the way (depends on how concave your mesh is).

HTH
fp12
Halfling
Posts: 99
Joined: Sat Jul 09, 2005 12:11 am
Location: Nantes - France
Contact:

Post by fp12 »

In Blender, you can also use the Two-Sided option (http://cvs.sourceforge.net/viewcvs.py/* ... index.html)
reimpell
OGRE Contributor
OGRE Contributor
Posts: 570
Joined: Mon Mar 01, 2004 10:35 am
Location: Hamburg, Germany

Post by reimpell »

I just added a FAQ entry
Wiki wrote:Q. Why are some of the faces not visible in Ogre although I can see them in Blender?
to the "Tools: Blender" wiki page although searching for "blender face" would have revealed the answer already.
fp12
Halfling
Posts: 99
Joined: Sat Jul 09, 2005 12:11 am
Location: Nantes - France
Contact:

Post by fp12 »

hehe, that's a good thing reimpell ;)
I remember asking you quite the same thing :P
User avatar
xavier
OGRE Retired Moderator
OGRE Retired Moderator
Posts: 9481
Joined: Fri Feb 18, 2005 2:03 am
Location: Dublin, CA, US
x 22

Post by xavier »

fp12 wrote:In Blender, you can also use the Two-Sided option (http://cvs.sourceforge.net/viewcvs.py/* ... index.html)
No, he has that ON in Blender, and that's why his model is missing faces in Ogre. Ogre does not understand two-sided polygons (because neither Direct3D nor OpenGL deal with them); you have to define the one-way normals correctly in Blender before exporting.
User avatar
xavier
OGRE Retired Moderator
OGRE Retired Moderator
Posts: 9481
Joined: Fri Feb 18, 2005 2:03 am
Location: Dublin, CA, US
x 22

Post by xavier »

reimpell wrote:although searching for "blender face" would have revealed the answer already.
That's not really an intuitive search phrase. ;)
reimpell
OGRE Contributor
OGRE Contributor
Posts: 570
Joined: Mon Mar 01, 2004 10:35 am
Location: Hamburg, Germany

Post by reimpell »

xavier wrote:
fp12 wrote:In Blender, you can also use the Two-Sided option (http://cvs.sourceforge.net/viewcvs.py/* ... index.html)
No, he has that ON in Blender, and that's why his model is missing faces in Ogre. Ogre does not understand two-sided polygons (because neither Direct3D nor OpenGL deal with them); you have to define the one-way normals correctly in Blender before exporting.
Blender's "Two Sided" face option is different from Blender's "Double Sided" mesh option. A "Two Sided" face will get exported with hardware and software culling set to none in the corresponding material. Both sides of such a face are rendered in Ogre, but the normal is only in one direction, which may lead to lighting problems on the back face.
User avatar
xavier
OGRE Retired Moderator
OGRE Retired Moderator
Posts: 9481
Joined: Fri Feb 18, 2005 2:03 am
Location: Dublin, CA, US
x 22

Post by xavier »

Gotcha.
sterra
Gnoblar
Posts: 14
Joined: Thu Jun 02, 2005 4:26 pm

Post by sterra »

xavier wrote:In Blender, you can also use the Two-Sided
No, she has that ON in Blender.
Ironically I did actually use that search phrase. I just didn't look carefully through the links enough.

Thanks everbody for the help.
Post Reply