Jump to content
Sign in to follow this  
bentraje

[SOLVED] Inherit Position from the SOP level to POP/DOP level?

Recommended Posts

Posted (edited)

Hi,

1) I have an animated box with scattered points
2) They are a source of pop source simulation (for only 1 frame)
3) Pop source generates the particles but only based on the initial position. It doesn't follow the animated scattered points.
4) I tried using POP VOP but all the points are placed at the world origin.

You can see a video illustration of the problem below:


P.S. My use case for this is to control the movement of particles. So basically, I would want to switch the influence from my animated scattered points to the simulated popnet particles then back and forth.
Such as doing a morph of particles from one object to another.

Regards,
Ben
 

inherit_position_particles.mp4

Edited by bentraje

Share this post


Link to post
Share on other sites

Heyo,
I think I've got the setup working the way you wanted, though I must admit I am not entirely sure what you mean when you say "I would want to switch the influence from my animated scattered points to the simulated popnet particles then back and forth.". Also, in the future, a hip-file might be just as good or even better to attach to your post than an mp4 file ;).

I've set up two solutions in this, one in which the particles actually follow an animated source and one where one object "transforms"/"morphs" from one shape to another.
For the first solution, if I were to guess just based on the video you provided I'd say that maybe the "pop source" in your pop net is not set to "points"? That seemed to be all I had to do to make mine continuously spawn from the animated input. Also, just to avoid confusion on the input for this solution, the point deforming method there is just the way I do it, for this use case it is just overcomplicated and unnecessary but it is pretty efficient. As a quick explainer, it basically just converts the cube to a volume and scatters the points only on the first frame, then uses the animated cube to deform the scattered points to follow along with the animated geometry. This is just to prevent having to convert the box to a volume at every frame, saving some compute time. Again, for this it's overkill, so if you want you can just remove all of that.

For the second solution, I've just made the points seek out their corresponding point number on another piece of geometry and given them a force to go towards the point they found. Once they reach that point they stop. One quirk about this setup is that the goal geometry (the geo that goes into the second port of the popnet) has to have the same amount or more points than the points that go into the sim itself, if not there will be some points that don't know where to go and will travel to world zero. Of course, this can be fixed by changing some of the logic in the "Set Speed" pop wrangle, this was just my quick and kind of lazy fix. (Another note here is that to change the point count you'll probably want to change both the scatter nodes "Max Points" and the pop source's "Impulse Count").

Hope this can be of some use, good luck!

moving_pop_source.hiplc

  • Like 1

Share this post


Link to post
Share on other sites

Hi @underscoreus

Thanks for the file, interesting set-up specially the second one using attribute wrangle.
Really self-explain things rather than the built-in pop forces.

RE: has to have the same amount or more points than the points that go into the sim itself,
For this one, I guess we can set-up a separate ID based on modulo. For example, 500 points in Object A and 1000 in Object B.
It would be new_id = 1000 % 500 or something like that so the 1000 points will be mapped to 500 perfeectly.

RE: Hope this can be of some use, good luck!
It did. It works as expected.

Thanks again. Have a great day ahead! :)

  • Thanks 1

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  

×