Water and shading

Started by NuttyMonk, June 27, 2007, 08:14:21 PM

Previous topic - Next topic

NuttyMonk

Hi all,

i've been reading some of the posts about the water shader.

i've been trying to apply an image of a starfield to a water shader so that it appears there are tons of tiny lights in the water.

I have a default shader going into the water shader of a standard lake water object

i.e.  default shader -> water shader -> Lake

My problem is that the black part of the image is coming from the default shader and being applied ot the surface of the water which is changing the way it looks.

I've been mucking about with the opacity settings using the starfield to remove all of the black and only pass on the bright white points of the starfield to the water shader but can't get it right.

In my default shader i have the starfield image being used for the colour image and the luminosity image.  i also use the starfield for the opacity image.  I've tried different ways of altering the opacity settings so only the stars themselves are passed through to the water shader, leaving the black part of the image out.

Can anyone point out what i should be doing to get this working correctly?

Cheers

Oshyan

I'd use an Image Map shader instead of the Default Shader as you get more options for dealing with opacity. You could automatically generate the opacity mask from color (set it to black and only white will show through), or invert it (which may be what is needed in your case if you're trying to use it directly *as* opacity).

- Oshyan