How to fix point jitter after random delete in a sim
1588 4 1-
- SevaVFX
- Member
- 5 posts
- Joined: May 2019
- Offline
Hi there! Does anyone know how to fix point jitter after randomly deleting particles? I've attached a simple example. Basically I have a pop sim then I copied it to points and to avoid repetition I dropped down a wrangle and deleted particles randomly. Now they jump around. I found a solution when you scatter points and then use attribute interpolate but that does not work in this case.(Or maybe it does?)
-
- animatrix_
- Member
- 5100 posts
- Joined: Feb. 2012
- Offline
Hi,
Particles already have unique id values, you are overwriting them using point numbers which are changing after deleting points. Just use the id attribute directly:
Particles already have unique id values, you are overwriting them using point numbers which are changing after deleting points. Just use the id attribute directly:
Senior FX TD @ Industrial Light & Magic
Get to the NEXT level in Houdini & VEX with Pragmatic VEX! [www.pragmatic-vfx.com] https://lnk.bio/animatrix [lnk.bio]
Get to the NEXT level in Houdini & VEX with Pragmatic VEX! [www.pragmatic-vfx.com] https://lnk.bio/animatrix [lnk.bio]
-
- SevaVFX
- Member
- 5 posts
- Joined: May 2019
- Offline
-
- animatrix_
- Member
- 5100 posts
- Joined: Feb. 2012
- Offline
Then you can create a new unique id on the template points and copy those onto the copied points i.e. ptid. Combine both id values into a single integer using Szudzik pairing:
http://szudzik.com/ElegantPairing.pdf [szudzik.com]
http://szudzik.com/ElegantPairing.pdf [szudzik.com]
int szudzik ( int x; int y ) { return x >= y ? x * x + x + y : y * y + x; } int tmId = szudzik ( @id, i@ptid ); float tmVal=rand(tmId + ch("Seed")); if (tmVal > ch("Threshold")) removepoint(geoself(), @ptnum);
Senior FX TD @ Industrial Light & Magic
Get to the NEXT level in Houdini & VEX with Pragmatic VEX! [www.pragmatic-vfx.com] https://lnk.bio/animatrix [lnk.bio]
Get to the NEXT level in Houdini & VEX with Pragmatic VEX! [www.pragmatic-vfx.com] https://lnk.bio/animatrix [lnk.bio]
-
- SevaVFX
- Member
- 5 posts
- Joined: May 2019
- Offline
-
- Quick Links

