- Home /
Corrupted lightmap
I opened up Unity earlier and found that the lightmapping process was taking much longer than usual. After finishing, the terrain lightmap has black splotches all over it.
To give an example of what i mean, here's a picture of the terrain:
This has never happened before and I have no idea what would have caused it... Restarting Unity didn't fix the problem. I also am getting new errors in the console, they seem to be related.
numChunksInX * numChunksInY == numChunks
numChunksInX * numChunksInY == numInstances
terrainInstanceHashes.find (instances[i].instanceID) != terrainInstanceHashes.end ()
terrainInstanceHashes.find (it->instanceID) != terrainInstanceHashes.end ()
It seems that only this scene is affected. If I open a different scene and then switch back, the terrain appears normal for a brief second before returning to this state. This corruption also appears when I build it. What should I do? I will try any suggestions you can give.
If I make a duplicate of the terrain the duplicate will work fine without the blotches, but the second I disable either one of them both terrains will look like the image.
I could just have both terrains active and hide the broken one elsewhere, but this is not a solution and isn't good performance-wise. It is a temporary workaround and not a solution.
Answer by anthonius_kosasih · Sep 28, 2015 at 06:26 AM
It just happened to me several minutes ago. I left the scene untouched while I was searching for the answer and when I switched back to unity, the terrain is 100% fine already. The black splotches are gone and the error which is the same as yours are also gone after I run the game. I think you need to wait for a longer time if the terrain is more complex. Hope this helps.
Your answer
Follow this Question
Related Questions
Lightmapping strange behaviour 2 Answers
Lightmap index error 0 Answers
**Trying to access out-of-bounds terrain height information** When calling TerrainData.GetHeights(); 0 Answers
Seeing the terrain through my mesh 1 Answer
Problem with Terrain 2 Answers