Jump to content
Sign in to follow this  
nuki

RBD Fracture get seed from attr

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

Share this post


Link to post
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

Share this post


Link to post
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?

Share this post


Link to post
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

Share this post


Link to post
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?

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  

×