Planetside Software Forums

Function Nodes In Practice => Function Node General Discussion => Topic started by: WAS on January 07, 2020, 03:43:37 pm

Title: Warping Voronoi Scale
Post by: WAS on January 07, 2020, 03:43:37 pm
I wanted to share this file, as I remember I was having trouble with it. I wanted to warp the size, and shape of Voronoi via the scale input (so I could retain a inputable scale), but it was rather hard to get it to work with just a PF so I came up with this.

In this example the normally hard voronoi become more rounded, and the sizes more varied. The noise map is translated from 0,0,0 as for some reason the effect is radial.

The Colours of the PF are your "warper" intensities, further influenced by noise flavor, roughness, etc.

If you're wondering why I used a Multiply Complement Scalar, it's because this allows the colour inputs to act more like conventional intensity sliders. White being super warper, and black being less.
Title: Re: Warping Voronoi Scale
Post by: Hetzen on January 08, 2020, 01:31:47 pm
Good use of the Multiply Compliment Scalar. Can't say I've ever used it.

Yes you have to be quite delicate when warping the scale, there's some crazy effects you can do with it when it's right.

Another thought on your scale modulation, if you Multiply the PF with a Constant Scalar and Add to your Scale (50) instead, you can then keep the colours in the PF black and white (so you can preview) and you then adjust the new constant to set how much the PF influences the 50 value.
Title: Re: Warping Voronoi Scale
Post by: WAS on January 08, 2020, 02:05:47 pm
Quote from: Hetzen on January 08, 2020, 01:31:47 pmGood use of the Multiply Compliment Scalar. Can't say I've ever used it.

Yes you have to be quite delicate when warping the scale, there's some crazy effects you can do with it when it's right.

Another thought on your scale modulation, if you Multiply the PF with a Constant Scalar and Add to your Scale (50) instead, you can then keep the colours in the PF black and white (so you can preview) and you then adjust the new constant to set how much the PF influences the 50 value.

That's a great idea, I'll have to give that a go. Should make playing with intensity much easier.
Title: Re: Warping Voronoi Scale
Post by: WAS on January 08, 2020, 09:36:45 pm
Actually Hetzen there may be something you could shed light on. I tried initially using the perlin noise as my scale variation but it "seemed" liked no matter the intensity it was a mess of stretching and wild warps. I assume this is cause of the base noise of that function. Would this be the case, and is it possible to remedy that and use the perlin? I'd imagine this way you could divide/multiply the main voronoi scale as the perlin scale for warping at the voronois scale.
Title: Re: Warping Voronoi Scale
Post by: Dune on January 09, 2020, 01:30:53 am
If using a fractal, the sizes make the distribution of white/black, but high and low color need to be the scales. That's how I used it anyway.
Title: Re: Warping Voronoi Scale
Post by: Hetzen on January 09, 2020, 09:57:55 am
Quote from: WAS on January 08, 2020, 09:36:45 pmActually Hetzen there may be something you could shed light on. I tried initially using the perlin noise as my scale variation but it "seemed" liked no matter the intensity it was a mess of stretching and wild warps. I assume this is cause of the base noise of that function. Would this be the case, and is it possible to remedy that and use the perlin? I'd imagine this way you could divide/multiply the main voronoi scale as the perlin scale for warping at the voronois scale.

I think as a rule of thumb, the size of the warp should be less than the scale of what you're warping, otherwise you get 'pools' of noise where the PF has overlapped itself.

The Perlin Noise node outputs -1 to 1 so I'd imagine you're getting negative scale values if you plugged it in directly.

If you Multiply the Perlin by a 'variance' Constant and Add it to your general scale value, like I did above, you can vary it without it reaching zero or below. For example say your general scale is 50 and you want to vary that by +/- 10, then Multiply the Perlin (which outputs -1 to 1) by 10 and Add it to the 50. The range now becomes 40-60.
Title: Re: Warping Voronoi Scale
Post by: Hetzen on January 09, 2020, 10:27:57 am
Something else to be wary of.

