Particles passing through animated collider
1057 10 0- R_Stewart
- Member
- 56 posts
- Joined: March 2022
- Offline
Hello,
I've created a basic scene to show the problem I'm having. When static, the collider works just fine. When animated, the collider seems to not work at all. I saw a post about this with a flip sim that said I should compute velocity and increase substeps to help with an animated collider but this didn't work for my scene. The particles are still escaping.
I'm sure there is a simple fix for this. Please let me know!
Cheers,
I've created a basic scene to show the problem I'm having. When static, the collider works just fine. When animated, the collider seems to not work at all. I saw a post about this with a flip sim that said I should compute velocity and increase substeps to help with an animated collider but this didn't work for my scene. The particles are still escaping.
I'm sure there is a simple fix for this. Please let me know!
Cheers,
- Enivob
- Member
- 2537 posts
- Joined: June 2008
- Offline
- R_Stewart
- Member
- 56 posts
- Joined: March 2022
- Offline
Hi Evivob!
Thanks for looking into this for me. In the file you provided it looks like the particles are being spawned onto the inner surface of the collider rather than inside it and bouncing off it. I'd say this is from the "Invert Sign" setting which I believe should be off when the collider has thickness.
See my example here where I've added thickness and turned off Invert Sign. I really need the particle sim to look like this but have the particles stay inside the collider.
Thanks for looking into this for me. In the file you provided it looks like the particles are being spawned onto the inner surface of the collider rather than inside it and bouncing off it. I'd say this is from the "Invert Sign" setting which I believe should be off when the collider has thickness.
See my example here where I've added thickness and turned off Invert Sign. I really need the particle sim to look like this but have the particles stay inside the collider.
Edited by R_Stewart - Dec. 18, 2023 19:03:25
- vicvvsh
- Member
- 46 posts
- Joined: April 2016
- Offline
- tamte
- Member
- 8555 posts
- Joined: July 2007
- Offline
- R_Stewart
- Member
- 56 posts
- Joined: March 2022
- Offline
- R_Stewart
- Member
- 56 posts
- Joined: March 2022
- Offline
- R_Stewart
- Member
- 56 posts
- Joined: March 2022
- Offline
Hi Tamte,
I've uploaded a simple scene to match my project here. [drive.google.com]
If you have time please take a look and let me know how to keep these particles inside the collider. There is an .abc for the dancer which is the collider object.
Thank you sir!
RS
I've uploaded a simple scene to match my project here. [drive.google.com]
If you have time please take a look and let me know how to keep these particles inside the collider. There is an .abc for the dancer which is the collider object.
Thank you sir!
RS
- tamte
- Member
- 8555 posts
- Joined: July 2007
- Offline
the default particle radius for collision is 0.02 if you don't specify f@pscale, which you didn't
in your scene that's quite large, thicker than a finger
the first particles that leave the collider are from the chin, just because the inner mouth geo pushes on them from inside against the chin so something has to give
then they naturally escape through other parts when they get squeezed or pinched by geo smaller than the particle
so first of all add POP Property, enable Uniform Scale and set to smaller number like 0.002 or 0.001
then you can display particles as lit spheres or disc to see their scale
you will still get escaped particles especially through fingers as at some frames the fingers go through each other so if there are any particles they may be trapped and pushed out
so its important that your collider doesn't have penetrations and ideally no thin parts like folded eyelids etc, so you will need to create a better collision geo and cleanup the intersecting part of the anim if you want to rely on swept collision that surface collision method uses
also try not to subdivide your geo, its reasonably dense as is for detail it has so subdividing just unnecessarily slows it down
you can of course have additional wrangle that pushes particles inside of the collider's SDF, but for that you would again need to pay the price of generating SDF every frame, which you can of course cache
so if you can't cleanup your collision geo and animation that can be an option
in your scene that's quite large, thicker than a finger
the first particles that leave the collider are from the chin, just because the inner mouth geo pushes on them from inside against the chin so something has to give
then they naturally escape through other parts when they get squeezed or pinched by geo smaller than the particle
so first of all add POP Property, enable Uniform Scale and set to smaller number like 0.002 or 0.001
then you can display particles as lit spheres or disc to see their scale
you will still get escaped particles especially through fingers as at some frames the fingers go through each other so if there are any particles they may be trapped and pushed out
so its important that your collider doesn't have penetrations and ideally no thin parts like folded eyelids etc, so you will need to create a better collision geo and cleanup the intersecting part of the anim if you want to rely on swept collision that surface collision method uses
also try not to subdivide your geo, its reasonably dense as is for detail it has so subdividing just unnecessarily slows it down
you can of course have additional wrangle that pushes particles inside of the collider's SDF, but for that you would again need to pay the price of generating SDF every frame, which you can of course cache
so if you can't cleanup your collision geo and animation that can be an option
Tomas Slancik
FX Supervisor
Method Studios, NY
FX Supervisor
Method Studios, NY
- cncverkstad
- Member
- 117 posts
- Joined: Aug. 2017
- Offline
You need something Like This or?
You can isolate any group to name and bind in Code ,experiment with Code , use any pop Nodes ..
sep
project
You can isolate any group to name and bind in Code ,experiment with Code , use any pop Nodes ..
sep
vector avg ; int pts[] = nearpoints(0,@P,0.1); foreach(int pt;pts){ vector nearpos = point(0,'P',pt); vector d = @P-nearpos; float dist = length(d); dist = fit(dist,0,0.1,1,0); avg += normalize(d)*dist*dist; } //@v = 3 *avg/len(pts); //@P += @v *@TimeInc; //@v = 0;
project
int prim ;vector uv; xyzdist(1,'@name=gh',@P, prim,uv); vector nml = normalize(prim_normal(1,prim,uv)); v@nn = nml; @v += (@force)*@TimeInc; @v -= dot(@v,nml)*nml; //@v -= rand(@ptnum)*@v; @P += @v*@TimeInc; vector v = primuv(1,'v',prim,uv); @P += v/24.0; vector pos1 = minpos(1,'@name=gh',@P); @P = lerp(pos1,@P,ch('k'));
Conservation of Momentum
- R_Stewart
- Member
- 56 posts
- Joined: March 2022
- Offline
-
- Quick Links