Jump to content

voronoi seed points


MENOZ

Recommended Posts

Hello people!

I was thinking if there is a way to use some scattered points ad "seed points" for the voronoi texture, basically the same thing that happens with the voronoi fracturing, but at shader level. I want to control the placement of the cells.

cheers!

Link to comment
Share on other sites

Sure, you can do this pretty easily with point clouds. I don't have time to make an example at the moment, but if you first write out a bunch of points to a .pc file (or .bgeo I guess but .pc is a little faster). In the shader throw down a "point cloud open" vop, point the file param to your .pc file, then make the radius really huge, and set the max points to 1. Take P from the global inputs, run it through a transform vop, to move it from current to object space, then pipe it into the P input on your "point cloud open". Pipe the handle output of "point cloud open" into a "point cloud import by index" vop, set the Channel to "point.number" and the signature to integer. This will grab the number of the point in your point cloud that is closest to the current point being shaded. To get the classic voronoi look, pipe that point number into a random and output a vector, and pipe that vector into Cf.

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...