Jimbo55 Posted March 28, 2016 Share Posted March 28, 2016 Hello I am trying to effect the size of each piece of geo in the following image. I want each piece to be a random size, I feel like I'm almost there but am missing a bit of Hscript to do it. Any input would be great. Thanks in advance. For_each_Size.hip Quote Link to comment Share on other sites More sharing options...
jrockstad Posted March 28, 2016 Share Posted March 28, 2016 An alternative approach to something like this would be driving your fracture points with a Scatter SOP using a noise-based density attribute. If this isn't clear I'll see if I can prepare an example HIP for you later tonight. Quote Link to comment Share on other sites More sharing options...
Jimbo55 Posted March 28, 2016 Author Share Posted March 28, 2016 That would be great. Thanks jrockstad! Quote Link to comment Share on other sites More sharing options...
jrockstad Posted March 29, 2016 Share Posted March 29, 2016 (edited) I've attached a HIP file demonstrating the noise density technique. It's a very controllable and visual way of getting variation in your fracture, which is very important for voronoi-based fracturing given it's distinctive look. You might try something similar with the inside points if you want more variation there as well. Here's what I came up with for the ForEach solution: fit01(rand(opdigits(stamps("..", "FORVALUE",""))), 0.5, 1) Paste into Uniform Scale. This is basically retrieving the numerical suffix of each piece group and using it as the random seed. Hope that helped! fracture_density_noise.hiplc Edited March 29, 2016 by jrockstad Quote Link to comment Share on other sites More sharing options...
Jimbo55 Posted March 29, 2016 Author Share Posted March 29, 2016 Thanks Jrockstad This helps alot! Where did you pick this up? I've found plenty of info on how to use the copy sop with stamp functions but not doing this within a Foreach loop. Thanks again. Quote Link to comment Share on other sites More sharing options...
jrockstad Posted March 29, 2016 Share Posted March 29, 2016 Glad it helped! I discovered the opdigits() method in one of the ForEach example files. Launch the help browser from within Houdini, scroll down and for most nodes you'll find an Examples section where you can automatically load some small scenes demonstrating the functionality of that node into your current Houdini session. I should mention that in this case you could pare down that expression a bit and retrieve the exact same value just using stamp("..", "FORIDXVALUE", 0) but I thought the opdigits() trick was pretty neat so I figured I'd bring that to your attention as well. One more little note, just to clarify when I said you could perform something similar to the density-based scatter with your points inside the volume, the procedure is a little different. You would need to convert your geometry into a fog volume with an IsoOffset, then inside a Volume VOP multiply it by a noise. You can then feed the volume into a Scatter SOP with similar results - areas inside the volume with greater density will be populated with more points. Just make sure to leave the Density Attribute itself off though, as this is a point attribute that is not applicable to volumes and will cause the Scatter SOP to error out - in this case all the density information you need is in the volume itself. Quote Link to comment Share on other sites More sharing options...
djiki Posted April 10, 2016 Share Posted April 10, 2016 There is one more (for some scenarios) preferable way. By scatter node define relatively small number of points let say up to 5, then set those points represents places on your object where an other imaginary objects would hit. Those will be impact points. Then use VoronoiFracturePoints node for calculation of other points (which would be around those impact places and you can setup behavior of those impact places on surface, "under" surface, which radius will be affected, etc and all those will result in different size of pieces ) to feed VoronoiFracture. And you can use ExplodedView node to visualize separated pieces. Scene: http://wikisend.com/download/558338/VoronoiFracturePoints.hip 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.