- Home /
lighting problem with procedurally modified and tiled meshes
I have one directional light and 3D tiled meshes. I modified meshes with perlin noise, change Y coordinates and after RecalculateNormals().
I tried all shaders mobile diffuse, standart, vertexlit etc.. Same problem. I used "40x40 Maya modelled flat plane" or "10x10 Unity Plane", i have same problem with both of them. Also tried flat plane model import settings normal & tangent to calculate. I tried to smooth edges in Maya. Same...
My problem is lighting on hills, their shadows not contuine on neigbour mesh, I can tell every meshes has it own lighting algortihm, they are not working / computing together.
I tried to CombineMeshes, combined mesh has same problem too.
I stucked here, any help would be nice and save my other one week maybe...
I used this tutorial and codes. https://www.youtube.com/watch?v=dycHQFEz8VI
Forward Rendering, Infinite World, One Directional Light, No baking or light maps
Thank you all
Answer by EceLStyle · Jul 30, 2016 at 10:26 AM
I found my problem. It's %100 about normals. After manipulating vertices, i use RecalculateNormals. and then this problem come.
I used alternative NormalSolver script, found in unity answers. Not worked.
I confirm that i cant recalculate normals proper way.
Cause i exported my created mesh to FBX. Then i reimport it, i see problem shadows again. Then i go models import settings and Set normal import to Calculate, then unity calculated and problem solved.
What can i do now? Why import settings Normal calculation different from RecalculateNormal function? How i can create meshes and manipulate them on fly? Can i change normals as i do vertices?
Your answer
Follow this Question
Related Questions
Why are my shadows on my meshes, flat? 1 Answer
Lighting Messed up with multiple meshes 1 Answer
Voxel engine lighting 1 Answer
Light creates distortion on mesh? 1 Answer
Odd shadow effect, help! 1 Answer