Shore Foam

Started by choronr, December 17, 2009, 09:37:33 PM

Previous topic - Next topic

choronr

While attempting to add some shore foam to a water shader by adding a power fractal shader to its input and fiddling with the scales to no avail, I added a distribution shader to restrict the power fractal by the maximum altitude at the shore position of my image which is -4.407. The water depth is 1.5. The shore foam does not show up.

If you have any ideas on this, I would appreciate them.

Bob

Henry Blewer

Have you tried a paint shader to mask the foams area? Using a large blend area and having the 'hard' part intersect the shore/land line should mask the foam effectively.
http://flickr.com/photos/njeneb/
Forget Tuesday; It's just Monday spelled with a T

choronr

Quote from: njeneb on December 17, 2009, 10:58:26 PM
Have you tried a paint shader to mask the foams area? Using a large blend area and having the 'hard' part intersect the shore/land line should mask the foam effectively.
Thanks; with the method I described above, I do not get any 'white' color at all showing up. I would expect that if I used the painted shader, I still wouldn't get anything.

Dune

I've been struggling with the same problem, and addressed this question in my Vikings Landing post. I'd like to know! The painted shader is too 'easy', I prefer something procedural.

Henry Blewer

How about using the altitude functions? Not sure how... But part of the dry land could become foam using the information.
http://flickr.com/photos/njeneb/
Forget Tuesday; It's just Monday spelled with a T

pfrancke

I started with dunes tgd and kept plugging away and experimenting till I got it.  Stumbled onto it, and am not 100 percent sure why it works, but it does work.  I created a "mask" by setting first setting it all black and then produced the shore line by elevation constraints to be all white.  Plugged it into the foam blend - trick was to also merge in the elevation and include compute terrain, so that the surface layer used to create the mask knew about elevation.  Not being very clear, but the tgd speaks for itself. 

choronr

Quote from: pfrancke on December 18, 2009, 03:53:08 PM
I started with dunes tgd and kept plugging away and experimenting till I got it.  Stumbled onto it, and am not 100 percent sure why it works, but it does work.  I created a "mask" by setting first setting it all black and then produced the shore line by elevation constraints to be all white.  Plugged it into the foam blend - trick was to also merge in the elevation and include compute terrain, so that the surface layer used to create the mask knew about elevation.  Not being very clear, but the tgd speaks for itself. 
Thank you so much Franck; I'll start to explore this as soon as I can ...really appreciate this.

choronr

Quote from: pfrancke on December 18, 2009, 03:53:08 PM
I started with dunes tgd and kept plugging away and experimenting till I got it.  Stumbled onto it, and am not 100 percent sure why it works, but it does work.  I created a "mask" by setting first setting it all black and then produced the shore line by elevation constraints to be all white.  Plugged it into the foam blend - trick was to also merge in the elevation and include compute terrain, so that the surface layer used to create the mask knew about elevation.  Not being very clear, but the tgd speaks for itself. 
Well Franck, I gave it a try, adjusted the settings a number of times to suit my terrain (TU's Canyon) and, couldn't get any foam to show up.

Dune

I'll have a go at this, as well. Thanks so far.

pfrancke

Bob,

if you wish, post the parts of the tgd that you can - raging snow storm here and it would be fun to look at - but no telling how long the satellite internet will keep working...

Piet