Jump to content

how to access point attributes in DOPs for a morph effect with a VOP F


Martin Schan

Recommended Posts

Hi guys,

this is what I'm after:

 

I wan't to build up a fractured ring around a static cylinder object. At the end, when the fractured pieces come closer to their end position I morph them into their final position.
 
To get interesting collision I tried to build that in DOPs. But I struggle at getting the desired goal position into VOP Force, to calulate the proper velocity for every point to reach it's final position.
 
The initial Geometry in DOPs has already a goalPos attribute, but I can't figure out how to access it. Import Point Atribute doesn't work at all in VOP Force, right?! So I tried to get the position from the TARGET Null with point() expression, which works on RBD Point Objects but not on Packed Primitives or RBD Objects. Some sort of referencing or match up problem I guess.
 
I'm sure there is a way to realize this with ease. Hopefully you guys can help me out. Thanks in advance.
 
Cheers
Martin
 
P.S.
DOPs are really frustrating for a beginner like me. I have experience in coding and such things and what I'm missing are real debugging options. I have a hard time to trace and fully understand what happens with the data at what point. Do you guys have any additional tips besides Geometry Spreadsheet?
How do you debug your far more complex DOP Networks?

Morph with VOPs in DOPS 03.hiplc

Link to comment
Share on other sites

The initial Geometry in DOPs has already a goalPos attribute, but I can't figure out how to access it.

One thing I can offer is that you can pass a full path to point to reference attributes. The colon : is a separator between the path and the records inside.

 

Place this code in an attribute wrangle.

string handle_path = "op:/obj/Morph_with_DOPs_Packed_Primitives:rbdpackedobject1/Geometry";
vector local_goal_pos = point(handle_path,"goalPos",@ptnum);
As far as debugging, I often split the 3D viewport Top/Bottom so I can watch the attributes change overtime as I scrub the timeline. Edited by Atom
Link to comment
Share on other sites

Thanks Atom for your reply. That is a useful expression.

 
I tested it on my Destination Pos Parameter and it reads out the goalPos on my packed Geometry. But the real problem isn't the access (and probably never was...my bad).
I tested the expression with the hardcoded goalPos of piece 10, which works. They move to that small tube. (see screenshot)
 
If I understand this correctly, according to the screenshot, the $OBJID or $OBJNAME can only give back 1 for a packed geometry. And are thus not useful for any cycling expression, right?
 
So what variable or method can I use to feed in a different value for every processed piece in that VOP Force Node? Any hints or advice would be appreciated.
 
A great weekend to everyone.

Morph with VOPs in DOPS 03b.hiplc

post-14152-0-30065000-1453487970_thumb.j

post-14152-0-53542600-1453488414_thumb.j

Edited by Martin Schan
Link to comment
Share on other sites

hey martin, 

hope I do understand you right.

you already have a goalPos attribute on the packed primitive. its just a matter of subtracting @P with @goalPos and setting the result as force.

the second part would be getting the rotations right.

 

a cheaper version would be starting as ring, setting goalPos to your startpos and then reversing that ;)

you dont have to fumble with rotations. and I am pretty sure it would look pretty similar

Link to comment
Share on other sites

Hi Sebastian,


thanks for your help. Your Setup really reads the goalPos. Yeehaa, great! :) So the solution is not to use a VOP Force but a POP VOP. How the heck could I have known that? The Bind node works and even the Import Point Attribute node.


To your proposal, to reverse the effect and start with the end position. I assumed it might look wrong or at least odd, especially for the first few pieces. But yeah definitely worth a try.


Thanks for the visualize node as well, pretty cool for debugging and just what I've been looking for. I even found a Print node for VOPs. Both work great together. It makes me wonder, why you never see those (freaking important) helper nodes in a professionell tutorial?!
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...