Jump to content

Assigning random geo to particles


Recommended Posts

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 by Mdonovan
Link to comment
Share on other sites

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.

Link to comment
Share on other sites

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 ?

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