Wrong rendered Object

Hi guys,

got a problem while displaying one of my selfmade objects. The picture below shows the  problem. As you can see the buildings faces close to the camera disappear.

First i thought this is because i had set no zbuffer and cullstate, but both are set. the model on the right of the building is an indication for that. It is rendered correctly. Setting both states directly to the buildings node doesnt change anything.

ZBufferState buf = display.getRenderer().createZBufferState();

      CullState cs = display.getRenderer().createCullState();

here is a picture rendered in blender. it shows how the building should look like.

Anyone got an idea?

Here are the .blend and the Orgre export files if someone wants to take a look at it.


set the near frustum of tha camera right. be aware the nearer it is the less precise is the z buffer in hughe distanes

The normals are flipped.

Try "cs.setCullFace(CullState.Face.Front);" instead of back.

Or just flip the normals in blender? :slight_smile:

Thanks for the answers,

I think the problem isnt related to the near frustrum. Because the building is rendered wrong even if the carmera is further away from the building.

setting  the cullstate to .Front didnt solve the problem entirely. Probably the problem is related to blender an the fliped normals, as you said.

But how can this be solved? pressing crtl+n and crtl+shift+n in editmode didnt work. do i need to flip every single face by hand? And why does this problem occur? am i doing something wrong while modeling? Im a bit surprised about that, because in blender the building is rendered correctly. Or at least, it seams to be rendered correctly.



As far as i know opengl use normals that are opposite to other standarts, at elast 3dsmax has a option to set the direction of normals globally.

Primitive attempt is to read in the ogrexml file and just invert all vectors that are normals.

I've solved the problem. sorry for that stupid question. I've just forgotten to update the renderstate of the rootNode within the "update" Method :slight_smile: