Change Active State of Fractured Object Pieces

   5038   6   1
User Avatar
Member
74 posts
Joined:
Offline
Hi all,

I have an RBD fractured object and I wand to change active state on the y- position of an another object!

I have inserted an Active Value node with the following expression:

if( $ty < ch(“../../grid_object1/ty”),1,0)

But I have no luck … cause of an undefined variable!!!

What is the local variable for the y position of the fractured pieces?

Or is my way the wrong way?

Thanks and greets
nico
User Avatar
Member
112 posts
Joined: Feb. 2010
Offline
I hope this file helps. I am using the scattered points for fracturing as reference. If grid passes above that point then that specific chunk gets activated.
I am using point expression in dops with one change instead of specifying the pt no (for exa $PT) I am using $OBJID-1 (-1 is to match pt no with obj id, see details view to find out objid of every object, it starts from 1 onward but our point number as input to voronoi fracture starts from 0 onward )

point(“/obj/sphere_object1/chunkcenters”,$OBJID-1,“P”,1)<ch(“/obj/grid_object_ACTIVATOR/ty”)

with “/obj/sphere_object1/chunkcenters” you will go to scatter points then with ‘$OBJID-1’ object you will look for that point no's y position (“P”,1) if it is less than grid's y pos then ‘$OBJID-1’ will get activated.

Attachments:
rbd_activation.hipnc (194.2 KB)

User Avatar
Member
74 posts
Joined:
Offline
Hi sadhu,

this is exactly what I searching for!

Thank you very much.

Greets
Nico
User Avatar
Member
74 posts
Joined:
Offline
Hi,
I tried with the principal of sadhu's scene to trigger a DOP object based on a point attribute!
It seem to work but I'm not able to sync the attribute with the right DOP object ….

see attached file …

Any help on what is going wrong?

Thanks
Nico

Attachments:
FallenStreet.hipnc (219.2 KB)

User Avatar
Member
74 posts
Joined:
Offline
O.K. - I have found the solution!

It was the activation expression … I have used first $OBJID+1 but right is $OBJID-1 - like sadhu mentioned before :-)
User Avatar
Member
242 posts
Joined: Jan. 2008
Offline
nicoM
O.K. - I have found the solution!

It was the activation expression … I have used first $OBJID+1 but right is $OBJID-1 - like sadhu mentioned before :-)

When using fractured objects every object is being “copied” into DOPS and also given a copy number. This is done in the same order as the pieces in voronoi SOP is created. So…

object0 = copynum 0
object1 = copynum 1
And so on…

Unless you are using clustering in the voronoi SOP or done anything else to change the order you can extract that data in the expression to find what point the object is created from…

In the file posted above, you can use…
point(“/obj/subnet1/box_object1/solver1”,dopoption($DOPNET,$OBJID,“CopyInfo”,“copynum”),“fallen”,1)

Its not that hard to find out the OBJID offset as you did, but it might be a bit boring as soon as you start putting more stuff into your sim.
User Avatar
Member
74 posts
Joined:
Offline
@mawi: thank you to take the the time to explain how things works ….
The houdini comunity is great!!

greets
nico
  • Quick Links