Gradient test

Started by bigben, January 31, 2008, 03:47:52 PM

Previous topic - Next topic

bigben

My previous faked ocean depth used an image map and multiple colour adjust shaders to create masks for different coloured surfaces.  Here's a better hack using mogn's smoooth gradient clip (http://forums.planetside.co.uk/index.php?topic=2968.0). I knew this was going to be handy clip  ;D

This is a single terrain with two shaders, one for the terrain, and one for the ocean bed. Each has just a gradient as a child input.  There's no water here...  and the atmosphere has been disabled so you see the ocean bed detail.

The terrain is made from CleanTOPO2 and is about 2km resolution (my biggest padding terrain to date)

Harvey Birdman

Hey, that looks pretty good! One more work-around in lieu of transparency...

:-\   ;)   :D

Sethren

If you could just isolate a reflection/specular shader and mask it off to the ocean part only then you could have a convincing case for water. The render times would be nice and quick. It's to bad Terragen does not have a blur shader. Imagine blurring the ocean part of the shader according to water depth. As the water goes deeper so does the blurring. I do this all of the time in my texture software to make for convincing water depth and it works quite well.

bigben

#3
Quote from: Sethren on January 31, 2008, 06:17:47 PM
If you could just isolate a reflection/specular shader and mask it off to the ocean part only then you could have a convincing case for water. The render times would be nice and quick. It's to bad Terragen does not have a blur shader. Imagine blurring the ocean part of the shader according to water depth. As the water goes deeper so does the blurring. I do this all of the time in my texture software to make for convincing water depth and it works quite well.

That's actually quite easy... altitude = 0, parallel terrains, one clipped to altitude = 0, the other unchanged to provide the mask info (Or of course use a lake object  ;)  I've been using terrains for water surfaces too long...)

For blurring.. Multiply the colour by a fractal with colours in the range of 0.7 - 1, masked by the original greyscale input (adjusted altitude range in this case). This adds more noise to shallower water giving the impression of being sharper.  The bathymetry data is much lower res than most terrain data so the terrain will always be sharper than the subsurface detail

Quote from: Harvey Birdman on January 31, 2008, 03:53:17 PM
Hey, that looks pretty good! One more work-around in lieu of transparency...

:-\   ;)   :D

And also of use with transparency, helping to colour the water by changing the colour of the ocean bed by depth.... obviously with different colours than used here.  I'd probably add an extra altitude restricted shader for both very shallow water and very low terrain to provide a sharper band for beaches. But even with this it's a much tidier/quicker approach than my previous hack

bigben

PS.. the CleanTOPO2 data is "cleaner" as it's name suggests but it requires rescaling the elevation with values in the metadata file. Something to keep in mind if you use it as a global bump map.

Sethren

Quote from: bigben on January 31, 2008, 07:43:12 PM

That's actually quite easy... altitude = 0, parallel terrains, one clipped to altitude = 0, the other unchanged to provide the mask info (Or of course use a lake object  ;)  I've been using terrains for water surfaces too long...)

For blurring.. Multiply the colour by a fractal with colours in the range of 0.7 - 1, masked by the original greyscale input (adjusted altitude range in this case). This adds more noise to shallower water giving the impression of being sharper.  The bathymetry data is much lower res than most terrain data so the terrain will always be sharper than the subsurface detail

And also of use with transparency, helping to colour the water by changing the colour of the ocean bed by depth.... obviously with different colours than used here.  I'd probably add an extra altitude restricted shader for both very shallow water and very low terrain to provide a sharper band for beaches. But even with this it's a much tidier/quicker approach than my previous hack

Coolness.   ;D

Mr_Lamppost

Do you want to stop doing interesting stuff?  Time is running short as it is  ::)

Seriously: Excellent work  ;D
Smoke me a kipper I'll be back for breakfast.

Harvey Birdman

Quote from: bigben on January 31, 2008, 07:43:12 PM

And also of use with transparency, helping to colour the water by changing the colour of the ocean bed by depth.... obviously with different colours than used here.  I'd probably add an extra altitude restricted shader for both very shallow water and very low terrain to provide a sharper band for beaches. But even with this it's a much tidier/quicker approach than my previous hack

I was thinking more along the lines of some sort of depth-affected translucency, so you wouldn't have to use the gradients at all - it'd occur automatically as the light passed through the material. I'm not sure if that sort of thing is built into the transparency feature we hear about or not.

bigben

It probably would be as this is fairly standard with water, but it can always be complemented by an additional variation....  although I can't really think why at the moment because the effect would be subtle... but just in case...  ;)

bigben

Quote from: bigben on January 31, 2008, 07:43:12 PM

That's actually quite easy... altitude = 0, parallel terrains, one clipped to altitude = 0, the other unchanged to provide the mask info (Or of course use a lake object  ;)  I've been using terrains for water surfaces too long...)


Actually that's full of crap   :D   ::) You'll just end up with the colour of the shader for the altitude of the water .... best to wait for transparency

Quote from: Mr_Lamppost on February 01, 2008, 05:36:06 PM
Do you want to stop doing interesting stuff?  Time is running short as it is  ::)

Seriously: Excellent work  ;D


What, you mean produce a final image?  ;)  a) having too much fun tinkering, b) very critical of my own work.... Always something to be fixed  which leads to even more tinkering   ;)

Mr_Lamppost

Quote from: bigben on February 01, 2008, 07:30:15 PM
Quote from: Mr_Lamppost on February 01, 2008, 05:36:06 PM
Do you want to stop doing interesting stuff?  Time is running short as it is  ::)

Seriously: Excellent work  ;D


What, you mean produce a final image?  ;)  a) having too much fun tinkering, b) very critical of my own work.... Always something to be fixed  which leads to even more tinkering   ;)

;D ;D ;D And how much more would I get done if I stayed out of here  ;D ;D ;D ;)
Smoke me a kipper I'll be back for breakfast.

Cyber-Angel

Nice choice of Continent for your test take it from some one who knows.  ;D

Regards to you.

Cyber-Angel