We're working on setting up a 'seamless' game world where the world is split up into smaller terrain blocks in individual scenes which are dynamically loaded and unloaded.
We're running into problems with the Terrain.SetNeighbors() method which should correct the rendering of normals at terrain seams as well as match up LOD.
We have followed the documentation which says that neighbours must be set on both adjacent terrain objects, which we have done, but are still seeing incorrect normal rendering and 'tearing' at terrain seams at a distance where the LOD does not seem to match up.
Could someone please confirm what the correct usage is for this method, preferably with working sample code.
asked Feb 11 '10 at 07:56 AM
I was experiencing a similar issue: SetNeighbors() was being called correctly, but I was still getting incorrect normals at terrain edges. After digging through the API docs I realized I needed to call Terrain.Flush() after the SetNeighbors operation.
As far as I know, SetNeighbors only matches up LOD and not normals; for that you have to adjust the heights of both terrains to match.
answered Feb 11 '10 at 08:17 AM