- Home /
Odd shadow behaviour from generated mesh
I've got this mesh that I generate at the start of the game. It casts these weird shadows with transparent lines. I would appreciate help in solving this problem!
Answer by · Jul 28, 2017 at 04:38 PM
From what i see you are creating cubes and then combining them into a single mesh. To solve this just change the shadow bias in the light
I'm creating every vertices individually and connects them. The inside of the mesh is completely hollow. I don't understand what you mean with change the shadow bias in the light.
In the light component that you are using to cast the shadows there is a option called bias. This looks to be the problem. https://docs.unity3d.com/$$anonymous$$anual/ShadowOverview.html
I tried fixing it by tweaking the bias but it only caused more artifacts. Though the new information gave me search results and I came to the conclusion that I had to assign the "Cast Shadow" in the "$$anonymous$$esh Filter" on the mesh to "Two Sided". Now it works like a charm! Thanks alot