Jump to content
Sign in to follow this  
John Svensson

DOP group exprresion

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

Share this post


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

Share this post


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

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  

×