Jump to content

CopySop with POPs. Triggering animation when the particle collides&#33


Recommended Posts

Hi there, i'm having a little fun with pop and copystamping.

I have a mesh not-animated and copied it into a POP network with colliding particles. I want to make a simple animation of it, but trigger it only when the template particle collides. Any tips on how to make it?

I thought i should use the Timeshift SOP and trigger it with an "if" statement based on, say, pstate (since it changes when particle has JUST collided and when it stops, which is my case, the particle stops after colliding). But i don't know then which time variable to use, since all of those are pop-independent ($F, $T) or only pop age dependent ($AGE, $LIFE).

Then i thought i could create a custom attributes thats created as 0 and, from when the particle collides, gradually increase it, then use it to drive the TimeShift; but also in this case, i don't know where to bang my head on.

Any headlights?

Thanks!

Link to comment
Share on other sites

you can add "hittime" attribute in Collision POP

then use that information to offset animation in Timeshift SOP

to be able to use $HITTIME variable in Copy SOP you need to add Attribute Create SOP after POP Network (point attribute "hittime", variable "HITTIME") and uncheck Write Values

then create stamp variable

something like $T-$HITTIME

of if($HITTIME==-1, 0, $T-$HITTIME)

then stamp this in Timeshift SOP in Time parameter (Method: By Time)

  • Like 2
Link to comment
Share on other sites

Clever, right. Thanks a lot, didn't think of using hittime subtracting it from time, wow.

Kudos!

EDIT: BTW, is creating a new attr out of pops a good way to make some attrs (like also PSTATE or such) accessible in the copysop? Thanks again!

Edited by Akabane
Link to comment
Share on other sites

i am using it all the time, I have not tested speed comparing to point() expression however

i am also used to append attribute SOP and delete all attributes i won't need then cache particle sequence to disk

then bring it back with File SOP and then Copy SOP or whatever

Link to comment
Share on other sites

  • 4 years later...

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