Does anyone know if there’s a way to get a random seed value per object, if they all share the same node tree? Currently I’m having to change the seed value manually for each object, which takes ages when you have lots of objects. Someone suggested using the object location to get different seeds, but there I run into the same issue as I’d have to manually change the object in the Object Info node each time (and create a duplicate of the node tree for each object). This also seems like a gap in functionality, that you can’t call the location of the current object without manually eye dropping it every time.
Object ID as seed*
I don’t believe there is a per object ID, just a per point ID, or mesh island ID, where do you retrieve this object ID?
Not quite, I need to be able to generate random seeds for existing, separate objects. So if I have Object.001, Object.002, Object.003 etc. with the same node tree, that node tree should automatically generate a random seed for each object. This feature would be very useful in quickly adding randomness to objects that share the same node tree.
Hum, for now it’s not possible to have an automatically varying seed. So you can’t duplicate an object and have a different result.
But you can expose the seed in the geometry node modifier , so by changing this parameter you’ll have another result.
Yes that’s what I’ve been doing, it just becomes incredibly cumbersome if you have dozens of objects that all need random seeds. Hopefully this feature will be added soon, I feel like it would be easy to implement whilst saving users a lot of manual work.
Reference a dummy object and set the mode to relative.
That’s a good idea but in practice Blender just ignores the location if you pipe it into the seed input (even if you compute the length first and convert that into an integer).
Subtract position from the empty objects relative location, this makes each vector unique in space.
Then I’ll get a per point random seed, because position references each point on the mesh, not each object. I need a single random seed for each object.
Maybe you can have a driver on an integer node that generates a per-object unique id through a scripted expression ? I’m not sure that would work
what if you generate a random number, then feed that in as your seed: Geometry Nodes - #3491 by SterlingRoth
I have been looking into that but was quickly discouraged by how complicated and hacky things got! It would be great if Blender had a built in rand() function that you could just stick in a value field.
Thanks that worked! One thing I had forgotten to do was set geometry to origin for all the objects, now the relative location is different for each and the randomisation works.
Does anyone have any ideas about my instancing on alembic issue? I’m pretty stuck until I can properly instance objects from my collection on the point cloud. If anyone feels like taking a look, here’s the alembic file I’m using: https://drive.google.com/file/d/1wL5Mex0hTFybfxM-l47rOzepu2OrcaX1/view?usp=sharing. I think the main issue is that points are deleted from the alembic; this issue doesn’t arise when I use an alembic where points are continually emitted and never deleted.
You can plug the “Distribute Points on Faces” “Seed” to the “Group Input” empty socket and control the seed for each objects directly in each Modifiers.
(You can see on my screen grab that the two upper cubes share the same seed)
For this you’d have to manually change the seed for each object. We need a solution where it works automatically based on some kind of object trait such as its position or ID.
Gonna paste this here for future reference: https://blender.stackexchange.com/questions/220721/how-can-i-get-a-new-random-seed-for-every-object-using-the-same-geometry-nodes
Would it be possible to find the current object ID using drivers?
AFAIK only with extending the driver namespace. Like done here to solve the same problem by adding a random function to the driver namespace. But this requires executing a script beforehand, which is not as elegant as it should be (Like for example getting access to self in the object info).
Without the extending procedure, you could just add up the xyz position and use that to calculate a seed by an driver. But if that is better as adding an empty depends on preference and use case i think.
Could you elaborate?
add x,y,z and index use as w