Planetside Software Forums

General => Terragen Discussion => Topic started by: Pentagular Dark on July 03, 2012, 09:56:55 PM

Title: Shallow/Cyan Water
Post by: Pentagular Dark on July 03, 2012, 09:56:55 PM
I am trying to make an Earth-like planet, but I can't figure out how to get that little cyan water effect in the oceans.
You can see the effect I am trying to achieve here:http://eoimages.gsfc.nasa.gov/images/imagerecords/57000/57723/globe_west_2048.jpg (http://eoimages.gsfc.nasa.gov/images/imagerecords/57000/57723/globe_west_2048.jpg) especially in the Bahamas. I am getting some cyan-ness on the render, but it is in the middle of an ocean.  I'm also doing it the only way I can think of short of painting it on; by using a copy of my terrain as coloring. As mentioned previously, it doesn't do anything good. My options are limited as using a planet as an ocean just makes the ocean a checkerboard of land and water because my planet as a whole is very flat, and changing the displacement amplitude distorts my continents. Is there any other way I could do this or an improvement upon my (apparently useless) method?
Title: Re: Shallow/Cyan Water
Post by: bigben on July 04, 2012, 05:15:58 AM
Delving into my memory banks I've used 2 methods.
1: Set the colour of the subsurface terrain to complement the water settings.
Sounds easy in theory but at a planetary scale you can be asking to look through a lot of water, which makes a lot of the shallow water completely transparent
2: Use a BW image of the bathymetric data to mask a surface shader with a colour gradient and then add a water shader for the waves/reflectivity.
http://www.planetside.co.uk/forums/index.php?topic=2502.msg24609#msg24609 (http://www.planetside.co.uk/forums/index.php?topic=2502.msg24609#msg24609) 
Title: Re: Shallow/Cyan Water
Post by: Pentagular Dark on July 04, 2012, 03:03:39 PM
Neither of those two would work for me, seeing as my planet is so flat having water being a separate entity is impossible without lowering the entire ocean floor (which is currently my ocean), but that has a chance of distorting my planet... But I may try that still.
Number 2 would not work for this render in particular because the entire planet is randomly generated, except for the ocean floor. Plus I would've just used distribution shaders or the like if I had terrain under my water.
Title: Re: Shallow/Cyan Water
Post by: bigben on July 04, 2012, 05:22:30 PM
I may have missed something in the explanation. Neither of these methods changes the terrain. The difference is only in how you have defined your ocean.

Method 1: Terrain continues below water level and requires a separate object for the water surface.  Convert the depth below the surface to a number between 0 and 1 representing the range of depths you want to colour.  Create a gradient of colours that you want to apply to the subsurface terrain, then use the first as a mask for the second. 

Method 2: The water surface is just a flat area of terrain. Uses the existing terrain, assuming that it is flat where your ocean is.  If you've masked a terrain to produce a flat area for water you can add a Tex coords from XYZ before this in the node network to get the altitude of your "terrain" below the "water"


Title: Re: Shallow/Cyan Water
Post by: Pentagular Dark on July 04, 2012, 06:50:13 PM
I mis-read your post, and I think that 2 may work (testing now.)
EDIT: It worked now all I have to do is make it look realistic!
Title: Re: Shallow/Cyan Water
Post by: bigben on July 05, 2012, 11:07:42 AM
Here's an altitude gradient clip I've been looking for.
http://www.planetside.co.uk/forums/index.php?topic=2968.msg30137#msg30137
Title: Re: Shallow/Cyan Water
Post by: Pentagular Dark on July 05, 2012, 05:38:55 PM
That's perfect!