Planetside Software Forums

General => Terragen Discussion => Topic started by: cyphyr on January 17, 2018, 04:50:11 AM

Title: Too Smooth voronoi 3D cell scalar
Post by: cyphyr on January 17, 2018, 04:50:11 AM
Is there any way to alter the sharpness of a "Smooth voronoi 3D cell scalar"?
It's very useful to have the soft change between voroni cells but sometimes (often) it is too soft.
Title: Re: Too Smooth voronoi 3D cell scalar
Post by: Hetzen on January 17, 2018, 08:21:02 AM
Yes I think there is. I was playing with this a while back. I need to get on a machine when I get in the office to check a few things before I give out a clip file. I just need to confirm that cell noise and smooth cell share the same base pattern.

The principle is to extract the difference between the two noises, apply a gain curve then apply that to the hard edged cell noise.
Title: Re: Too Smooth voronoi 3D cell scalar
Post by: cyphyr on January 17, 2018, 09:17:43 AM
Excellent, thankyou.
Yes, cell noise and smooth cell noise do indeed share the same base pattern.
I was trying to "tighten" up the smooth noise and getting nowhere lol
The reverse looks a better way to go.
I've extracted the difference (twice!)
Subtracting the cell noise from the smooth cell noise gives a different result from subtracting the smooth cell noise from the cell noise. So I did both and combined the result ... that's where it all starts to go wrong ... I can't seem to find a way of properly combing them that gives a result I can work with further.
Scratches head ...
Title: Re: Too Smooth voronoi 3D cell scalar
Post by: Dune on January 17, 2018, 10:25:12 AM
That would be cool, Jon! I asked for this a while ago, but never really got any reply. I thought softness was baked in.

Mixing stuff is always hard as you very soon get very narrow differences and thus strange displacements.
Title: Re: Too Smooth voronoi 3D cell scalar
Post by: Hetzen on January 17, 2018, 10:28:59 AM
Well here is the clip file. I wouldn't say it's a success, we still get some horrible stretching at the mid point of the transition. There maybe a better method other than using the Gain scaler.

Tightness of 0.45
[attachimg=1]


Tightness of 0.2
[attachimg=2]
Title: Re: Too Smooth voronoi 3D cell scalar
Post by: Hetzen on January 17, 2018, 10:44:19 AM
This version uses a Bias curve instead. Still getting stretching at the mid point, plus some displacement naughties.

[attachimg=1]

It maybe a case of applying the difference to the Smooth cell, but not as it's set up in these clip files. Needs more thought if it is indeed possible.
Title: Re: Too Smooth voronoi 3D cell scalar
Post by: cyphyr on January 17, 2018, 10:48:17 AM
Thanks, this looks useful, I shall experiment :)
Title: Re: Too Smooth voronoi 3D cell scalar
Post by: cyphyr on January 17, 2018, 10:54:50 AM
I think the sharp edges/stretches may be because of the difference between subtracting the cell noise from the smooth cell noise and subtracting the smooth cell noise from the cell noise.
See below.
I'm trying to combing the result of the two so I can fed it into the Add scalar but all I get is BLACK.
Title: Re: Too Smooth voronoi 3D cell scalar
Post by: Dune on January 17, 2018, 12:06:56 PM
I think Matt needs to take a look at the functions, maybe he can change the whole thing from the start to a smoother voro.
Title: Re: Too Smooth voronoi 3D cell scalar
Post by: cyphyr on January 20, 2018, 05:26:17 AM
... or I could just subtract a Voroni 3D diff scalar ... achieved pretty much the same effect ...
Sometimes I miss the obvious solution hehe
Title: Re: Too Smooth voronoi 3D cell scalar
Post by: Hetzen on January 20, 2018, 10:13:59 PM
The problem with difference voronoi is that the edges always resort to black, so you don't get transitions from neighbour cell grey values. Ie you don't get a slope from one cell's grey value to the next cell's which smooth voronoi does.

Ideally Ulco is right, it would be great to have an extra input on the smooth voronoi to control the steepness between cell grey values. It's a nice noise to use as is, but can look soft as you've found.

I'd be interested to see some of your test renders of the plain noise to see what you've done.
Title: Re: Too Smooth voronoi 3D cell scalar
Post by: cyphyr on January 21, 2018, 05:25:38 AM
Yes you're right, this way each cell comes from a black (zero) base line but you can control the falloff to the baseline very easily with a colour adjust shader.
As Ulco mentions, yes more control within the Voronoi shader would be ideal (as would more noise flavours ... very old request :D)

I imagine there should be a way of combining the falloff to black with a variable falloff to grey but I can't figure that out but this is good enough (just) for my current needs.
Title: Re: Too Smooth voronoi 3D cell scalar
Post by: KlausK on January 21, 2018, 08:36:32 AM
Thank you for this.
Cheers, Klaus.
Title: Re: Too Smooth voronoi 3D cell scalar
Post by: bobbystahr on January 22, 2018, 10:12:36 AM
Great thread, off to study the results; thanks very much Jon and Richard.