Imagine the following situation: the node group has to generate a room, so there are 6 Object inputs for every wall. Can I tell a program to replace a wall with internally generated mesh if its Object input is not filled? I know there is a Switch node, but how I’d generate the true/false input for it automatically?
It’s hard to understand what exactly you are asking.
However, if you have a cube, you can use the normal direction to select specific faces that you could then instance an object (a wall for example) on. You can use the same normal direction to control the rotation of the wall.
Is that along the lines of what you are asking?
No. Geometry Nodes can have inputs for Objects like this:
These inputs may be filled or not filled in the editor. What I was asking is how to check from Geometry Nodes if the input object is missing, and execute different part of code based on this condition
In programming languages, this sometimes referred as check vs null. Something like
if (object == null){
mesh = GenerateMesh();
} else {
mesh = object.mesh;
}
Of course I can create bool input for each wall and check or uncheck it manually. But would be better if it could be automated
Ah okay that makes things more clear. I’m afraid I don’t know how to help you
Use the domain size node to find the number of verts in a mesh. Compare the value against 0 with the compare node. Finally, use this boolean output in a switch.
Great, exactly what I needed