Jump to content

RBD Fracture get seed from attr


nuki

Recommended Posts

Hi forum!

First post for me, although I've lurked odforce for a while. I am following a RBD tutorial by Steve Knipping and have a very basic question trying to improve this setup a bit. I am fracturing a pigHead and then copy it to Points to get more instances to shatter. I would like each copy to use a seed value added to the Points to drive the seed in the following scatter nodes. I was under the impression that I could set the fracture up once and then procedurally alter each copy, but I seem to be missing some obvious logic here. Should I use an HDA here?

thanks for your help!

rbdTest.hipnc

Edited by nuki
Link to comment
Share on other sites

Rather than trying to alter the seed for each shatter in a loop, how about you copy your objects to shatter to your template points first, then in a for/each loop shatter each copy individually? Since the volume noise you're using is based on global P, each copy will evaluate differently.

Check this example file.

rbdTest_toadstorm.hipnc

  • Thanks 1
Link to comment
Share on other sites

thanks for your help toadstorm! I had tried copying the pigheads before fracturing myself, but had trouble fetching the number of points fed into the copyToPoints node (it should be attr(".../box1", "@numpt") , right?). I needed this to adjust the amount of scattered points for n instances. Is there any reason you use vdbfrompolygons instead of isoffset apart from personal preference?

Link to comment
Share on other sites

The expression to get the number of points in the box would be npoints("../box1").

VDBs tend to be quicker to cook in most cases... I'm not sure how much of a difference they make in this particular example but it's worth a benchmark.

Edited by toadstorm
Link to comment
Share on other sites

thanks again toadstorm. I was playing around with this setup for a bit and found it more convenient to generate seconday debris by scattering additional points generated with voronoifracturepoints into a single voronoifracture, rather than using a foreach loop with a second voronoifracture. I was wondering which workflow is preferred in production?

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...