dopfield query

   4677   2   1
User Avatar
Member
34 posts
Joined: May 2007
Offline
Hello guys,

Have just come across a slight problem and wondered if anyone could help?

Im using a dynamic simulation and am referenceing some data in the simulation in a sop network using the dopfield() expression. If i use a single object in the simulation this works perfrectly by using rbdobject1 in the name parameter for the dopfield().

However, I was want to use an rbd fracture object in the simulation and need to access the data for each object.

Can anyone tell me how I can cycle through each object in the simulation in the sop network?????

Ive tried using $OBJNAME and $OBJID in the name parameters but this doesnt seem to work.

Thanks in advance for any help.
User Avatar
Member
387 posts
Joined: July 2005
Offline
Hi jimbob8s,

It really helps to be looking carefully at the “Details View” pane (hit Alt+4
to get this pane). The names in the left hand column are what you're
looking for. Alternately, if you're just “hacking” you can use an integer to
refer to each object (feeling lucky?).

This example was typed into the Houdini textport.
That is, instead of using the name in a dopfield expression, say:

-> echo `dopfield(“/obj/floor/dopnet”, “plank_0”, “Position”, “Options”, 0, “py”)`
-0.0099743

You might know your object ($OBJID) is number 3 (!) and so:

-> echo `dopfield(“/obj/floor/dopnet”, 3, “Position”, “Options”, 0, “py”)`
-0.0099743

But this is hackery alright.

I'm guessing that you haven't created group names for all your fractured
geom. This is done by appending a CONNECTIVITY SOP followed by a
PARTITION SOP to the sop-chain going into Dops. eg. Set “primitive” on
connectivity, and set Rule: CL_$CLASS on the Partition Sop.
MMB on the Partitiion SOP and you should see groups: CL_0, CL_1 etc.
I think there are some DOP's help examples which demo this.

With the RBD Fractured Obj DOP the group names become the dop object
names. That's how I get: plank_0, plank_1, etc etc. These groups can be
used on the output side of Dops.

If you get really stuck, you can also try building up the name by knowing
that the Connectivity Sop created a Primative Attribute (eg. “class”) which
you could get again via a prim() expression. eg:
“plank_`prim('../input_to_this_op', $PR, ‘class’, 0)`” where “input_to_this_op”
is a null sop parented to whatever sop you're using this expression in.
it's a bit crazy, but it works.

cheers,
ben.
''You're always doing this: reducing it to science. Why can't it be real?'' – Jackie Tyler
User Avatar
Member
34 posts
Joined: May 2007
Offline
thanks a lot ben.

That was really helpful.
  • Quick Links