- Home /
Shadow artifects on mesh with Standard shader
Hey,
I'm seeing unusual shadows on my mesh. The mesh is generated by code. Here you can see how it looks very tily, i highlighted them with a yellow arrow, to the right you can see an example mesh.
And here you can see what this does in runtime:
Any ideas on how to fix this? Or make it look better?
Best,
Erik
Answer by Erik-Sombroek · Jan 20, 2016 at 03:41 PM
Hi,
I kind of figured out what was going on. I build my mesh the wrong way. I assumed a Cube had 8 vertexes, sharing the vertexes where the faces connect, but the primitive Cube in Unity has 24. Each face has its own 4 vertexes. The following wiki helped me to construct the new mesh http://wiki.unity3d.com/index.php/ProceduralPrimitives
Hope this might help someone that faces the same problem.
Best
Your answer
Follow this Question
Related Questions
What is wrong with this mesh editing code? 0 Answers
Editor lags when coming out of play mode...? 0 Answers
How do I calculate the UV's for a procedurally generated shape? 2 Answers
Placing objects in world at vertices position? 0 Answers
Can and should a procedural mesh be shared between multiple GameObjects 1 Answer