Warlander / DeedPlanner-3

Village design and preview tool for Wurm Online and Unlimited
Apache License 2.0
24 stars 9 forks source link

Optimize heightmap handles #5

Open Warlander opened 4 years ago

Warlander commented 4 years ago

Currently every heightmap handle is a separate GameObject - this solution works on a small scale, but is very inefficient and causes significant performance problems on larger maps.

We could use instanced mesh drawing for this task, possibly combined with limiting max distance for terrain editing in 3d view as 3d height editing is intended for fine tuning the heights at close distances.

This taks will require extensive changes to OverlayMesh, and likely removal of HeightmapHandle together with prefab it resides on, as well as some changes in HeightUpdater.

Warlander commented 4 years ago

Heightmap handles optimized, but there is still room for improvement by reducing amount of physics calculations and fully moving the rendering to GPU.