Jump to content

DOP group exprresion


John Svensson

Recommended Posts

I'm working on a setup where a couple of polygon curves simulated and breaking apart using a wiresolver and a sopsolver.

I've only one wire object and would like to group the wires in that object that are broken so I can apply a force to them.

I'm using a group DOP node and in the Group 0 Expression I've this expression

 

prim("..:wireobject1/Geometry", $OBJ, "broken", 0) == 1

The setup works so far so that when prim 0 "broken" attribute evaluates to 1 all the wires belongs to the group and get the force. So I guess it's the $OBJ I'm using incorrectly. It evaluates to 0 because the wireobject1 is the only object in the DOP network.

So how do I access each primitives primnum in DOP? If it's even possible to group primitives belonging to one object like this?

Is there another way to create DOP groups? Would like to have something like a Geometry Wrangle with a create setprimgroup expression.

Thanks!

/ John

Link to comment
Share on other sites

6 hours ago, John Svensson said:

 


prim("..:wireobject1/Geometry", $OBJ, "broken", 0) == 1

The setup works so far so that when prim 0 "broken" attribute evaluates to 1 all the wires belongs to the group and get the force. So I guess it's the $OBJ I'm using incorrectly. It evaluates to 0 because the wireobject1 is the only object in the DOP network.

So how do I access each primitives primnum in DOP? If it's even possible to group primitives belonging to one object like this?

Is there another way to create DOP groups? Would like to have something like a Geometry Wrangle with a create setprimgroup expression.

 

IMHO, $OBJ is local variable for any dop object's position in current order of dop objects being processed.

I could be wrong but don't think its possible the way you are wanting it. However, Individual dop objects can be part of multiple groups.

Here is a rather simple way to split single wire in to multiple pieces / groups and control forces on them.

wire.gif.ed5dddcd8908f8446c4999e3d3981aa1.gif

wireGrp.hipnc

Cheers !

Link to comment
Share on other sites

Thanks for your reply. Didn't know that you could use pop forces with the wire solver. Thought they where only valid for pop and bullet. That alone probably solved my problem, then I can do all kind of filtering with the "use VEXpression".

What I don't understand is when I try to use a wind force instead of the pop force that has the group expression, with the same group expression, it doesn't work. Why is that group expression only valid for a pop force and not a wind force?

I guess DOP groups are different then SOP prim & point groups... And, it feels like I'm missing something.

Thanks anyway, you solved my problem.

/ John

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