vertices in models flipping at runtime

I am having a problem where a few instances of a mesh are getting flipped inside out when the game is run in Unity and in the build!
In the editor, the models are shown right-side-out the entire time. Other instances of the mesh in the same scene are not having this problem at all and they share the same material.
What could be going on here?
I have tried various things to fix it, including restarting Unity, changes the mesh instances’ parent object and making a new material for the problem instances of the mesh but nothing seems to fix it.

From a 3D artist point of view…

I know that in a 3D editor like 3DSMax I would apply a normal modifier to the offending mesh to correct this then collapse the stack back down to editable mesh.

Or use Unify Normals if in Edit Mesh to correct the problem.

If it still causes problems then I would run an STL check on the mesh to see if there were any open edges or double faces.

If thats all ok then I wouldn’t know where to look in Unity either. Maybe there is backface culling going on?

Good luck
Geoff

It turns out this is related to using Combine Children but it is really odd. In one level two instances of a mesh get reversed if kept in the object that has the CombineChildren script on it. Again, there are other instances of the same mesh with the same material on it that work fine. It is just those two that won’t behave. In another level there were five naughty instances of the mesh. So I was able to get things working but it means more drawcalls and is really weird.

Yeah, it is the combine children doing the flipping. I had the same problem yesterday, and after some testing, I found that combine children has some problems with objects which are scaled negative. So, if you have some objects with negative values in its scale transforms, stuff goes wrong…
I bet you will find that is your problem :slight_smile:

Wow! That was my problem! I thought aliens had taken over my computer or something. Thanks for the great pointer!

Aliens HAS taken over most of our computers, but in this case they are not to blame…

Hmm. Maybe I can get them to do my work for me - at least the more trying parts…