Jump to content

How to move/translate primitives by attributes to World XYZ = 0


GreenAvoy

Recommended Posts

Good day everyone!
 I been stuck for a while with a simple task, such as to move all of primitives, which has attribute "class" (cause primitives separated from each other threw "connectivity" node for later use as pseudo group) to World Coordinates XYZ = 0, 0, 0.

 Does anybody know how to solve that? Especially helpfull will be solution threw SOP nodes or VOP nodes. VEX welcome as usual, but can this problem be solved without scripting by the same time?
 Thanks :)
 

Edited by GreenAvoy
Link to comment
Share on other sites

Okay - I solved it. Thing is that you need to use third input of "Transform Pieces" node. First input for that do you want to transform (it could be multiply objects). Second input - points, to where you need to relocate your staff from 1st input. And third input I used to move all of my primitives (which I use for 1st input) to locate at the points of third input.
 Pic is attached:

A1.png

Link to comment
Share on other sites

simplest way is probably to pack the geo and attribwrangle @P = {0,0,0};

edit: another way without VEX and packing could be to loop over prims by "class" and in the loop a simple transform with -$CEX, -$CEY, -$CEZ as transform and $CEX, $CEY, $CEZ as pivot

Edited by 3dome
Link to comment
Share on other sites

7 minutes ago, 3dome said:

simplest way is probably to pack the geo and attribwrangle @P = {0,0,0};

edit: another way without VEX and packing could be to loop over prims by "class" and in the loop a simple transform with -$CEX, -$CEY, -$CEZ as transform and $CEX, $CEY, $CEZ as pivot

Thanks for reply!
 Unfortunately I found that with VEX at the current moment I cannot deal at all. Even with expressions. Everything except nodes gives me really hard to understand. I can only copy-past any code. That's why I try to avoid VEX but using only nodes (VOP). Trust me - it's a nightmare...

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