1

I'm trying to make a Collection Instance asset that contains objects with Geometry Nodes, and be able to have parameters on the Collection Instance affect the Geometry Nodes.

For example: I have an object with Geometry Nodes. That object is in a Collection, and that Collection is then instanced multiple times in the scene. The Geometry Nodes contain a Transform node, and I want to expose the Rotation on that Transform in a way that I can have the Rotation be customizable for each Collection Instance.

By comparison, I know it's possible to do this sort of thing in Materials, by using the Attribute node with the Type set to "Instancer". This will receive Custom Properties set on Collection Instances, and can be used to drive things like per-instance colors, offsets, etc. I'd like to do something similar for a Geometry Nodes property.

I know that there are a couple ways to set properties on the individual Object: I can use the Group Input on the Geometry Node to expose and set the Rotation value (it shows as an input or parameter on the Geometry Nodes modifier), and I know I can attach a Driver to that and link it to a Custom Property, but only (as far as I know) one on the Object itself, or on a specific other object. What I can't find out, though, is how to somehow link an Instancer property (likely a Custom Property from the Collection Instance) to that Geometry Node input-- be that directly, or via something such as a Driver. (If there's something obvious in Drivers I'm missing, that may well be it. I'm not all that versed in Drivers.)

Since I want to make this a reusable asset, and the Object may appear multiple times within the Collection, ideas such as setting properties or inputs on the Object directly are a nonstarter, as is something like specifying a specific source object in the driver.

I'd prefer not to use a solution that includes Python evaluation to be enabled (for the driver, for instance), either, since I may want to redistribute this and requiring scripting to be enabled is a risky request and a tall order for a simple asset.

SuperFLEB
  • 11
  • 3
  • 1
    Hi, @SuperFLEB, and welcome. Personally, I think this question would be greatly aided by a concrete example of what you want to achieve..(you could still make it clear that it's only an example of a more general principle) – Robin Betts Jan 07 '23 at 09:50
  • I've edited it to include some more concrete details in an example. To put it in short:

    Rotation -on-> Transform Node -in-> GeoNodes -on-> Object -in-> Collection -instanced in-> Collection Instance

    I want a way to be able to set the Rotation value by setting a property on the collection instance.

    – SuperFLEB Jan 07 '23 at 21:39
  • I may not understand the question, or there may be a structural problem here: https://blender.stackexchange.com/questions/274485/how-can-i-instantiate-a-procedural-node-group-with-different-parameters – quellenform Jan 07 '23 at 22:15
  • @SuperFLEB Let me summarize. You have a setup like this: https://i.imgur.com/YSZzlKh.png A custom prop (ROT_X) on your collection instance is controlling your GeoNodes rot value. But the problem is when you append that COLL into another file and duplicate them (like this: https://i.imgur.com/wYEwtTD.png) only the original ROT_X on COLL works. Nothing happens when you change ROT_X on COLL.001 for ex, because the driver is referring specifically to COLL, not COLL.001 or anything else. You want a custom prop that works for all coll instance copies individually? – Kuboå Jan 07 '23 at 23:42
  • I don't think that could work though, since all copies are referring (instancing) the same geometry, when one changes, all of them changes. If you appended the same COLL again instead of duplicating the first one, it would create a new underlying geometry so it would work then: https://i.imgur.com/FfamOq8.png If the question is "why can I have per-instance control over materials but not geometry?", that I can't answer. – Kuboå Jan 07 '23 at 23:48
  • I think you've hit on it, @Kuboå. I was trying something similar to what you were doing there, having multiple collection instances and-- like you said-- "have per-instance controls over geometry" in the same way I can over material nodes. It seems like that's not possible, at least not in Blender 3.4, currently. – SuperFLEB Jan 08 '23 at 03:24
  • @SuperFLEB Not really sure if it's something that would come with later versions. The whole point of instances are that they are just references to a geometry so you don't have to create it from scratch for every copy. If you could change individual ones, they would just be normal objects. If "just normal object" is fine with you (you don't need the performance advantage that comes with instances) then you can do what I mentioned: append the same COLL instance again. You can also use the Asset Browser in Append mode (not "Append (Reuse Data)"): https://i.imgur.com/gV7lEH7.png – Kuboå Jan 08 '23 at 14:01

0 Answers0