Negative Terrain on multiple Heightfields and Ocean Surface

Started by WAS, December 11, 2014, 02:32:24 AM

Previous topic - Next topic

WAS

Lets say I want to add a field islands from some USGS information. Like for example, Hawaii. How would I mask all 'base' terrain as the ocean floor and apply a inverted fractal terrain for said ocean.

Not lets say I have my island at it's original height, and the negative terrain for ocean canyons. How... do I make a solid layer over that negative terrain to apply a Water Shader for ocean surface?

I have been puzzled on this for awhile which has kept me away from height-fields and real-world stuff. I just recently started my hand at the "Iceland" challenge. Not going to enter as probably too late and I'm rubbish and on free version, but what I have looks nice, just big issues with a nice looking sea floor.

Dune

If the ocean floor is relatively flat, you can just add the displacement of the islands, if not, you can use an SSS or painted mask to flatten that part of the ocean floor first then add the island displacement. Best if the island map is black at the borders, or you can set an edge smoothing in the image map shader, so it flows in smoothly.
For ocean surface you don't need a 'solid layer', but a lake (which is a sphere), or sphere the same size as the planet (shadows off), to put your water shader on.

WAS

Quote from: Dune on December 11, 2014, 04:05:40 AM
If the ocean floor is relatively flat, you can just add the displacement of the islands, if not, you can use an SSS or painted mask to flatten that part of the ocean floor first then add the island displacement. Best if the island map is black at the borders, or you can set an edge smoothing in the image map shader, so it flows in smoothly.
For ocean surface you don't need a 'solid layer', but a lake (which is a sphere), or sphere the same size as the planet (shadows off), to put your water shader on.

My problem is this is a fly-by from space. So a lake does not encompass the whole planet, and any bigger sizes then 10/100th the planet and TG3 will crash. So a surface layer for a planet wide ocean is my only option. After settling on "Hawaii" it's going to splash down into the ocean, so there needs to be a real environment down there, not just the flat terrain I have no (height maps already had black borders to blend in with flash planet)

I was hoping to invert the land to create ocean canyons in the negatives. So all "flat" land below the heightmaps would be inverted terrain basically. Now how to do this, and blend heightmaps to the terrain under them is stumping me. And then a solid 'floating' layer to apply a water shader too.

Oshyan

1: Setup your sub-surface (underwater) terrain first, the way you want it to look. If you're just using a Power Fractal, then set Displacement Offset a ways down, maybe 1000m. If you're using multiple shaders, put a Displacement Shader at the end of that chain, before you add your DEM data, and feed a Constant Shader into its Function input, then set Displacement Multiplier to -1000 or so.

2: Load your DEM, enable Replace NODATA Values if necessary (it was on my Hawaii data, otherwise it appears sunken into the terrain). Then use the Border Blending settings to blend it into the surrounding terrain.

3: Add a Sphere object, go into your Planet node, copy the Radius value, paste it into the Sphere object's radius. The default is 6.378e+006. Do the same with the Centre (position) parameters (make it easy and use the copy/paste buttons on the right of these fields). You should now see a smooth surface cover most of your scene, except for the DEM which should be sticking up. This is your water level. If any mountains from the procedural terrain are sticking above it, go back and adjust those shaders to fix it, either reducing Amplitude, or increase negative offset. Once you have a smooth surface outside the area of your DEM, then add a Water Shader to the Sphere object (hint: go into its settings, go to Surface Shaders tab, click green + button on right of Surface Shaders field, select Create New -> Surface ->Water Shader).

4: Adjust all elements to your preference.

So the basic take-away is: use a big sphere as a sort of global planetary water level. Lake objects are meant to be lake-size, they shouldn't crash (though we know they do in certain circumstances), but at that scale they're not ideal anyway. This approach should give you a good, realistic result with a bit of tuning.

- Oshyan

Dune


WAS

Awesome! Thanks guys! Much appreciate. I think I get the concept, and I think I'm halfway there. Just fine tuning some stuff. I do have a question though... when I save this and hand it over.. when my friend opens it in tg3 animator will he be able to edit and animate it?  :-X

Oshyan

Yes, certainly should be able to. Just make sure you "Gather" your project (on the File menu) and send him all relevant files.

- Oshyan