shore wave challenge

Started by Dune, September 27, 2020, 02:20:32 AM

Previous topic - Next topic

Kadri

vWaves_20 and 21 look nearly like those water simulation program outputs. Great work.

Dune

Quotewarp very heavy on Y
That's what I used to get the waves further off coast to adjust a bit to the coastline.


The network is indeed a bit confusing. I'd like it to be simple, but haven't gotten to the crux yet ;) Too many ranges needed, and I like one to feed the other by adding scalars or something. But it's fun to work with, grinding the brain a bit  :P

Jon, do I understand you make 2 renders first for the normals and terrain? I'm sure it's possible to get the normals off the displacements in one go, but I'm stuck at the wave sine normals, which point off coast as well as to the coast, so displacing by something like a gradient of the underwater ground is a bit cumbersome. They displace more to the coast than off coast, but there are ugly parts too. Work not done yet....

Hetzen

With a cosine wave following an increasingly shallow gradient, it will always have the front side facing the coast. You can isolate the 'front' side of a cosine, by breaking down 2 x pi, to just pi to get half a wavelength, to 0.5 x pi to get a quarter wavelength.

The normal map render provides you with the lateral direction the wave is facing for you to vector displace. It also means you don't have to add/subtract the land displacement from the wave, which I think you guys are doing?

sjefen

I'd like to subscribe to this thread, but that feature does not work in the forums  :'(


- Terje
ArtStation: https://www.artstation.com/royalt

AMD Ryzen Threadripper 1950X
128 GB RAM
GeForce RTX 3060 12GB

Dune

I have to get my head around this, Jon. I used a displacement to scalar and smooth steps for gradients, which provide areas for foam and 'surf'. With a power scalar I steepened that gradient to get less and wider sinus offshore and more, smaller inshore. So no subtraction of land from wave.
Can't you make a normal map from those gradients in one go? Dry is white and deep is black (or however it's set up), so if that can be translated into vdisp.....

Hetzen

Probably, but if you bake that data you speed up renders by not having to check what the land displacements are doing.

Dune

I guess you're right. Thanks!

sboerner

Amazing results so far. Pushing the envelope . . . 


QuoteI don't understand what you're talking about, but I like it...
Same!

Hetzen

Ulco, try making a sine curve displacement, and then use a Surface Layer to mask certain parts of the wave form with a similar set of blues you used to make the sine curve.

It's important to remember that sin/cos/tan etc work in radians. So a sine wave that is 1 meter apart peak to peak would be written, (axis or gradient) x 2 x Pi, before you plumb it into a Sin node.

If you go a stage further and set the input of a Modulo to your (axis/gradient) and put your wave length as a Constant into input 2, then Divide the Modulo output by the same Constant, you will have a repeating 0 to 1, that can also help with masking.

WAS

#24
I wonder if you could create system that takes slope directions X/Z and creates a vector map of intensities which than can be used to warp/skew waves towards the shore.

Hetzen

There will be a limit to the realism you'll get in something like this. It could only ever be a brush stroke. There's no simulation, just you setting up rules on how you want a shape to form.

WAS

Quote from: Hetzen on September 29, 2020, 01:42:34 PMThere will be a limit to the realism you'll get in something like this. It could only ever be a brush stroke. There's no simulation, just you setting up rules on how you want a shape to form.
That's why I often setup beach scenes as a z plane distance shader and offsets, or utilize a very soft shape for a island or whatever and use it for the waves, adding detail later.

Dune

QuoteI wonder if you could create system that takes slope directions X/Z and creates a vector map of intensities which than can be used to warp/skew waves towards the shore.
This is exactly what I queried about in the first place, and that's my goal. I would like to have a (simple) system that could be used in every terrain, getting a (be it) simplistic surf set bending towards the beach, for semi-close-up stills.

I've been thinking about pulling a slope/angle from the beach by visualize normal, translating that in vector. Theoretically you'd then have a vector displacement 'map'. But the slopes on a beach are very shallow, so you'd actually need something much steeper to pull the waves (tops) towards the beach, not slanted down as the normal goes. Can't rotate the shallow slope into a steeper one, as that can only be done on a certain axis. Stretching the beach beforehand into Y may help, but you have to keep the altitude range in order. Best would be to translate the highs/whites and lows/darks into a vdisp mask.... somehow. But then you might miss the blue/red gradient of a real visualized normal map. The bending would have to go 'around corners'. 
Just thinking on paper....

Dune

Well, I may have to give up again. I can't get the normals off the waves (or land, even with some sideline of surf integrated) to get the shore wavetops to displace inland (on both sides of the island!). Tried everything that I can think of. I also couldn't make the phase shift, to lift or lower a part of the wave either >:( :( as that would at least be something that looks a bit like a real surfing wave.
So here you go, have a play with it... and do report back! It would be awesome if something like this could be integrated into TG.

Hetzen

Here's a screen grab of the network with the addition of isolating parts of the sine curve. And TGC that just needs to plug into the Planet.