Jump to content

Scaling force influence based on particle age


draxysd

Recommended Posts

Hi everybody,

I want to have a bit of control over my simulations (in this case flip, but it would be good to have a general dop workflow).

I want to be able to apply a force based on my particle age (or in general based on a point attribute). What would be the best way to do this? I was thinking of fiddling with popwrangle. If this is the right way, do I affect the velocity or some other attribute of the points?

Thanks in advance

 

Link to comment
Share on other sites

Depending on the type of force you're after, you can make a "pop force", and affect the different parameters in there using VEXpressions if you'd like! 

for instance, to apply an upward force that increases as the particles get older...

force.y = @age * 0.1;

make sure you check the correct "VEXpressions" checkbox though. There's two in there, one for the direction and another for the noise parameters.

Link to comment
Share on other sites

Also, that's not to say you can't do similar things with POP Wrangles. You could write one, but you'd need to affect something like force or velocity .

For instance:

@force += set(0,@age*chf("mult"),0);

Would add to the force each frame the age of the particle * some multiplier value. Keep in mind @force is read automatically in DOPs by the popsolver and integrated into the sim, but if you wanted to do a similar effect in SOPs using a solver SOP, you'd need to do something like accumulate your custom force to the velocity (@v) and finally apply to the point's position (@P) (Look into Euler Integration if you're interested in that).

Edited by jamesr
  • Like 1
Link to comment
Share on other sites

Thanks for your reply James, very insightful stuff. How about affecting standard dop forces on a per point basis. One thing that comes to mind as a workaround is to make a volume from the attribute on each frame in SOP solver and use that as a mask for the DOP Force. Not as precise but if you don't have much particle interpenetration, should work. I just have to wrap my head around how to build this.

Edited by draxysd
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...