Geo Node - Use Assigned Material for Material?

Hope I can type this in a way that makes sense…

I know how to use the Set Material node, so not asking how to do that. Attached is example, of how I’m currently setting materials - I put the node in there, and then fill in the field in properties to make the geometry use whatever material I type.

But quite often, I want the geonode to just use the material that is already assigned to the base input object. In the image example, the assigned material is noted in Cyan. I want the geonode to use “whatever” material is in that slot… not have to re-assign it every time.

Haven’t found a way to tell the geo nodes - “see that material I’ve already assigned to the object? Use that one”. Am I overlooking the obvious, or is it just not possible because it can’t look upstream?

TIA :slight_smile:

Set material index node to zero?

2 Likes

AFAIK geometry nodes actually very good at… geometry… :stuck_out_tongue_winking_eye: but no so nice on materials… only the “input” geomety does have the “defeult” materal on slot 1… ever Joined Geometry has… nothing…

  • Set Matrial
  • Replace Material
  • Material Selection

do all have a material to set and don’t have the one on slot1 as default. And something like

  • Object Info
  • SelfObject

are also not very helpfull…

IDK if this on devtalk is something in the right direction ( at least it says exactly what you are usinf … and TBH i mau not understand the rest completely :sweat_smile: )

The switch can work in material mode… so keep that in mind:

Good luck.

1 Like

Your answer is correct, to my poorly worded question… i had a feeling I was going to word it badly, and I did.

I’ll try to word it better -

Specifically, in the image: I’m using the material “detail assign” to make a selection in the nodes, and then scatter objects to that selection. That works fine. But, I don’t want the roof to actually BE red… I want it to be the grey edgewear color.

So, basically - I’m trying to assign the red material, but then in the geonode - after I scatter everything - reassign the “you’re red” faces to “now you’re grey”.

1 Like

Sounds like Alpha’s answer is still the way to go then:


:man_shrugging:

1 Like

Boom.

@AlphaChannel @zeroskilz @Okidoki - that nailed it.

I can pull the original selection, then if the set mat is BEFORE the join, do the index override. Thanks ever so much, this little puzzle had been a splinter in my mind for a while now.

2 Likes