MENOZ Posted November 24, 2012 Share Posted November 24, 2012 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! Quote Link to comment Share on other sites More sharing options...
DanBode Posted November 26, 2012 Share Posted November 26, 2012 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. Quote Link to comment Share on other sites More sharing options...
MENOZ Posted November 28, 2012 Author Share Posted November 28, 2012 hey thank you. I was thinking about using point clouds, but i didn't think to use the point cloud import by index. I will try that. Thank you! Quote Link to comment Share on other sites More sharing options...
DanBode Posted November 28, 2012 Share Posted November 28, 2012 Good luck! Point Cloud Import By Index and Point Cloud Num Found are two of my favorite additions in Houdini 12. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
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.