Planetside Software Forums

Function Nodes In Practice => Function Node General Discussion => Topic started by: Hetzen on June 11, 2020, 12:06:42 pm

Title: Zoom and Bulge Texture - Clip File
Post by: Hetzen on June 11, 2020, 12:06:42 pm
There was a question if it was possible to warp a texture towards or away from a centre point in the main discussion forum and I thought I should post a solution here.

You can define the centre point, radius of effect, shift in scale, and bulge.
Title: Re: Zoom and Bulge Texture - Clip File
Post by: WAS on June 11, 2020, 12:40:01 pm
I can't seem to get this to actually do anything.

There seems to be no visible effect on the shader, changing bulge doesn't do anything. I don't see a pinch/push effect.

I remember you doing something similar for the radial effect on craters though that I used in my procedural craters rewrite.
Title: Re: Zoom and Bulge Texture - Clip File
Post by: Hetzen on June 11, 2020, 01:09:13 pm
I should have said that the Bulge has a range of 0 to 1.

0.5 being no pinching.

Zoom Bulge_c.JPG
Zoom Bulge_b.JPG
Zoom Bulge_a.JPG

The PF outside the group box is just an example pattern. If you want to use this, all you have to do is replace the input on the Warp Input shader.
Title: Re: Zoom and Bulge Texture - Clip File
Post by: Dune on June 12, 2020, 02:26:49 am
Interesting, Jon, thanks a lot!
Title: Re: Zoom and Bulge Texture - Clip File
Post by: N-drju on June 14, 2020, 07:46:54 am
Ooooh, yes. That will be very useful.
Title: Re: Zoom and Bulge Texture - Clip File
Post by: WAS on June 14, 2020, 01:53:16 pm
Huh. Can you share a working project file without importing?

I still can't get it to work. It just breaks the PF completely.

This is your basic setup, just changed bulge to 0.1 to find that effect you showed. It was just noise. So I increased scale of PF to 10 instead of 1 and noise to 1.5 instead of 5, and it still just makes the PF noisey rough.
Title: Re: Zoom and Bulge Texture - Clip File
Post by: Hetzen on June 15, 2020, 09:37:16 am
I had a look this morning. Here's a scene with a few patterns to test.

The settings were extreme with the Scale Shift. It also works in the positive only, allowing the larger scale at the centre to decrease to a smaller scale at the radius. Unfortunately, not the other way round as you'd like in a cyclone, where the larger clouds on the outside get compacted into a tighter pattern.

To get it to work the other way round, we'd need to cheat it and 'steal' some texture, but I think that would lead to pinching at the centre.

It probably should be called 'Zoom Out and Bulge'.
Title: Re: Zoom and Bulge Texture - Clip File
Post by: WAS on June 15, 2020, 03:50:10 pm
Oh there we go! I'm still not sure what I was doing wrong.

This is really cool! Thanks for sharing.

Grid texture helps a lot seeing what's going on from a plane perspective.

PS; Your examples and logic have really helped me in Math by the way. Using blue nodes I have a interactive sandbox, and it's amazing. You and Terragen have probably helped with my math more than years of special education help in the area with my dyscalculia.
Title: Re: Zoom and Bulge Texture - Clip File
Post by: Hetzen on June 16, 2020, 06:30:09 am
Thanks Jordan. Terragen got me to re-learn my maths as well. Still learning too.

Yes it's a great test bed to try out ideas.