6
$\begingroup$

If you add more than one geometry node tree to a single object, the whole modifier stack is used as the mesh source. Can we use just the very first version: the source mesh and ignore the followed used modifiers?

Example: Lets say you've distributed instances on an object, then the next distribution will use the result and distribute new instances on itself. But I want to use just the souce mesh for a specific geometry nodes modifier if needed.

I've tried to use a geometry switch and the Self Object node, but it didn't work and I get the error: "Geometry cannot be retrieved from the modifier object.".

Is it possible to ignore the modifier stack in geometry nodes and always use the geometry source to be used for new modifiers?

$\endgroup$
4
  • $\begingroup$ why don't you just use object info? or you can use one GN modifier and use node groups. Why do you wanna have more than one GN modifier? maybe your "end goal" would help us understand why or what you wanna do... $\endgroup$
    – Chris
    Commented Aug 7, 2023 at 7:45
  • 2
    $\begingroup$ Hello, I don't think you can. But you can ALT - D to link-duplicate the base object and use that modifier-less version in your modifier stack. But AFAIK you can't pick&choose which modifiers are applied to an object at runtime in a GN modifier. It's always the evaluated object. You get the error because you can't use self object on the instancer and the instanced objects, that would cause an infinite loop. $\endgroup$
    – Gorgious
    Commented Aug 7, 2023 at 8:22
  • $\begingroup$ Imagine u want to use a gn modifier to distribute grass on a ground field & then flowers on the same object & some bushes etc. As much as you want. All with individual values. I would like to use the same modifier to be used for every nature object. So you have a grass-modifer, flower-modifer, bushes-modifer on one ground object. The only alternative is to add a object slot into the modifier & place the modifier on a seperate controller/container object & choose the ground object then. I guess this is the only solution. I thought I don't need a seperate controller object to do this. $\endgroup$ Commented Aug 7, 2023 at 8:47
  • $\begingroup$ "The only alternative is to add a object slot into the modifier & place the modifier on a seperate controller/container object & choose the ground object then." In terms of workflow, this is how I'd recommend approaching the problem. You can do what Quellenform describes, but you're better off having each particle system be its own object. You end up with much finer control of parameters (can assign flowers to one collection, bushes to another, ground plane to a third, for example.) You can easily parent all of your particle objects to the ground plane if you want. $\endgroup$
    – Nathan
    Commented Aug 7, 2023 at 16:46

2 Answers 2

6
$\begingroup$

For this you could use the node Separate Components. ...if you really want to do it all in one modifier stack.

Since the base mesh always remains a mesh (unless you change that on purpose) and the objects you instantiate always remain instances (unless you also change that on purpose), you can easily separate the base mesh from the instantiated objects.

In this example, I always use the same Geometry Nodes modifier repeatedly and instantiate different objects (from Collections) on the same base mesh each time:

enter image description here

Regarding your question in the comments:

The only way to solve this is to use an additional modifier at the end that removes the base mesh specifically. Unfortunately, you have no other option here, because what reaches at the output is also displayed.


(Blender 3.6+)

$\endgroup$
6
  • $\begingroup$ Thank you. The problem is, you have to add the mesh name manually. Or is the attribute "Added" always representing the base mesh? If so, where are this kind of global variables stored? $\endgroup$ Commented Aug 8, 2023 at 6:51
  • $\begingroup$ @ChristophWerner No, you don't have to enter anything manually here, because it behaves the other way around: The identifier "Added" is added to the geometry that is added. ;-) ...Also note that I am using the output "Inverted" here. $\endgroup$
    – quellenform
    Commented Aug 8, 2023 at 8:16
  • $\begingroup$ Ow... I've overseen the "inverted" option. $\endgroup$ Commented Aug 8, 2023 at 12:43
  • $\begingroup$ Is it also possible to hide the emitter without loosing the results? $\endgroup$ Commented Aug 8, 2023 at 16:41
  • $\begingroup$ @ChristophWerner ...you can always disable a part of the geometry with a Switch node ...or am I misunderstanding something? $\endgroup$
    – quellenform
    Commented Aug 8, 2023 at 17:46
0
$\begingroup$

I've tested Quellenforms solution and it seem there's even no need to store the attribute:

enter image description here

$\endgroup$
3
  • $\begingroup$ In this case, there will definitely be duplicates, and you will also instantiate objects on the surfaces of the added objects. Take a close look at what the spread sheet says. $\endgroup$
    – quellenform
    Commented Aug 8, 2023 at 8:14
  • $\begingroup$ Actually there're no instances on the added objects... $\endgroup$ Commented Aug 8, 2023 at 12:41
  • $\begingroup$ I've checked the spread sheet. My versoin isn't different to yours. The instance amount is always the same like yours with inverted and store attributes node. Or do I oversee something? $\endgroup$ Commented Aug 8, 2023 at 12:55

You must log in to answer this question.

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