I'm manually placing copies of objects (ie at the /obj level) but need each to have some random stuff internally - spin axis etc. So each object needs a different seed value to work with internally (@ptnum has no relevance here
Houdini must use some kinda UUID-ish thing internally to refer to objects, so you can rename stuff and all the references across the scene are updated (right? Or does Houdini just do a global “search and replace” whenever you rename something?)
But I can't find any kinda unique number in objects' detail attributes.
Or do I just have to hash the objects' nodepaths and make my own? (I'd rather not if I don't have to: it'd be nice to be able to rename a node without it altering its unique seed)
Thanks - but I'm not sure how this helps. I'm using instancing, so these are basically just objects with a single point inside, referring to a disk instance. Not sure what the Assemble SOP would give me in this situation (unless you mean I should hash one of the attribs it generates?)
There's a lot of ways to do this, but let's say you have /obj/foo1 and /obj/foo2, etc. Inside each, you might have an attribute create node with this in it:
attribute: id
value: rand(opdigits(".."))
opdigits extracts the digits only from any node, thus geo1 and geo2 will have different id attributes
Edited by mrCatfish - 2019年4月2日 10:56:34
Sean Lewkiw CG Supervisor Machine FX - Cinesite MTL
howiem Houdini must use some kinda UUID-ish thing internally to refer to objects, so you can rename stuff and all the references across the scene are updated (right? Or does Houdini just do a global “search and replace” whenever you rename something?)
Nodes have an op id, but it is only unique within a given session. Reloading your scene in a new session will assign new ids. The node name is the unique identifier stored with the scene file.
One solution to your workflow that would allow renaming the nodes as you please, would be to create a shelf tool script that creates a geo node with your setup inside, and adds a spare parameter to the geo node. The script would then set the value to a random number such as with the python random module. You can drag a selection to your toolbar to create an initial tool starting point, and modify the script to add the spare parm/random number.