Scaling works from the origin, so the further away you are from it, the effect will become more severe.
Title: Re: Warping Voronoi Scale
Post by: sboerner on January 09, 2020, 11:16:54 am
QuoteScaling works from the origin, so the further away you are from it, the effect will become more severe.
Could this be cancelled out by including the point position (draw a line from Get Position) into the calculation?
Title: Re: Warping Voronoi Scale
Post by: sboerner on January 09, 2020, 12:54:14 pm
Maybe something like this? The camera is now at scene origin and the transform node is disabled.

The PF settings are very touchy and it's easy to end up with something wonky or unusable.

Thanks for posting, Jordan. This will help with something I'm working on.
Title: Re: Warping Voronoi Scale
Post by: WAS on January 09, 2020, 01:04:03 pm
I already mentioned that Hetzen. It's actually Radial looking, especially if warping is high. But you WANT to move away from 0,0,0 otherwise you have a radial effect in your scene. Unless that's what you want.

Also don't think the warp should be smaller than the main scale as that will just yield rough lines between voronoi or circle warps. I was after warping the whole cells.
Title: Re: Warping Voronoi Scale
Post by: WAS on January 09, 2020, 01:12:39 pm
This is what I came up with before bed. Though had to re-render it out. I had my first frozen render window. Couldn't alt-tab to it or anything, and the render output was just white and black like an alpha almost.

These ones are more proportionally warped in size, leading to some small and large patches.

Note: PT was left on..was playing with the exaggerated surface detail.
Title: Re: Warping Voronoi Scale
Post by: Hetzen on January 09, 2020, 02:10:46 pm
Quote from: sboerner on January 09, 2020, 11:16:54 am
Quote from: undefinedScaling works from the origin, so the further away you are from it, the effect will become more severe.
Could this be cancelled out by including the point position (draw a line from Get Position) into the calculation?
The problem is, that that happens at every point the renderer looks at. So you would get the same value as if you had input a Constant Vector of (0,0,0) in the noise nodes position.
Title: Re: Warping Voronoi Scale
Post by: sboerner on January 09, 2020, 04:43:04 pm
QuoteThe problem is, that that happens at every point the renderer looks at. So you would get the same value as if you had input a Constant Vector of (0,0,0) in the noise nodes position.
Yes, I think I see that now. You're always at the center of the expanding universe. 


Too bad, because it makes this approach impractical for large areas.
Title: Re: Warping Voronoi Scale
Post by: WAS on January 09, 2020, 04:58:43 pm
Quote from: sboerner on January 09, 2020, 04:43:04 pm
Quote from: undefinedThe problem is, that that happens at every point the renderer looks at. So you would get the same value as if you had input a Constant Vector of (0,0,0) in the noise nodes position.
Yes, I think I see that now. You're always at the center of the expanding universe.


Too bad, because it makes this approach impractical for large areas.

I notice that a lot with what I want to do with function noises, limited to a small area or using transforms.
Title: Re: Warping Voronoi Scale
Post by: Dune on January 10, 2020, 02:20:25 am
The problem is that you can have different sizes from one setup, but they get warped right away. But it's interesting to play with, if you want weird shapes.
Title: Re: Warping Voronoi Scale
Post by: WAS on January 10, 2020, 01:18:45 pm
Quote from: Dune on January 10, 2020, 02:20:25 amThe problem is that you can have different sizes from one setup, but they get warped right away. But it's interesting to play with, if you want weird shapes.

That unhooked "try me" shader is quite interesting. I can imagein the floor masked out and used as detail for large rock outcrops.
Title: Re: Warping Voronoi Scale
Post by: WAS on January 10, 2020, 01:30:24 pm
You gave me another idea for varying up the scales, though it's very rough. But it doesn't seem to be radial.

A smooth transition between conditions would fix this, and actually open up a huge possibilities in function texturing. At least in my opinion. Could this be achieved vanilla, or would Matt have to intervene on the code level? If you use a soft perlin, it works, but still a hard switch, and more wispy/warpy which is why I stuck with the voronoi.
Title: Re: Warping Voronoi Scale
Post by: Dune on January 11, 2020, 03:18:56 am
Yes, too bad about the hard 'overlayed' parts. But there might be ways...