Take the 2-minute tour ×
Game Development Stack Exchange is a question and answer site for professional and independent game developers. It's 100% free, no registration required.

I have been trying to render a "room" with some basic functions and I found some "bugs".

So at first I have made a "room" out of 6 planes in blender and gave each of them a diffrent color.

Blender room

Afterwards I rendered it using Irrlicht and here is the first resault :

First resault

But if I go around the room to see the other sides they start to dissapear:

First Dissapear Second Dissapear

At first, I though it may be due to the fact that i was "too close" or "too far" from the object, or that the object was "too small" but I have tested all those and got the same resault.

So I guess the problem comes from the way I import and load in the mesh, but I couldn't find a way to solve it.

Here is the code for importing the mesh / rendering it :

IAnimatedMesh* mesh2 = smgr->getMesh("Sky.obj");
ISceneNode* node2 = 0;

if(mesh2)
{
    node2 = smgr->addOctreeSceneNode(mesh2->getMesh(0), 0, -1, 1024);
    //node2 = smgr->addMeshSceneNode(mesh2->getMesh(0));
    node2->setMaterialFlag(EMF_LIGHTING,false);
}

I would like to know why this happens and how to solve it.

share|improve this question

2 Answers 2

up vote 2 down vote accepted

It is probably better to make the room with a cube thinned to the size of the walls, as a plane is only showing one sided, where as a cube shows both sides, (as well as top bottom left and right which can be textured black for faster rendering). A plane is just not right for a room unless you are only going to view room from inside, then you have to flip the normals in edit mode in blender.

Or as in previous post The button you are looking for is now called "BackFace Culling" in the materials menu under Game Settings.

OR see this link http://www.blender.org/forum/viewtopic.php?t=21544&highlight=double+side

share|improve this answer
    
Thnx for the complete answere :) It works xD Even tho I still didn't found the BackFace Culling button ( I might be blind ) Flipping the normals did wonders, And Yes I am working in a game in which the room will be viewed from inside. –  user1640736 May 1 '13 at 11:20

This is most likely a normal problem. Since the planes in Blender are not connected (they're just standalone planes, i.e. not connected) Blender can't calculate the normals. You can check if this problem exists in Blender as well by selecting Backface culling in the properties panel in the 3d view (n key).

share|improve this answer
    
That or he changes the state of what to cull. –  Cristina Apr 29 '13 at 11:40
    
Went into blender, checked textured Solid and I saw the same problem :D, could you also tell me how to fix this? and why can't it calculate normals? –  user1640736 Apr 29 '13 at 12:24
    
It's Backface culling, not Textured Solid. (I have no idea what Textured Solid does.) Blender can't calculate normals because it doesn't know which direction you'll be looking at the planes; you can click the corner icon in the Mesh display section (Normals visualization) in the Properties panel to show your normals. To change your normals, select the plane you want to flip and select w menu > Flip Normals. –  Forest Ka Apr 30 '13 at 17:17

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.