- Home /
Same material renders differently on a mesh generated from script and normal cubes.
http://gyazo.com/5f2c0f057f9ecea46318336bf8addc1a
I think I have exactly same settings but for some reason the texture is not rendered correctly in the script generated object on the right side. It looks like some issue with Normal texture mapping. What could be wrong with it? Am I using UV mapping or something wrong.
Is RecalculateNormals() called on the mesh after generating it?
Nope. That might be it :) Can't try it out just now but thanks
Yes your answer was correct. If you'd like you can submit your comment as answer and I accept it as correct. Thanks a lot!
Answer by zach-r-d · Jul 18, 2015 at 10:38 PM
Try calling RecalculateNormals() on the mesh after generating it; when the normals on a mesh are not set, they will be pointed in an arbitrary direction or perhaps even zero, which will adversely affect lighting.
Your answer
Follow this Question
Related Questions
Assigning UV Map to model at runtime 0 Answers
Strange issue with generated mesh 2 Answers
issues with mobile build 0 Answers
A way to "fold" a texture on a mesh? 1 Answer