Filling volume recursively

   3115   4   1
User Avatar
Member
41 posts
Joined: Feb. 2014
Offline
Hello to all,

I did the following sequence with the help of a PythonSOP and Numpy. But the lack of proceduralism and interactivity (slider, buttons, switches) is killing me.

Does anybody have a hint on how to implement this with particles? Any suggestion are accepted

Each particle will split only to empty spaces. The problem lies in how a particle ‘knows’ if there is available space in the vicinity.

Attachments:
Recursion.gif (2.3 MB)

User Avatar
Member
257 posts
Joined: Nov. 2007
Offline
Perhaps a hint in terms of thinking about it differently:

How about starting with the filled up volume of points first, then having the outer points ‘snap’ to the closest inner points and doing that recursively until you have one point left. And then reversing the entire thing.

Depending on how complicated you want to make this, this is a kind of pathfinding algorithm.
The complexity will mostly come from the rules of splits and randomness that you want to use.

You should also search for ‘aggregation’ algorithms.

Doing it in pops is ok, but not necessary, personally I would do it in a sopsolver.
Cg Supervisor | Effects Supervisor | Expert Technical Artist at Infinity Ward
https://www.linkedin.com/in/peter-claes-10a4854/ [www.linkedin.com]
User Avatar
Member
41 posts
Joined: Feb. 2014
Offline
pclaes
Perhaps a hint in terms of thinking about it differently:

How about starting with the filled up volume of points first, then having the outer points ‘snap’ to the closest inner points and doing that recursively until you have one point left. And then reversing the entire thing.

Depending on how complicated you want to make this, this is a kind of pathfinding algorithm.
The complexity will mostly come from the rules of splits and randomness that you want to use.

You should also search for ‘aggregation’ algorithms.

Doing it in pops is ok, but not necessary, personally I would do it in a sopsolver.

Thank you very much for answering!

I already implemented the algorithm you described but I came out with an approach using a multidimensional Matrix (integer type):

-Where the position of each point is used as the index in the Matrix (point in x1, y-6, z5 = Matrix. I only iterate one time!.

-Then with a loop of depth 3 (wich each index is x, y, z in space) iterate each value in the Matrix, and to check the status of the neighbor point I just add or rest 1 to the current index (if I want to check the left neighbour of point I just call Matrix and if the point is green: normal = (-1,0,0), change the color to red and go to next point (if point = red check the right and so on).

-Then with a CopySOP -> translate sphere depending on the normal of the particle.

I was just curious if it was possible to implement this with particles. But given your experience I'm going to abandon that way.
User Avatar
Member
48 posts
Joined: June 2011
Offline
If you wanted a more organic, celular-division sort of effect, you could probably use POP Interact or Flock node to have particles move to maintain distance from each other, and then have particle birthing replicate existing particles… then the interaction would automatically move to separate them.

That would most likely make it look like a slowly growing blob-monster though :-)
User Avatar
Member
41 posts
Joined: Feb. 2014
Offline
danwood82
If you wanted a more organic, celular-division sort of effect, you could probably use POP Interact or Flock node to have particles move to maintain distance from each other, and then have particle birthing replicate existing particles… then the interaction would automatically move to separate them.

That would most likely make it look like a slowly growing blob-monster though :-)

I already tried that but the particles spawn in random direction, therefore interacting (bouncing) in random direction instead of left, right, up, … Do you know how to constrain the particle translation to left, right, up or down?
  • Quick Links