Yes, I'll have a Slice'o'Voronoi!

Started by terp, June 17, 2022, 04:21:10 PM

Previous topic - Next topic

terp

Hi all.

I'd like to make a 2D Voronoi pattern...one that doesn't change shape as y-value/altitude changes.
Is it possible to slice a 3D Voronoi at a certain y-value/altitude to get what we want?

The preview window for Voronoi shows a slice based on Y value...it must be possible!   :)

I see all of those tasty blue nodes out there, like get_position and get_altitude.
Can someone help me out with the combination of these nodes to get what I'm looking for?

Thanks!
Terp

Dune

One thing that you could do is stretch the voronoi on Y immensely, so there would be extremely little difference between altitudes. 
This is the basic setup from blues for voronoi, but you may already know that.

mhaze

You should note however, that you only get real stretching on near vertical surfaces.

Matt

I would use a Build Vector node: https://planetside.co.uk/wiki/index.php?title=Build_Vector

Build Vector can be used to modify an input vector, not just build a vector from scratch. You can use this to set the Y component of your position vector to any value you like (e.g. 0), while passing through the X and Z components, and that gives you your slice.

Get Position in Texture -> "Main input"
Constant Scalar -> "Y input"
Just because milk is white doesn't mean that clouds are made of milk.

terp

#4
Thanks all.

Dune, Thanks for that, that setup is similar to what I'm using.
I get scared to use huge numbers with TG, as, in my mind, it means TG has to do more calculations.
I'm working on an iMacPro and am always looking to keep overhead as low as possible.


Quote from: Matt on June 19, 2022, 01:50:19 PMI would use a Build Vector node: https://planetside.co.uk/wiki/index.php?title=Build_Vector

Build Vector can be used to modify an input vector, not just build a vector from scratch. You can use this to set the Y component of your position vector to any value you like (e.g. 0), while passing through the X and Z components, and that gives you your slice.

Get Position in Texture -> "Main input"
Constant Scalar -> "Y input"
Hey Matt - below is the setup I've been using to generate Voronoi shapes, plus what I *think* you are saying, but I'm missing something.
When I replace the Voronoi data being passed to the Build Vector node with a Constant Scalar value, it isn't passing any Voronoi information anymore.  I've tried all kinds of node combinations, but I don't "think in blue nodes" very well.

How would I assemble the node tree to pass the Build Vector node the "Voronoi-value at Y" instead of just a blanket Y value?

Terp

Dune

I think you should link the smooth voronoi to the input of the build vector, and not another get position.

Matt

Get Position in Texture
     |
    v
Build Vector
     |
    v
Voronoi



Just because milk is white doesn't mean that clouds are made of milk.

Matt

Just because milk is white doesn't mean that clouds are made of milk.

terp

#8
I feel asleep ruminating on whether or not there was a way to affect the Y after the voronoi node...hahahaha.  Thanks guys.
The more I'm exposed to these ways of [blue node] thinking the easier it will become to manipulate shapes to what I need.

T