Sinus Frequency Function

Started by WAS, March 10, 2022, 09:36:30 PM

Previous topic - Next topic

WAS

Here is a sinus function with frequency (or time). You can now lean the sinus wave in either direction (negative or positive).

WAS

Added a version 2 which has two built in clamping methods, or no clamping. Also a workbench visualizer.

Dune

#2
I'll be checking this out. I have found something that is sort of similar, so I'm curious to see the blues.

WAS

Ironically the same formula just different usage and placement of clamping stuffs. I do wonder if over using the terrain scalar as a driver for so many settings instead of a ranged version like smooth step or clamp. High range scalars in trig seem to get slow. Not sure though as I can't compare. 

WAS

This is where I've gotten with my own wakes and foam shader. Hannes is great, but for some reason when using it, it takes about 40 minutes to get a render finished, compared to this at 4 minutes... :O Even with the "debug water" which is just a surface layer that intercepts the water shader to kill volume computation.

WAS

Oops I forgot to re-enable the wake/foam warping by wave profile. Adds about a minute from 3:47 to 4:35.

Hannes

Wow, that looks cool!!!

Dune

Indeed does! Good job, Jordan.

These waves also need some irregularity. I've done several attempts in the past, never got really good results, so have to dive into this again some day. Perhaps you can beat me to it ;)

Some ideas.... warping by perlin, and at the same time masking by that perlin to get the convex shapes towards beach. Problem is always the direction.
I also often use an altitude mask to get some narrow strip of foam onto the beach itself, so the transition is more logical.


WAS

I was looking at strips on the beach too but honestly don't find them in a lot of images. Only overexposed images. Which is probably just capturing the high contrast of foam on the beach when a wave did roll up it. I dunno. I have a few in my scene based on altitude I am playing with but meandering them while also keeping them within the wet beach area wasn't as easy as I thought. Lol

My wave function (for actual waves not sinus) includes perlin warping, distribution, and lean. Though currently lean is just a twist and sheer. I should add it as a vector.

WAS

#9
Starting to think foam on beaches is just the very thin roll of the water. Which may be more appropriately handled by displacing the water along shore, so water rolls up it a bit and thins out.

Another thing that bothers me, is when you mask out the waves/foam setup to have areas with no waves and vary it up. If the scalar is slightly gray, you'll loose all foam, but still have wave displacement, and it just looks weird. It doesn't seem like the surface masking isn't accurate between displacement and colour. I've noticed this before with other stuff. Use a surface layer and offset it add colour, add a min alt, and than notice how colour transitions to zero far before the displacement does. This causes issues all around TG. Like fake stone colouring, or custom fake stone colour, etc.

Dune

Quote from: WAS on March 13, 2022, 01:59:41 PMdisplacing the water along shore
I do that as well, by using the displ to scalar and a color adjust to raise water level onto beach.

Perhaps another color adjust or bias/gain is needed to raise the white of the foam versus the 'white' for displacement.

WAS

I got drained today just trying to get foam and stuff to look decent before I realized it's more subjective area and may more be wasting time. I may share what I got tomorrow for someone else to mess with or use. 

WAS

Nice effect on terrain for a leaned strata look (lips slightly higher than terminator between terraces). Simply subtract from the scalar being fed through sinus function.

Dune

Cool. There are ways to mix different amplitudes, so that way you can have 'real soft strata'. 

WAS

Yep. I just took the function and scaled and mixed with last shader invented as mixer looks pretty good. Wanted to try with some soft erosion see if any sharp angled still show through. Shouldn't.