← All ideas
  • Published 12 Apr 2022

Geometry Nodes: Get Material At Index node

The idea is to input some geometry and an index integer, and output the material found at the index.

I'm working on a node setup where I'd like to just keep the materials currently applied to the mesh and assign them to the geometry node output. But each new mesh I work on it seems I have to set the materials in the GN modifier then pass them in and assign - surely there should be a way to automatically access what materials are listed in the material panel and reference them by index?

This can avoid the hassle of manually re-applying materials already present on the original mesh, and the weird situation of having materials listed in the material tab and potentially totally different materials applied to the output of the geometry node modifier

100%

Development Status: Open

Upvote 14 Downvote 0
richmakegame
12 Apr 2022

2 Comments

ricoholmes1

I wholly agree that it's confusing!

BUT there is a way to do what you're looking for. By default, Blender sets the material to "Data" linked, and this is what breaks the information flow to Geometry Nodes.
If you have it set to "Object" linked, Geometry Nodes sees material as defined (including index) unless you overrule it.

At the bottom right of the material slots list, you see a dropdown. It's "usually" set to Data (Triangle Icon). Set to Object there, and you're good.

Again, I agree that it's not super-intuitive. I think it should be a lot more user-friendly.

2
mwoehlke

Regardless of there existing a work-around, the lack of exactly the geometry node described is surprising. Also, the work-around doesn't work if the GN wants the material from some other object that was used as input.