5
$\begingroup$

enter image description here Hi all. I am attempting to instance 2 objects at the center of a plane using geo nodes. The suzanne will always be instanced, but the second object will be chosen randomly from a collection. My node setup should work, but does not.

enter image description here

Blend file

enter image description here Edit: If I use the vertices from the original mesh as instance points, I get random instances at those points. This is not acceptable for my application. Thanks.

$\endgroup$
2
  • $\begingroup$ Have you tried instancing both of them on a line instead? Or do you specifically need those seperate planes? $\endgroup$ Aug 10, 2023 at 15:28
  • $\begingroup$ I just tried with lines and found the same problem. thank you $\endgroup$ Aug 10, 2023 at 15:33

2 Answers 2

3
$\begingroup$

You use the same geometry node on 4 objects and they have the same seed value, so they are the same.

To fix this, you can generate random values based on the object position , but the seed will change when you move the object.

I'm not sure if it's possible to use object names or IDs. If yes, you may be looking for another answer.

enter image description here



There is another way

enter image description here

  1. Select the 4 objects in 3d Viewport in object mode

  2. Run the script in Text Editor to change the seed values.

import bpy
from random import randint

for obj in bpy.context.selected_objects:
    last_modifier = obj.modifiers[-1]
    last_modifier["Input_2"] = randint(0, 999999)

$\endgroup$
2
$\begingroup$

Ok so instancing both, the suzzane head and the objects in the collection on a line instead, I was able to get the following result. enter image description here

enter image description here

I wasn't quite able to understand what exactly was the problem with your situation. But I would guess that it has something to do with the fact that they are seperate objects. As I said, IDK.

$\endgroup$
2
  • $\begingroup$ Try with a single point, not 4 please. And then dupicate the object $\endgroup$ Aug 10, 2023 at 15:45
  • $\begingroup$ That is exactly what I think is causing the issue. But I am not completely sure. (Probably) The same random value is been applied to all the copies of that single. So every point will have the same instance. Maybe try changing the seed value for every single object by making the node tree a single user copy (Click the number beside the name). But if that works, it might be a bit inefficient. $\endgroup$ Aug 10, 2023 at 15:49

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .