Jump to content

Update RBD goal in DOPs


Pancho

Recommended Posts

In order to make my RBDs follow a deforming mesh I need to update the constantly changing goal position. I guess I need to do this in the DOP itself, since the packed geometry doesn't seem to transfer this update into the DOP by itself.

Each packed RBD object has its own goal which I assign inside a attrVop by comparing IDs of two scattered point clouds with the same number of points. I guess I need to do something similar inside the DOP. Is this they way to go?

 

Cheers

Tom

Link to comment
Share on other sites

Not sure I understand your issue, but, can't you use pops? Packed geo behave much like points and with pop dops you can control movement much finer

Although I'm curious why would you do a rbd simulation of something you want to follow some arbitrary path, isn't that a little counter intuitive? 

 

 

Link to comment
Share on other sites

In this case I want to make the RBD follow the point positions on a mesh. But not in the way that they stick to the mesh, but are attracted to the points by force.

A practical example could be to advect the RBD to particles inside of a flip simulation in order to achieve a sim which behaves like a fluid sim, but consists out of RBD objects.

Link to comment
Share on other sites

Thanks for the tip with the popAttractNode.

But my problem remains. How do I alter an attribute inside of a dop network which depends on something outside of the dop network. I need to import the geometry, but already fail here. In my inital SOP for the RBDs I assign my goal inside of an attrbuteVop. Import Point Attribute with OpInput2 for file and ptnum as ptnum. Bind to assign it.

Although there is a popVop inside of the dopNetwork it lacks the possibility to plug in a second input. If I try to use the ImportPointAttribute and set file to something like /obj/rbd/OUT_goals then the imported P attribute turns out to be 0,0,0. So I guess this doesn't work.

So, how do I import the data correctly and assign it to the particles/packed objects?

 

Cheers

Tom

Link to comment
Share on other sites

if you have something connected to the second input of your Dop make sure that on the Pop Vop > Inputs Tab > Second Context Geometry is selected. 
If you want to change a value add subtract, etc you need to use a Sop Solver just in case.

 

Edited by Sepu
Link to comment
Share on other sites

I typically use PopSteerSeek and just use VEX to overwrite the goal variable with location of my goal for each particular point. This require a goal vector to be assigned to each point but it does simplify seeking. Then you can use  the braking controls to adjust how each point arrives.

goal = set(v@goal_location[0],v@goal_location[1],v@goal_location[2]);

 

  • Like 1
Link to comment
Share on other sites

Thanks so much, guys! When I dissected the PopSteerSeek I came across the POP VOP in the network and realized that the other inputs are "hidden" and not on top of the node. So, specifiying a SOP path pointing to my object was good enough to use the import point attribute inside of of the POP VOP.

Man, I didn't see the woods because of all the trees. : )

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