Monday, November 9, 2015

Realtime Heightmap Generation using Sandsim 3D

Was playing sugar sugar 2, a few years ago and at the time wondered if the sand simulation was done by a series of patterns or calculated.
I was able to create some code to simulate sand.

This is the 2D part of the 3D sand simulator. It is very useful for creating landscapes, it has the added benefit of settling around rocks in a natural and realistic looking way. You just need to create a basic rock landscape and the sand falls from the ceiling and covers the landscape. Creates rock cliff faces automatically.
Here is a screenshot of the first basic test to see if it worked in 3D.
 Creates nice looking dirt mounds, and ridges.

*Update: This also can be used as a very useful path finding system. A majority rule space filling CA would be more efficient. 

No comments:

Post a Comment