Waves again (again)

Started by Dune, August 30, 2016, 03:22:06 AM

Previous topic - Next topic

Dune

It's not a big problem anymore to get some sinuslike 'surf' in a restricted coastal zone in a procedural terrain (with a blue displacement to scalar, etc... ), but I am trying to figure out how to get these waves to slant towards the beach, surflike, everywhere. You can of course redirect or vector displace a region, but that wouldn't work everywhere, as redirect or vector displace is usually unidirectional. There must be a way to translate the slope/angle of the beach to a function that steers the vector displace. There you have it.
A vector displacement map can be made from a terrain (there are threads and tutorials about it), resulting in RGB values steering displacement in another app. But I think these values could be used within TG as well. But how? Build vector, and use that to vdisp waves?
I will do some experimenting if time permits, but if anyone has any bright idea.......

mhaze

Be careful here, waves are wind driven in sweeping curves that represent the gusts of wind. When they meet the shore they are subject to many forces not just the shape of the land. Small bays will have different effect to large ones the slope of the sea bed and the slope of the shore all have an effect.  Some careful study of photos will clarify this.  Your idea of an rgb map perhaps fed though colour adjust shaders will be a good start but not the whole answer!

Dune

Yes, of course there's much more to it, but even the problem I sketch hasn't been tackled yet. Deriving a roughness map (how much displacement within X meters square), may also be a nice feature to have as a mask, but well, we must start somewhere  ;)

Hetzen

I've been working on this for a while now. Mhaze has got it right. There's a hell of a lot of factors to work out, but what you're saying Ulco can be done.

Below is the result of a set of functions that rely on one value, which as you point out can be elevation. At the moment I've got flipping normals at the crest to sort out. But it's not far off.[attachimg=1]

Hannes

This is one hell of a thread!!!! Fantastic, Ulco and Jon!

Hetzen

This is a few frames on. You can get vector displacements to overlap....
[attachimg=1]


bobbystahr

Quote from: Hannes on August 31, 2016, 01:52:24 PM
This is one hell of a thread!!!! Fantastic, Ulco and Jon!

Yo o o u said it Hannes
something borrowed,
something Blue.
Ring out the Old.
Bring in the New
Bobby Stahr, Paracosmologist

Dune

#8
I know you've been working on this, we had 'a thing going on' a few years back  ;) and I hoped you'd chime in. I haven't looked at the old setups, but had some new ideas to work out. I was just about to post that I can't get it to work. I can some sort of vector like displacement in the waves based on the slope of the seabed under it, but it's very irregular and is just based on a minmax slope. Doesn't work like it's needed.
I can also most likely (haven't tried yet) get a sinuslike rib sequence in a sideline on the seafloor where the surf is, which can be (after a compute normal) displaced laterally, and then translated to the sea object through displacement to vector and flattened in the Y again (if that works), but that would be the opposite direction of surf  :(
The normal of the seafloor should somehow be translated into a vector.... well that's all I can think of.
So your renders look very interesting. Does this indeed work in every direction, based on the terrain? That would be the first of a complex of factors solved.


Dune

This is the actual landscape, btw. on which I tested.

mhaze

B****y hell Dune  -that's some network!  The waves look good. The problem with your last image is the waves would not follow the shore like that in real life.  They would most likely be much straighter in the bay and rough up at the edges.  Nice work Hetzen looks very close!

Dune

Yeah, I included a bit of the network to show how I even get crazy sometimes. I know about the wind direction, steepness of seafloor, obstacles, etc, etc. but you have to start somewhere. Small breaking waves will probably be kind of everywhere anyway.

Kadri


With your node setup how are the render times guys?

Dune

Very fast, no problem. The latest render took about half an hour, I think, detail 0.6, AA6 soft shadows. I don't use a compute terrain (just one compute normal), so that saves a lot.

Kadri

Quote from: Dune on September 01, 2016, 09:43:33 AM
Very fast, no problem. The latest render took about half an hour, I think, detail 0.6, AA6 soft shadows. I don't use a compute terrain (just one compute normal), so that saves a lot.

Nice.