September 24, 2021, 20:05:26

Author Topic: Some water and some terrain  (Read 850 times)

Offline Xaron

  • Sr. Member
  • ****
  • Posts: 353
Some water and some terrain
« on: September 26, 2019, 09:58:46 »
Hi all,

I recently started some work on a terrain engine using Unity which will become a game at some point. So all in all I started with the good(?) old Unity terrain itself which is not that bad but has some issues especially when thinking of a larger open world area.

So I opted for maximum flexibility which means in my case that I wanted to be able to visit every spot on this earth which obviously is not an easy task but doable.

A quick search led me to GTOPO30 data which is freely available radar data with a resolution of 30 arc seconds per grid point which is about 1km per point. For the entire earth this means we have a height map of 43200x21600px in size which is about 1.8GB in file size for 16 bit signed integer raw data.

Of course it's impossible to have that as mesh completely in memory so I decided to create terrain chunks which are streamed from that heightmap. First drafts lead to something like this:

The resolution of 1km was too low for me so I decided to add additional vertices in between this grid to create a resolution of 200m per point, the height was simply interpolated between the main grid:

Now even though that's somehow better, it doesn't give an additional kick to the look and feel, so I applied some perlin noise on top of that:

That is now one chunk with about 240x240 vertices using 48x48 grid points from the original height map so it roughly has a dimension of 48x48 km in size. More to come...


SimplePortal 2.3.6 © 2008-2014, SimplePortal