Error when generating terrain
Soahr opened this issue · 4 comments
Hi,
Thank you for sahring this stuff !
I got this error when i try to generate the terrain :
Failed setting triangles. Some indices are referencing out of bounds vertices. IndexCount: 6, VertexCount: 0 UnityEngine.Mesh:set_triangles (int[]) MeshData:CreateMesh () (at Assets/Snow Scene/ProceduralTerrainGenerator/ProceduralTerrainGenerator/MeshGenerator.cs:99) TerrainMapGenerator:CreateTerrain (single[,]) (at Assets/Snow Scene/ProceduralTerrainGenerator/ProceduralTerrainGenerator/TerrainMapGenerator.cs:167) TerrainMapGenerator:CreateTerrainChunk (UnityEngine.Vector2,bool) (at Assets/Snow Scene/ProceduralTerrainGenerator/ProceduralTerrainGenerator/TerrainMapGenerator.cs:138) TerrainMapGenerator:CreateChunkGrid (bool) (at Assets/Snow Scene/ProceduralTerrainGenerator/ProceduralTerrainGenerator/TerrainMapGenerator.cs:118) TerrainMapGenerator:Generate (bool) (at Assets/Snow Scene/ProceduralTerrainGenerator/ProceduralTerrainGenerator/TerrainMapGenerator.cs:88) TerrainMapEditor:OnInspectorGUI () (at Assets/Snow Scene/ProceduralTerrainGenerator/ProceduralTerrainGenerator/Editor/TerrainMapEditor.cs:37) UnityEngine.GUIUtility:ProcessEvent (int,intptr,bool&)
Do you have an idea about it ?
Thanks and have a good christmas day !
Hey! In the TerrainMapGenerator editor, could you please save the level file and attach it here? I'd like to see your terrain settings. Thanks!
Having this same issue could you help me?
I was having the same issue
Hi,
Thank you for sahring this stuff ! I got this error when i try to generate the terrain :
Failed setting triangles. Some indices are referencing out of bounds vertices. IndexCount: 6, VertexCount: 0 UnityEngine.Mesh:set_triangles (int[]) MeshData:CreateMesh () (at Assets/Snow Scene/ProceduralTerrainGenerator/ProceduralTerrainGenerator/MeshGenerator.cs:99) TerrainMapGenerator:CreateTerrain (single[,]) (at Assets/Snow Scene/ProceduralTerrainGenerator/ProceduralTerrainGenerator/TerrainMapGenerator.cs:167) TerrainMapGenerator:CreateTerrainChunk (UnityEngine.Vector2,bool) (at Assets/Snow Scene/ProceduralTerrainGenerator/ProceduralTerrainGenerator/TerrainMapGenerator.cs:138) TerrainMapGenerator:CreateChunkGrid (bool) (at Assets/Snow Scene/ProceduralTerrainGenerator/ProceduralTerrainGenerator/TerrainMapGenerator.cs:118) TerrainMapGenerator:Generate (bool) (at Assets/Snow Scene/ProceduralTerrainGenerator/ProceduralTerrainGenerator/TerrainMapGenerator.cs:88) TerrainMapEditor:OnInspectorGUI () (at Assets/Snow Scene/ProceduralTerrainGenerator/ProceduralTerrainGenerator/Editor/TerrainMapEditor.cs:37) UnityEngine.GUIUtility:ProcessEvent (int,intptr,bool&)
Do you have an idea about it ?
Thanks and have a good christmas day !
I was having the same issue. that's most likely because your Chunk Width is set to 0 by default. try adjusting your terrain settings
I was having the same issue
Hi,
Thank you for sahring this stuff ! I got this error when i try to generate the terrain :Failed setting triangles. Some indices are referencing out of bounds vertices. IndexCount: 6, VertexCount: 0 UnityEngine.Mesh:set_triangles (int[]) MeshData:CreateMesh () (at Assets/Snow Scene/ProceduralTerrainGenerator/ProceduralTerrainGenerator/MeshGenerator.cs:99) TerrainMapGenerator:CreateTerrain (single[,]) (at Assets/Snow Scene/ProceduralTerrainGenerator/ProceduralTerrainGenerator/TerrainMapGenerator.cs:167) TerrainMapGenerator:CreateTerrainChunk (UnityEngine.Vector2,bool) (at Assets/Snow Scene/ProceduralTerrainGenerator/ProceduralTerrainGenerator/TerrainMapGenerator.cs:138) TerrainMapGenerator:CreateChunkGrid (bool) (at Assets/Snow Scene/ProceduralTerrainGenerator/ProceduralTerrainGenerator/TerrainMapGenerator.cs:118) TerrainMapGenerator:Generate (bool) (at Assets/Snow Scene/ProceduralTerrainGenerator/ProceduralTerrainGenerator/TerrainMapGenerator.cs:88) TerrainMapEditor:OnInspectorGUI () (at Assets/Snow Scene/ProceduralTerrainGenerator/ProceduralTerrainGenerator/Editor/TerrainMapEditor.cs:37) UnityEngine.GUIUtility:ProcessEvent (int,intptr,bool&)
Do you have an idea about it ?
Thanks and have a good christmas day !I was having the same issue. that's most likely because your Chunk Width is set to 0 by default. try adjusting your terrain settings
This is correct, thanks! I updated the project to not allow setting a chunk width of 0.