Game engine - mesh sorting problem 2.61


I’m currently working on a maze game in Blender 2.61. The problem: Blender’s mesh sorting appears to be completely random.

Here is the model view, it looks absolutely normal. F12 render works just fine also.

And here is the in-game view.

Have you ever met this problem? Any help will be appreciated.



maze.blend (429 KB)

Enter Edit mode.
Press A to select all vertices
Press CTRL + N to recalculate the normal vectors
Exit Edit mode
Play game.
Report your findings.

Thanks for the response!

I’ve tried it before… I tried it now, too. Neither helped.

Make sure you don’t have transparency enabled on the material/Texface Settings.

It is a texture, not a material; transparency is disabled.

I’ve had this exact same problem: a level I was working on was fine for ages, then one day the mesh sorting went all random. Looked fine in the view port, and when rendered, but as soon as I ran the game engine some meshes would appear in front of others even though they shouldn’t be. No transparency, normals facing the right way, I had made no changes to the meshes or textures when it started doing it. Never found a solution. Had to start again. :frowning:

You could try appending the scene into a new blend file. Do you get the same problem in GLSL mode?

Yeah, I got it in both modes and the models where already appended from another .blend.

Have you tried deleting the faces and recreating them (Select Face, X, F to fill)? Also enable normal preview (Object Data…)

It’s not the normals, that was my first thought too. But they’re all the right way round, I’ve also tried recalculating them and flipping them. My problem is exactly like Matt383’s, certain faces appearing in front of other faces/meshes that they shouldn’t. And like Matt383 I’m using a UV mapped texture rather than materials.

Deleting the face and rebuilding it solves the issue, but it was quicker just to rebuild the entire low poly mesh from the original high poly one. It might be a bug, but I can’t replicate it because I don’t know what caused it in the first place.

From what I see I guess it is a transparency problem. Sorting takes place with semi-transparency (Alpha-sort/Alpha-blend) only.
I do not think it is an normal issue, as you would see the inside of the cubes.

I downloaded the demo file.
(it is missing the textures)

I loaded my own texture and I do not see the described problems. I noticed the game objects do not have a material. This can lead to render problems (game render indeed).

Sorry I can’t help more with this.