Cycle scatter multiple objects. [SOLVED]

   3994   8   1
User Avatar
Member
39 posts
Joined: March 2020
Offline
What is the best way to scatter multiple objects in order. I've seen some examples of a random scatter and i tried to modify them in a way but i lack the VEX knowledge to do so.

I am also trying to make the process automatic. So the general idea is to combine several objects into an obj and use that obj as a source for objects for scattering.

So ... any tips ?
Edited by SnowballWar - April 27, 2021 15:12:08
User Avatar
Member
39 posts
Joined: March 2020
Offline
OK i am still struggling with this. I need to create staircase with different models for the steps and i need to place them and cycle them in order. I can only find random scatter online tutorials, but not for ordered. And i don't have the programing experience to make it work. Seems like a simple thing but i can't find a solution to it.

Attachments:
scatter.png (272.2 KB)
ScatterInOrder.hip (110.3 KB)

User Avatar
Member
201 posts
Joined: July 2015
Offline
There are tons of ways to do this. I've attached an example on how you could approach it.

The important factor is the "Piece Attribute" on the Copy to Points node which basically looks up the attribute on the points and tries to find the corresponding Objects with the same attribute value.

Attachments:
ScatterInOrder.hip (121.0 KB)
ScatterInOrder.png (123.6 KB)

Manuel Köster - Senior Technical Artist @Remedy Entertainment

https://www.remedygames.com/ [www.remedygames.com]
http://shadesoforange.de/ [shadesoforange.de]
https://twitter.com/ShadesOfOrange_ [twitter.com]
User Avatar
Member
39 posts
Joined: March 2020
Offline
Works for me now.
Thank you for the file and explanation.
User Avatar
Member
39 posts
Joined: March 2020
Offline
I am going to revive this topic because because i want to recreate the same functionality but for path deform. Basically i have a bunch of curves that i want to run trough "for each connected piece". And use a different model as a path deform for each iteration of the cycle. Basically the same functionality as above but for curves instead of points.

Here is an example:


So what i am trying to do is use the curves from pic 1 to create the result from pic 2. But use A and B ( or more ) instead of only B ( pic 2 is using only B ).

I am trying to create something like a modular fencing generator but it should be able to use more than one module.

Attachments:
Screenshot_1.png (357.9 KB)

User Avatar
Member
39 posts
Joined: March 2020
Offline
Ok i think i have found a solution that seems to be working. Will post it later.
User Avatar
Member
39 posts
Joined: March 2020
Offline
Well ... it works but there is one problem to which i can't find a workaround.
So basically what i did is
1.Took the shadesoforange file, automatized the id creation.
2.Put the copy to points and the wrangle node in a loop
3.Replaced the ptnum with loop iteration in the wrangle
4.Aligned the named models to the center and then path deformed them for each curve, and got the result i've wanted.



So the problem comes after i use copy to points. When i axis align it to the center, so i can use it for path deform, in some models it's not working because the axis shouldn't be in the straight middle ( pic A ) but after i align it it goes there ( pic B ). So basically i am trying to preserve the original alignment of the model but cant do it because it uses the copy to points node.

It's a bit confusing i know, but to simplify it - i just want to avoid using the copy to points node, but use the blast node instead. At the same time keeping the ordered functionality of the method shadesoforange posted.
Edited by SnowballWar - April 27, 2021 08:06:19

Attachments:
CycleBlastTFD.hip (310.5 KB)
Screenshot_1.png (644.3 KB)

User Avatar
Member
472 posts
Joined: July 2005
Offline
Hi,

I'm not sure, but it should work if all points (copytopoints) are zero. In attribwrangle3 set "@P = 0;" and turn off matchsize1.
User Avatar
Member
39 posts
Joined: March 2020
Offline
Yep. That's it. It works now. Thank you.
  • Quick Links