Planetside Software Forums

Function Nodes In Practice => Function Node General Discussion => Topic started by: WAS on February 19, 2020, 02:16:22 pm

Title: Soft Half-Sinus Waves
Post by: WAS on February 19, 2020, 02:16:22 pm
I wanted to do waves which were more one-sided, but still soft, and I can't seem to figure it out. I even tried to translate a couple formulas with no luck. I remember this being shown somewhere too, but I can't find the topic. Anyone got any ideas?

Figured with a better setup like this, it would be easier to redirect X/Z scalars in a vector for wave leans towards the surface for surf waves.
Title: Re: Soft Half-Sinus Waves
Post by: Dune on February 20, 2020, 03:23:35 am
You can easily redirect or vector displace (even twist/shear) with a certain fuzzy zone/altitude restriction, but the main problem being the direction. For just a stretch of beach it's easy, but globally, you'd need to extract angles and displace laterally rather than vector displace.
Title: Re: Soft Half-Sinus Waves
Post by: WAS on February 20, 2020, 01:00:29 pm
Yeah this is just for a beach. Problem with just vector setup is it doesn't produce the desire effect without exaggerated disp and the leaning of the top to what I want causes stretched lines in the fuzzy zones, even with better disp continuity. I have waves going now with normal sinus I did a couple ways and not satisfied with the look.

I tried vector disp like my sand sahder creating it's own vector displacement with lean, and than I tried just surface alt cutoffs and twist and shear and I don't like the look of all the augmenting on a normal sinus
Title: Re: Soft Half-Sinus Waves
Post by: WAS on February 20, 2020, 01:07:05 pm
I also figured a true cos setup for half sinus would give us better stepping between waves too ontop of a cleaner lean.
Title: Re: Soft Half-Sinus Waves
Post by: WAS on February 20, 2020, 04:05:08 pm
This is the best I've gotten dressing up normal sinus. I have a better result in my head with a cos half wave.
Title: Re: Soft Half-Sinus Waves
Post by: Hannes on February 20, 2020, 04:28:36 pm
That looks pretty good so far.
Title: Re: Soft Half-Sinus Waves
Post by: WAS on February 21, 2020, 12:14:28 am
Thanks. It's a start. Really need to clean up the function network, it's a mess of tests.

I am still really interested in a working cos function.

I'm curious why, like in the example image, the basic setup doesn't seem to work in TG. It's just a normal Sinus Wave. The formula above seems to be pretty much exactly what we use for Sinus, but when I use a Cos, it's just a sinus wave.
Title: Re: Soft Half-Sinus Waves
Post by: Dune on February 21, 2020, 01:45:30 am
I always thought cosinus was just a sinus with another phase.

Here's some stuff I did quite a while ago, just by twist and shear, like I explained. I don't think it needs to be very complicated (can even be done by some stretched perlin), though a real curling surf does need more math, which is beyond me.
Title: Re: Soft Half-Sinus Waves
Post by: WAS on February 21, 2020, 02:39:47 am
I imagine the render time could be better considering fuzzy zones and exaggerated twist and shear. A vector alone may be faster. And I feel it's not as complicated as you think. The formula just isn't working in TG from many attempts I tried. Though you can enter it in a graph calculator and see it works. And it should be no different than a sinus from what I see, so no more complicated, in fact less post work on the function, so in the end less.

Love your remnant beach foam. Struggling there myself. A half sinus would also make that easier.
Title: Re: Soft Half-Sinus Waves
Post by: Valri on February 24, 2020, 09:40:11 pm
Quote from: Dune on February 21, 2020, 01:45:30 amI always thought cosinus was just a sinus with another phase.

Here's some stuff I did quite a while ago, just by twist and shear, like I explained. I don't think it needs to be very complicated (can even be done by some stretched perlin), though a real curling surf does need more math, which is beyond me.
Wow! All that water looks great!
I myself still have yet to figure out how to create a global ocean on any given planet without it interfering with the terrain let alone waves, anyone knows how to do that? I feel I am missing something here? I'v tried the "lake" option but that can only be made so big before Terragen just crashes, and using the surface node with a water node inputted into the "child" input is not quite working either.
Title: Re: Soft Half-Sinus Waves
Post by: WAS on February 25, 2020, 01:52:00 am
Quote from: Valri on February 24, 2020, 09:40:11 pm
Quote from: Dune on February 21, 2020, 01:45:30 amI always thought cosinus was just a sinus with another phase.

Here's some stuff I did quite a while ago, just by twist and shear, like I explained. I don't think it needs to be very complicated (can even be done by some stretched perlin), though a real curling surf does need more math, which is beyond me.
Wow! All that water looks great!
I myself still have yet to figure out how to create a global ocean on any given planet without it interfering with the terrain let alone waves, anyone knows how to do that? I feel I am missing something here? I'v tried the "lake" option but that can only be made so big before Terragen just crashes, and using the surface node with a water node inputted into the "child" input is not quite working either.

A sphere set to the planet location, than set to the planets radius with a water shader as it's shader works good. Just be sure to disable shadows in the sphere object.

Global surf zones may be possible and look decent from orbit, and would probably be the most realistic as you're so far you shouldn't be seeing waves really unless suborbital. I could do an example in the morning.
Title: Re: Soft Half-Sinus Waves
Post by: WAS on February 25, 2020, 02:03:15 pm
Here's an exaggerated example of kinda global surf zones. The issue with this approach is lakes get it too, which, for small lakes, doesn't look right.

Inside the Ocean Sphere internal network, the Surf Zone Spread Mask controls the spread, currently it's set to-1000m in Black Point which pushes the spread further out into the water. The White Point is set to 300 to soften the edges. The mask shores surface layer may not be needed. I tried to see if it would mask out some of the lake issue but would probably need a different version of the terrain to work from as a scalar.
Title: Re: Soft Half-Sinus Waves
Post by: Valri on February 27, 2020, 12:20:09 am
Quote from: WAS on February 25, 2020, 02:03:15 pmHere's an exaggerated example of kinda global surf zones. The issue with this approach is lakes get it too, which, for small lakes, doesn't look right.

Inside the Ocean Sphere internal network, the Surf Zone Spread Mask controls the spread, currently it's set to-1000m in Black Point which pushes the spread further out into the water. The White Point is set to 300 to soften the edges. The mask shores surface layer may not be needed. I tried to see if it would mask out some of the lake issue but would probably need a different version of the terrain to work from as a scalar.
I'll take a look at your .tgd file and see what I can learn from it! I might find what I have trying to figure out all these years!