ObiNon Posted May 24, 2015 Share Posted May 24, 2015 (edited) Hi, I am trying to assign random geometry to particles for a debris. I have a system that is working using the particle $ID in the copy sop stamp (mygeo) and using that in my geometry file path to a geo cache. PATH : ../_glass/debris_lib/debris.`floor(fit01(rand(stamp("../copy1","mygeo", 0)), 1, 240))`.bgeo The problem is that when particles are getting deleted (i have a kill volume) the ID are getting shuffled and thus the geometry is changing on the particles. Can anyone tell me how to create an attribute on a particle that is basically a non changing particle id ? Thanks Edited May 24, 2015 by Mdonovan Quote Link to comment Share on other sites More sharing options...
Atom Posted May 25, 2015 Share Posted May 25, 2015 What if you don't kill the particles? Scale them to zero instead. Quote Link to comment Share on other sites More sharing options...
ObiNon Posted May 25, 2015 Author Share Posted May 25, 2015 That would work, I was just trying to be efficient. I figured that like like most simulation packages , Houdini would slow down once stray particles accused and got farther away from the main part of the sim. I am coming from Softimage I thought there had to be something similar to the 'set data' node. Quote Link to comment Share on other sites More sharing options...
br1 Posted May 25, 2015 Share Posted May 25, 2015 It's strange, the $ID should be preserved even when the particle dies, as stated in the docs : i@id Default is -1. A unique id for the particle that remains the same throughout a single simulation. Always use @id rather than @ptnum to avoid things changing when particles are deleted. Use findattribval() to look up the point number that corresponds with an id. Are you using id or ptnum in your copy1 node ? Quote Link to comment Share on other sites More sharing options...
ObiNon Posted May 25, 2015 Author Share Posted May 25, 2015 the stamp in my copy node is this ... fit01(rand($ID),0.08, .1) Quote Link to comment Share on other sites More sharing options...
wick3dParticle Posted May 26, 2015 Share Posted May 26, 2015 Your particle ID's are unique. Just like a social security number, they should not be switching when a particle dies. Check your system again. ~Ilan Quote Link to comment Share on other sites More sharing options...
Recommended Posts
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.