Game engine lighting and mesh issues

I’ve modelled a car, using lamps for lights. When I render the model, it shows up fine - exactly as I want it to, but when I run the game engine, parts of the mesh are invisible and the lights do something funny.

Any ideas? Probably a rookie mistake… :o

Thanks,

James

Sounds like a normals issue. Select the mesh, go into edit mode and press ctrl+n and select “Recalculate Normals Outside.” The BGE makes use of backface culling to help improve performance. This means it only renders front facing faces. The face’s normal is used to figure out if it’s front facing or back facing. So, if you get random holes in you’re geometry when in game, it’s most likely a normals issue.

If that doesn’t solve it, a picture would be helpful.

Thanks so much for that, I’ve been at it all day and have recalculated the normals countless times - but never on that area of the model.
I had also never properly understood how the normals were important. Does this mean I can make the inside of my car show by extending the mesh back on itself? That would also explain why the lamps aren’t working.

Hey, sorry to double post and be a pain, but for some reason the windows which should be transparent aren’t, as well as a few other irregularities. I’ve attached my .blend file, any chance you could take a look?

http://www.filefactory.com/file/b2heb1g/n/golf3.blend

The normals are important, because they are important for the efficiency of the render process.
Usually only the front of a face is visible (think of a cube). That means around 50% of all faces will fall out of the render process because they are facing away from the camera.

You need to keep this in mind when you model.

  • You always model the surface of an object.
  • You need to close the object, except on places where you are sure it is never seen by the camera.

But if you really need you can also switch on two-side. With the prize to loose the optimization. Even when you do this the normals should point into the same direction. Otherwise the shading might go wrong. Because shading is often normal based. This happens alot when smoothing is enabled.

If the faces are not transparent, you most likely didn’t switched on alpha in edit mode (<F9> texture face panel - will only be visible after unwrapping <u>).
Enable alpha ONLY on faces that are transparent, the render costs for that is higher then opaque faces without alpha.

Thanks so much for that explanation, Monster - I’ve had a look at my model, but I think I’ve got to start again with it. Probably for the best, I’d accidentally mixed quads and triangles and it wasn’t too pretty. With this newfound knowledge, hopefully it’ll work next time :wink: