2

I want to model a building and inside lights. But there are problems with the shadow... I attached two screenshots 1) how it should look like (rendered scene in blender) and 2) how it looks (exported to x3d, x3dom in browser).

The light is casting to all sides, not only through the open side of the cube...

how it should look like how it looks and I don't know why Thanks for any help, how to achieve the light casting out only one side...

Regards

Adriana

mikolaskova
  • 121
  • 6
  • I might be able to help if you provide the source code of the file – Traian Mar 11 '15 at 20:51
  • here it is: http://www.mikolaskova.cz/downloads/fensterraum.x3d – mikolaskova Mar 12 '15 at 10:11
  • well I get different behavior in the player that I use. The code seems to be correct so it's probably the player which is not rendering the scene as it should be supposed... – Traian Mar 14 '15 at 13:16

1 Answers1

1

I'm pretty sure I know the answer.

See, an object in blender has normals, where the sides are facing. You'll notice if you go inside the cube, and press play, the walls are invisible, but outside its not. You could bake the scene, but I have another way.

-Select the Cube
-Press Shift-D to duplicate
-Don't move the mouse, just click again
-Make sure there are 2 copies of the cube
-With One copy selected, press Tab to go into edit mode
-Press W to flip normals

Now you should have 2 copies of the same object, one with normals flipped. This should work unless you have another problem or setting. Try it in a new blender file with the same BGE settings as yours.

Hope this helped, Flygamer101

Kataware
  • 167
  • 2
  • 5
  • 11
  • I may have put how to flip normals wrong, if so and pressing w doesn't flip normals, look it up – Kataware Mar 15 '15 at 16:06
  • 1
    Thanks, but I didn't have wrong normals. It was another problem: The object was too small for the lightprojection frustum. I scaled and it worked well: https://github.com/x3dom/x3dom/issues/477 – mikolaskova Mar 15 '15 at 19:16