Jump to content

Object Stacking through Vex


noc2

Recommended Posts

Hi;

I have a bunch of objects I'm trying to stack on top of one another through the use of wrangles within a for-each loop. Just like the copy and transform node gives it's copies a “copynum” identifier on their primitives, I did the same through the connectivity sop. Then I fed the result into a for-each loop that loops though pieces using “copynum” as the piece attribute.

What I wanted to do through Vex but got bogged down is:

1- Take the y bound of the first object and add it to the @P of the second one.
2- Take the y bounds of the first and second object, add them and add the result to the 3rd object.
3- And go on with as many objects there are as defined by copynum.

I would appreciate it a great deal if someone could take the time to take a peek at my file and give me an idea.

Thanx in advance;

AJ

AJ_Object_Stacking_Vex.hipnc

Edited by noc2
Link to comment
Share on other sites

behold...the Pig God

(yeah well...I did it with a VEXpression preset, naturally called Stack I did awhile ago...you can change the Axis in the Point SOP to 0, 1, 2 for instant gratification)

(You won't find this preset 'installed'...SESI didn't like this enough from me I don't think)

And I just noiced a slight little technical detail, my transform after the loop is to correct 1st offset in Y axis, if you change the Axis to X or Z in the point SOP, you'll notice the transform not doing it's job...small detail, no one will notice !!!

PigGod.jpg

vu_Stacker.hipnc

 

 

Edited by Noobini
Link to comment
Share on other sites

Cool Noobini thank you so much :) :) Yet, Vexpressions are really elusive to me (at this stage maybe :)) I'll go through yours and try and port it to vex (fingers crossed, although not so hopeful :-/ ) And I'll definitely check out your vexpressions topic, looks highly interesting. 

Lotsa Cheers :)

 

AJ

Link to comment
Share on other sites

Wow... Thanx so much kfu. There's truly so much to learn from power users. I got stuck at trying to figure out a way to compare the current iteration with the previous one and now I can see the light :) Thanks again for taking the time to help out a fledgling user :) And I should also thank Noobini once again. I subscribed to his YT channel.  

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