XM Magdalena 3D print, GGeorgy (3D)
LC #42 Pipers Alley

View Full Version : Ocean water and water color by depth.

02-16-2006, 02:34 PM
Using only polygons is there a shader or a neat trick for free out there which could produce a water color effect depending on how deep the bottom of the ocean is.
Here's an example: http://www.zvrk.co.yu/Slike/priroda/more/atoll.jpg
Is it possible to have that kind of deepening of color depending on water depth without painting colors manually?

02-16-2006, 03:43 PM
Well to be accurate, i would say that the most dramatic changes in water color, are because of whats at the bottom, which is sand and sea weed. Up to a point that the seaweed color blends to a solid dark blue. But you realy can't tell the difference from that distance on which factor affects the color most. Thickness or the floor color?
I'd say better paint a nice map for the bottom of the sea, with rocks seaweed and sand, and work with that. It doesn't even have to be realistic from this distance.

02-16-2006, 03:52 PM
I could make the bottom texture blue where there is deep and use the same seaweed color I currently use in less deep places. In fact there are different textures in my current scene which are controlled by a slope alpha gradient and distance to Y. But they don't give desired results. The deepening blue depending how deep it is in an animated scene is what I'm after.

Edit: Could a light incidence angle be used with this somehow?

Edit2: Have to resort to hypervoxels?

02-16-2006, 04:06 PM
Try a gradient based on surface thickness.

02-16-2006, 04:18 PM
Good idea, thanks, I will try that. Have a bit doubts about it how it will work out as the camera is above the water instead under it.

Edit: I think it might work great after all! Using this tute as a guideline: http://www.dbki.de/tutorials/eng/glas/index.html
Big thanks.

02-18-2006, 05:36 PM
try shader called coffee, it use depth to change color, transparency and more, i use it to build this kind of strange colored glass, but you can do that for water.

02-19-2006, 02:26 AM
Nice find and nice render PixelInfected

Coffee Shader LINK (http://koti.mbnet.fi/anttij77/Plugins/Coffee.html)

It is also suggested to use this SKA shader with it

SKA Shader Link (http://www.lightwavers.net/down/)
(Dont know SKA's compatability with 8.5 or higher)

02-19-2006, 02:36 AM
You could also set up your water mesh with a weight map painted using airbrush and then attach a corresponding colour gradient. The same could be used for transparency, colour filter etc.

02-19-2006, 11:14 AM
thanks Rich,
i tried ska many times ago before to buy g2, but it was too slow to use in production.

another idea could be to add a second plane under sea where you can paint color and depth that water can refract. that mimic the real world under water, but a single plane must be fast to render (to be honest, try build a flat plane with a bit of polygons, lw sometimes is faster to render a large multipoly plane than a single large flat plane, probably be cuase it optimize it for refraction with multiple ray firing).

02-19-2006, 11:27 AM
Thanks for multitude of working responses!

02-19-2006, 05:24 PM
Try a gradient based on surface thickness.

This was my first thought as well...

02-21-2006, 08:50 PM
Have you thought of just coloring a plain below the surface of the water and adjusting the transparency of the water to make it visible? What happens in your picture reference is that, far from the water changing color, the light being reflected back frm what is beneath the water surface is changing because of the amount of water. More light is coming back where there is less water to get through. So, rather than trying to mimic nature, fake it by coloring the ground beneath the water. It'll be pretty processor friendly too.

CGTalk Moderation
02-21-2006, 08:50 PM
This thread has been automatically closed as it remained inactive for 12 months. If you wish to continue the discussion, please create a new thread in the appropriate forum.