Masking terrains?

Started by bigben, March 31, 2007, 08:59:50 AM

Previous topic - Next topic

bigben

Hi All

I'm going around in circles at the moment. I may figure it out, but if any one has any ideas I might get there a bit quicker. I have 5 .TER files of varying sizes (20 - 240km wide) all with a common centre. I'm trying to overlay them so that I have a higher resolution terrain in the centre, with the lower resolution terrain providing distant features.

I've tried several things so far, but I get either terrains stacked on top of each other, or just the low resolution terrain appearing. Any suggestions greatly appreciated.

Will

Just an idea but how about making them into an object and then bringing it into somthing like blender and put them together. Also you try makng them into an image in your desired pattern then use that as a height-field. I don't know just ideas.

Regards,

Will
The world is round... so you have to use spherical projection.

bigben

Quote from: Will on March 31, 2007, 07:05:26 PM
Just an idea but how about making them into an object and then bringing it into somthing like blender and put them together. Also you try makng them into an image in your desired pattern then use that as a height-field. I don't know just ideas.

Regards,

Will

Thanks for replying Will. 

I know virtually nothing of using Blender so this seems a little daunting.  Using images would be easy, but 8 bit images wouldn't have the accuracy of TER files which would defeat the purpose.  I've been doing some mind-numbing work on drawing masks to clear my head a little.  I'll try again tomorrow.

mogn

#3
I dont'know if this is what you is after.

Load the first .ter file.
Add terrain, but press cancel before selecting the file.
In displacement cancel the 'flatten first' and then select your file.
e.t.c.

Will

thats a good idea.

Regards,

Will
The world is round... so you have to use spherical projection.

neon22

#5
Hi Ben,
not sure if this answers your question ?

Use distance shader to switch LODs based on distance from camera.

3 images below show:
1 - visualisation with false color about where the terrain is being switched
2 - the distance shader with gamma applied to create that zone
3 - the unobstructed node layout

Cheers, Neon22

Oshyan

If your DEM's match edges well then all you need to do is make sure "Flatten Surface First" is on in the Displacement tab of all your heightfield shaders, then turn off Border Blending completely. The edges should then match up. Of course given the differences in resolution you may see some seams. This is not a situation that TG2 currently deals with directly so to avid that you'd have to do some merging in an external application, and that might then defeat the purpose of using multiple resolution terrains anyway.

- Oshyan

bigben

#7
Quote from: Oshyan on April 01, 2007, 08:56:54 PM
If your DEM's match edges well then all you need to do is make sure "Flatten Surface First" is on in the Displacement tab of all your heightfield shaders, then turn off Border Blending completely. The edges should then match up. Of course given the differences in resolution you may see some seams. This is not a situation that TG2 currently deals with directly so to avid that you'd have to do some merging in an external application, and that might then defeat the purpose of using multiple resolution terrains anyway.

- Oshyan

Oops   :-[   I guess that's what they called it flatten first  ;D

That works beautifully.  To see what's really going on at the borders you have to turn fractal detail off as well because it masks a lot of terrain defects (and makes really low res DEMs look quite good). I'll add fractal detail via a surface layer though, to make it the same across the entire terrain.


Here are some quick renders from the border of my central TER (20km). All TERs are 2049x2049

[attachthumb=#1]
20km and 240km terrains, blending =0

[attachthumb=#2]
Blending = 0.006

[attachthumb=#3]
Blending = 0.006, fractal detail enabled

[attachthumb=#4]
20km and 40km terrains, blending = 0, fractal detail disabled

Oshyan

It looks like you've found some good settings for your scene and I'm glad to see that the theory works well in practice. The key is having well-matched DEM's, which generally means resampling the same data yourself. Counting on SRTM data to match up with GTOPO30 for example is likely to give you problems.

- Oshyan

Will

Congrads Ben great to see it came out for you :)

Regards,

Will
The world is round... so you have to use spherical projection.

bigben

#10
Thanks Will... although it was something really basic  ;)

And so begins the construction of the sequel to "4 seasons in one day"

5 TERs, 1 WM flow map, 1 river/lake mask... and lots of other goodies yet to be inserted.
I could always use bigger terrains, but this method leaves me some extra RAM free for other masks or objects.


RealUser

Quote from: bigben on April 02, 2007, 07:58:03 AM
Thanks Will... although it was something really basic  ;)
And so begins the construction of the sequel to "4 seasons in one day"
5 TERs, 1 WM flow map, 1 river/lake mask... and lots of other goodies yet to be inserted.
I could always use bigger terrains, but this method leaves me some extra RAM free for other masks or objects.

Hey, that looks very nice! I am curious how this come out.
Markus / RealUser
...................................................................
visit my Renderosity Gallery at
http://www.renderosity.com/mod/gallery/browse.php?username=RealUser
...................................................................

rcallicotte

Very nice, Ben.  I can't wait to see the final.
So this is Disney World.  Can we live here?

Oshyan

You know Ben one seemingly small thing that I think may add a lot to the realism this time will be motion blur. I would particularly suggest relying on this (plus procedural detail) to hide any lower detail DEM areas that the camera passes relatively close to.

I'm really looking forward to seeing how this one comes out. I'll be particularly interested in render times too as I'm struggling with that issue on a project of my own that is aimed at animation.

- Oshyan

bigben

I'll be using motion blur for the animation... although I haven't found the level of detail to be too much of a problem.  This terrain is somewhat suited to this type of data "padding" because the main area of interest is in the middle, surrounded by relatively flat terrain.

Render times are scaring me a bit at the moment. My object masking has at least made it possible to actually render a whole frame without tiling output which is a big start, but times are still quite substantial. I just ran a test on masking rocks to steep valleys to try and add a form of realism to some of the mountain areas but that took 20hours with 3 fake stone shaders and a single grass population (with AA and GI settings down at 1).  :-\  And I still have to add some clouds in winter...

I don't think it will be practical at the moment without some form of render farm but then I'm still exploring how far I can push things..