4
$\begingroup$

I have an object with multiple materials assigned to it. I would like to use Geometry Nodes to swap a material of a specific material slot.

Example: I would like to change the material of slot 2, but keep all other existing materials.

An ideas how to do this?

Thank you!

PS: It has to work in Blender 3.0.1 if possible.

$\endgroup$
1
  • $\begingroup$ Maybe a I need to mention it has to work in Blender 3.0.1. Sorry. $\endgroup$ Jul 21, 2022 at 14:03

2 Answers 2

6
$\begingroup$

You would first have to query if an existing material index has a certain value, and use this result as selection for the node Set Material:

enter image description here

$\endgroup$
4
  • $\begingroup$ This work great in 3.2.1. I have to look how I get this to work in Blender 3.0.1. Before you ask, why: We are in a production and need complex tests before moving to Blender 3.2.1. Some of our existing scenes are not working in Blender 3.2.1. As long as there's no fix, we stay using Blender 3.0.1. Thank you! $\endgroup$ Jul 21, 2022 at 14:07
  • $\begingroup$ @ChristophWerner According to the documentation all nodes used here should at least be available in Blender 3.0. If it still doesn't work, then once again a bug is responsible... $\endgroup$
    – quellenform
    Jul 21, 2022 at 14:14
  • 1
    $\begingroup$ "Compare" isn't implemented in Blender 3.0.1 like this, yet. You can compare floats only. $\endgroup$ Jul 21, 2022 at 14:19
  • $\begingroup$ @ChristophWerner Ah, yes, thank you, absolutely right, Compare is not yet available as a separate node in this version, but that can be solved with the other node as well. Well noticed! $\endgroup$
    – quellenform
    Jul 21, 2022 at 14:24
2
$\begingroup$

Here's the solution for Blender 3.0.1. users.

enter image description here

$\endgroup$

You must log in to answer this question.

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