Weird z-depth issues

I have a basic game map I’m working on. I some of the basic models made and textured. When i look in the viewport everything looks great.



but when I go into camera view it inverts the z-depth and flips my entire scene backwards.


i’ve been searching through all sorts of camera settings and I even deleted the default camera and added a new one. nothing changed. Anyone have any idea how to fix this?

I was able to reproduce this affect by flipping the camera along the X axis. That might be the problem, hope that helps :slight_smile:

I have found that you must have a solidify modifier on for some random reason or other…it get’s quite annoying though…
I don’t know what Spike1 means by “flip” the camera, but it doesn’t sound like the answer. happe blending :slight_smile:

the solidify modifier just makes walls thicker and such, I dont think that would fix it :slight_smile: (Although it might pretend to. The reasons faces disappear when looking at them from different angles is because of Backface culling, as in when you look at a face from behind it won’t be rendered. You can turn that off in the material settings. The solidify modifier would practically duplicate the faces of the model but with inverted normals, so you would see the model from both sides. Its sort of a fix, but adds many vertexes and won’t fix the horizontal flipping problem) :). If you want the walls to appear without really fixing the problem you can just turn off backface culling. If you want to properly fix the problem though, it would be to do with the cameras scale. Just try setting the transform orientation to local(Its normally Global and can be found right next to the layers), then press S, then press x twice, then press -1. Hope that fixes the problem :slight_smile:

hmm…interesting…Actually never heard of Backsurface Culling… So why don’t you just invert the face normals? So you’re saying that the scale of the camera matters? (At least that’s what I though of when I read your last sentence) I googled up “culling” and I don’t think I understand it :confused: I mean, if he’s making a game then he won’t be adding lots a verts because games don’t like high-poly objects in them. What version is this culling option in?

As an optimization technique, blender only renders the faces of a model that you are facing. For example, when you are looking at a cube, you can only ever see some of the sides. The sides that are facing away from the camera(Which are concealed by other faces) will then not be rendered. To check if the camera should see the face blender uses the normals. One way to fix this is to duplicate all the faces then invert the normals, so that whenever the face is looking at the different faces it can always see the backfaces. The other way is to disable Backface Culling in the material options(Think this only works for glsl, though I could be wrong). This is prone to having funny lighting calculations though, but I think that was fixed recently :D.

Anyway, yes I do think that the camera scaling matters. You can see yourself actually. Try loading up the default blender cube scene. Change the Scaling orientation to Local(Normally its global, can be found near the Layers), then then press S, then press x twice, then press -1. You’ll see that the cubes lighting has gone a bit funny. If you then enable backface culling in the viewport(In the Shading part of the panel that comes up when you press N, it will go dark, because you are looking through the faces to the inside of the cube due to a strange inverted Zdepth bug. This only happens with negative scaling though. I’ll post a blend file in a sec actually, brb :smiley:

BTW:
If anything in here is wrong please correct me BGE masters :smiley:

Tried out your suggestion, worked like a charm! thanks.