grouping in dops

   6464   7   2
User Avatar
Member
88 posts
Joined: March 2006
Offline
I can't remember how I did this before but I want to group all the fracture objects that receive the impact data from a collision event into a group so I can then apply gravity to them.

Can anyone help?
User Avatar
Member
242 posts
Joined: Jan. 2008
Offline
bobster
I can't remember how I did this before but I want to group all the fracture objects that receive the impact data from a collision event into a group so I can then apply gravity to them.

Can anyone help?
I´m not infront of Houdini so there might be some misstake here, but..

You can use a modify data DOP, put dophassubdata($DOPNET,$OBJID,“Impacts”) in the activate parm. Set to boolean with value 1 and name the data something funny.

In the group node expression put dopoption($DOPNET,$OBJID,“Position”,“your funny name”)

This will group every object ever had Impacts data.
User Avatar
Member
1907 posts
Joined: Nov. 2006
Offline
I built a DOP that did this years ago but can't seem to find it.

You should be able to just use a Group DOP, set the mask to be something that will be valid for your fractured objects, and set the expression to be something involving dopnumrecords().

dopnumrecords(“/obj/dopnet1”, $OBJID, “Impacts”, “Impacts”)

That way when it processes an object in your mask, if that object has impact data, the number of records will be > 0 and the expression will be true, thus causing that object to be added to the group.
Graham Thompson, Technical Artist @ Rockstar Games
User Avatar
Member
242 posts
Joined: Jan. 2008
Offline
graham
I built a DOP that did this years ago but can't seem to find it.

You should be able to just use a Group DOP, set the mask to be something that will be valid for your fractured objects, and set the expression to be something involving dopnumrecords().

dopnumrecords(“/obj/dopnet1”, $OBJID, “Impacts”, “Impacts”)

That way when it processes an object in your mask, if that object has impact data, the number of records will be > 0 and the expression will be true, thus causing that object to be added to the group.

Wouldn´t that just create the force on collision? Next step you might be out of the group and left with only the initial force.

With the modify DOP it will stay in the group untill “manual” reseted.
User Avatar
Member
1907 posts
Joined: Nov. 2006
Offline
Yep, that's right. My quick example only works for instantaneous impacts. You are correct that if you want preservation you need to attach some extra data to keep track that there was an impact.

I was able to find my old asset but it is in need of some rewriting and stuff so I won't post it right now. It handles both instantaneous and preservation conditions, as well as more advanced masking options such only grouping when certain objects impact certain other objects.

Sorry for the confusion.
Graham Thompson, Technical Artist @ Rockstar Games
User Avatar
Member
88 posts
Joined: March 2006
Offline
Thank you. Works like a charm. :wink:
User Avatar
Member
230 posts
Joined: Oct. 2009
Offline
I am trying to achive the same thing, to group based to the impact and preserve the group but i think I am doing something wrong by following your instructions. Is it possible to help me?

I have attached a test hip

Cheers

Attachments:
impact.hip (183.6 KB)

User Avatar
Member
731 posts
Joined: Dec. 2006
Offline
Have you considered just gluing your RBD fractured object to a null object (with an RBD state node appended setting always to zero the P,R, and V), and using the glue strength in your fractured object to have it break off on impact and thus be affected by gravity?
Sean Lewkiw
CG Supervisor
Machine FX - Cinesite MTL
  • Quick Links