Outerra forum

Outerra Engine => Development screen shots and videos => Topic started by: cameni on March 13, 2015, 04:34:46 pm

Title: Fractal resampling
Post by: cameni on March 13, 2015, 04:34:46 pm
An experimental resampling method was tested on the existing 90m dataset, instead of the standard bilinear resampling.

The problem with bilinear resampling is that it loses high frequency detail when the samples lie in between the source points, and are averaged from 4 samples. It leads to blurring of such data, as can be easily seen when blending texture with itself to make it seamless (source (http://www.gamedev.net/blog/33/entry-2138456-seamless-noise/)):

(http://i.minus.com/jw7p3Id71umMf.jpg) (http://minus.com/i/w7p3Id71umMf)

(http://i.minus.com/jTCHBy3MTdHGu.jpg) (http://minus.com/i/TCHBy3MTdHGu)

In OT the blurring causes a loss of detail at the specific wavelength of the data, which in case of current dataset is around 75m. Detail above it is preserved in the data, below it (finer) is procedurally generated, but right at 75m it's artificially suppressed by the bilinear filter.

In order to get some detail back, I tried to compensate the blurring by adding some fractal noise, proportional to the distance from source points. In other words, if the sample falls close to one of the source samples, it's taken almost directly, but if it lies further from each source point, a small noise value is added, that's proportional to the difference between source samples and largest in the middle.

Here are some screens for comparison:

(http://i.minus.com/j0Ep4LH6e4ddO.jpg) (http://minus.com/i/0Ep4LH6e4ddO)
(http://i.minus.com/j6ZBlh3rMpojI.jpg) (http://minus.com/i/6ZBlh3rMpojI)

(http://i.minus.com/jQXH0vJupQrQw.jpg) (http://minus.com/i/QXH0vJupQrQw)
(http://i.minus.com/jbutZRnAPNV82c.jpg) (http://minus.com/i/butZRnAPNV82c)

It does some interesting things, and it also affects coarser detail levels.

(http://i.minus.com/j4ihc2sc5Ypmr.jpg) (http://minus.com/i/4ihc2sc5Ypmr)
(http://i.minus.com/jTQJAhho2ttc0.jpg) (http://minus.com/i/TQJAhho2ttc0)

The dataset is a bit larger (around +1.5GB) since the terrain is effectively noisier and therefore harder to compress.
Title: Re: Fractal resampling
Post by: John514 on March 13, 2015, 04:39:16 pm
Interesting. Does Fractal still means its endlessly detailing the terrain here as well?
Title: Re: Fractal resampling
Post by: HiFlyer on March 13, 2015, 04:42:57 pm
Is there an effect on framerates?
Title: Re: Fractal resampling
Post by: cameni on March 13, 2015, 05:04:21 pm
It's just a (slightly) different way how the OT dataset is compiled from the real world elevation data, a way to preserve terrain characteristics better. No effect on framerate, just the dataset size increased a bit.
Title: Re: Fractal resampling
Post by: monks on March 13, 2015, 05:36:11 pm
Yes, subtle but noticeable improvement. You remember I had a similar problem with data loss due to resampling! :-D

monks
Title: Re: Fractal resampling
Post by: josem75 on March 13, 2015, 07:02:39 pm
It seems this method is working nicely in outerra. The blurring is less as we can see in pics. 
What i like in outerra is the long distance detail. So having even less blurring is great, and more if the cost is just a few more space. Cheers.   

Edit: Also, i am seeing with detail. It seems this method do a more fine job detailing rocks, so the result is not so big rock pieces.  We can see coverall in the last image comparisson, some very big rocks formations in the linear method are not generated in the fractal method, where transitions are more natural for me. Dont know if its just casuality.
Title: Re: Fractal resampling
Post by: HiFlyer on March 13, 2015, 08:15:15 pm
It's just a (slightly) different way how the OT dataset is compiled from the real world elevation data, a way to preserve terrain characteristics better. No effect on framerate, just the dataset size increased a bit.

Well whenever/if ever you feel its ready, I'm sure all us guinea pigs will jump to try it!  =D
Title: Re: Fractal resampling
Post by: ZeosPantera on March 13, 2015, 10:14:00 pm
That mountain in the background of the last set seems to have dropped quite a bit in height. Any way to check the actual distance in feet?

Also here you go.

(http://i.imgur.com/wzZMkOx.gif)

(http://i.imgur.com/6S1hKWj.gif)

(http://i.imgur.com/OrBtgPl.gif)
Title: Re: Fractal resampling
Post by: HiFlyer on March 13, 2015, 10:39:42 pm
Lol, I made one of those too, so I could see the differences better.  :D
Title: Re: Fractal resampling
Post by: KW71 on March 13, 2015, 10:43:00 pm
"Yes, subtle but noticeable improvement".

I think we consider it subtle because of the scale; but indeed there is a big amount of detail added,  very noticeable in the slopes. Mountains looks more like mountains to me now.

This plus 30m of resolution...  !!!
Title: Re: Fractal resampling
Post by: Uriah on March 13, 2015, 11:22:16 pm
Very nice! I fractal sampling looks far more natural.|

Regards,
Uriah
Title: Re: Fractal resampling
Post by: M7 on March 14, 2015, 11:35:34 am
The difference is quite noticable when the terrain is near vertical.
Title: Re: Fractal resampling
Post by: Peca on March 14, 2015, 05:49:21 pm
It definitely makes terrain more natural, god job :-)
Title: Re: Fractal resampling
Post by: 2eyed on March 15, 2015, 05:59:36 am
It's truly a refinement and should be complemented with larger procedural structures like erosion patterns to make the look more real.
Title: Re: Fractal resampling
Post by: Revolver on March 16, 2015, 12:00:24 am
In my opinion looks fraktal much better... :)