Mesh lighting discrepancy

I’ve recently upgraded to Unity Pro 3.1 with iPhone. I’m trying to figure out some issues I’m finding with how lighting is working with shaders. The issue I’m having is that the default diffuse/detail shader for mobile doesn’t behave the way I would expect it to, and behaves differently from the way it did in the previous version of Unity.

As a test I implemented the scene picture in the attachment. On the right, I have a cube with a Material using the standard mobile diffuse/detail shader. On the left is a torus with the same Material and shader. There is one directional light in the scene, positioned above the objects. The objects are basically adjacent to each other in the scene

If I rotate the cube, I get what I would expect in terms of seeing the light play off of the various faces of the cube depending on how they face in relationship to the light.

If I rotate the torus, the behavior doesn’t make sense to me. If it is oriented in one direction, it is fully illuminated. If I rotate it 180 degrees around the x axis, it it totally dark. The light is uniform across the entire surface despite the face that it is rotating in various ways.

Any ideas why I might be seeing this behavior?

Thanks in advance!

455829--15960--$Screen shot 2010-12-19 at 2.41.29 PM.png

How are its normals calculated? Sounds like a problem with corrupted normals to me.

Thanks so much for this suggestion! It prompted me to look more closely at the settings where I’m importing the torus model as a .fbx. Under ‘Normals Tangents’ it was set to ‘calculate’ by default on both. I set these to ‘Import’ and after reimporting, it looks great.

Thanks again!!

Sure. I’m not sure why Unity wasn’t calculating them correctly, but I’m glad that you fixed it. I did take a look at the shader, and it does exactly what it’s intended to do.