foam

Started by mhaze, January 20, 2013, 06:09:56 AM

Previous topic - Next topic

mhaze

It seems that one is for the main water and one is for the upswelling foam - it works with some artifacts from ior I think.  But there must be a simpler way ....


choronr

Thank you Mick, never could get the kind of foam like this ...much appreciated.

Dune

Regarding the 2 water shaders; I am now rendering a scene which involves some rather crude displacements, upheaval of foam. That takes a lot of time. I already moved the water shader to before the foam comes in (I earlier had it inversely blended by the foam areas, after the foam), set it to non-transparent, and added an additional non-RT reflective shader in the foam setup, and added an extra transparent no wave water shader for the frontal area, but still....
I see it's rendering the foam displacements behind the rocks, taking all that time, and then covering it with the rocks. An actual waste of render time. Of course I can manually mask out all not visible crude displacements, but an automatic mask would be easier.

Oops. Sorry to hijack your post, Mick, I'll stop here.

mhaze

#19
Please carry on. hope to see a solution sadly I'm getting frustrated by it and will soon have to give up due to other work.  I had thought of using a relective shader but have not yet got round to it. I had considered using dandelos masking method for water but the resultant complexity would have driven me nuts.  Automatic masking of water should really be a part of TG's basic code.

mhaze

Whoopee!!!!  think I've solved it - pic rendering now but will take a while will post later

dandelO

Hi, Mick. I have managed to have a full setup using a single water shader, with subterrain water omited too.
For the foam width, I used a smooth step scalar and a separate hard step scalar removes the water beneath the terrain. Give the hard step a slightly smaller value than the smooth width and use that as an opacity function from the displacement to vector. I'll do an upload later, if I can, with the entire clip...

chefc

Ty Mich looks very promising
Chef C  ;)

Serving the masses  8)

Mor

Thank you very much Mhaze.

mhaze

Cheers Dandelo - I will be very interested to see it.

dandelO

#25
I hope you don't mind me posting here, Mick, instead of starting another 'still, still more foam' thread.

Not sure if I'm doing this the same way as you guys have been as I haven't looked at any of the previous clips but it seems much the same as Ulco's displacement to vector method.
The smooth step makes the width of the turbulence falloff and the hard step removes the subterranean water. In this image I used constant vector width='75', and needed to use constant vector opacity='55' to adjust how close to the terrain the water is omitted.
* The opacity width should always be somewhat less than the falloff width. At a constant width of '25', an opacity vector of '20' was needed to pull the water back to just behind the point it meets terrain. In other words, adjust the opacity constant vector to suit, if you adjust the falloff vector.

Didn't spend any time on the waves or terrain, and there's no white-caps past the smooth step distance either here. That shouldn't be too hard to add of course, I just played with the shoreline. The water is a sphere so it is planetary, adjust the water-level with some displacement offset or, remove the sphere object and just use a lake/plane, if you prefer.

** Maybe the volume density is a bit much in the water shader here?

Image 2 is just to show the water with the opacity trick, all you can see is distant atmosphere where the terrain should be.

[attachimg=1]

[attachimg=2]

[attachimg=3]

zaxxon

Those are exquisite Dandel0! Hopefully you would consider doing a Terralive session on this process. Wonderful!


choronr

Thank you Martin.

mhaze

Thanks Martin I shall have to study this