- Home /
Unity creates triangles and then lights them up wrong
Although I've already had a similar question where Sketchup ended up being the culprit, after learning to use Blender, the problem persists.
Simple cube (mesh, no textures) in Blender
What it looks like when I import the .blend file into Unity
How those unnecessary triangles are being lit up
Why does this happen?
(I just found out that the weird lighting does not happen in a newly created project with the same exact cube, but I would like to find what I could have done wrong with the lighting system in my existing project to rescue it)
Answer by Owen-Reynolds · Jun 05, 2014 at 10:47 PM
Modelling problem. The bottom picture looks like smooth shading -- Blender told Unity that the "cube" is the world's worst rounded sphere, and Unity is trying to shade it that way.
In Blender, I think you can set all edges to creases (and I think the texture seams may count as creases.) Or, just grab each face and Split (a crease will Split during the export.) See how the standard Unity cube has 24 verts? That isn't them being sloppy. Each face needs to own it's 4 corners, for flat shading.
And, not to be mean, just to be clear, 100% percent problem with the model you made. Ask any 3D game modeler who has never used Unity, and they'll see it's a smooth vs. flat shading issue. Modelling is a tricky skill, and you'll probably be making rookie mistakes for months, and longer.
Thanks for the information, but I am not getting the hang of this. I have marked the edges as seams to no improvement, then set the crease value to 1 for all vertices to no improvement, and finally split all faces, still no improvement.
The only change inside Unity now is that the cube rotates around the same axis on Y and Z, which also means that I've lost rotation around one of the "actual" axis, which is weird.
I've attached what I've done to the cube, can you check to see if you can decypher what's wrong with it? download
One more thing, sorry, because I may have misunderstood your previous answer completely. Did you actually mean to say that this will only fix the lighting problem, but the extra diagonal vertices should stay there nevertheless? Because I have only just noticed that Unity adds the diagonal vertices to its own cubes as well when added via the GameObject > Create method.
There is a diagonal edge, and all 3D models work that way. Squares are really two triangles. It's a lighting problem, since if both triangles were lit the same, the faces would look square.
I feel like, in your mental list of tasks, after "learn simple modeling," you might have "1 week," when "a few months" is the answer for most people. That might make you feel better about looking up creases vs. seams, verts, normals, polys vs. tris, game vs. movie modeling, the pile of redundant Blender settings... . Or, as many others do, decide only to import other people's models.
The option you're looking for in Blender is "Shade Flat".
Enter edit mode on your cube, select all vertices, W -> Shade Flat
Your answer
Follow this Question
Related Questions
Why does Unity set imported mesh/animation scale to 0.01? 8 Answers
(C4d R 10.5) Importing in Unity one mesh with multiple materials problem. 0 Answers
turning import renderer off 1 Answer
Do I need a program like Blender3D or 3DSMAX to create objects and characters? 2 Answers
Replacing skinned mesh prefab problem 0 Answers