System Information
Operating system: Windows-10-10.0.19042-SP0 64 Bits
Graphics card: NVIDIA GeForce RTX 2060 with Max-Q Design/PCIe/SSE2 NVIDIA Corporation 4.5.0 NVIDIA 496.49
Blender Version
Broken: version: 3.0.0 Beta, branch: master, commit date: 2021-11-20 16:50, hash: rB1b2ee3cf2077
Short description of error
Geometry Nodes "Set Material Index" node may apply the wrong material.
Affected with "Mesh Primitive" nodes when the object material links are not all different.
The "Mesh Primitive" nodes appiles :
- "Join Geometry" with the Group Input Geometry
- "Realize Instances"
- "Set Material Index"
Exact steps for others to reproduce the error
- Create a new file.
- Set 5 different materials into a Cube object. Material colors are like : red, yellow, green, blue, pink.
- Change these material "links" not all different(red, yellow, yellow, blue, pink).
- Move to "Geometry Nodes" tab and create a new geometry. It's better changing the render mode to "Material Preview" or "Rendered" for visualize.
- Create the node setup like below.
- Try to change the "Materal Index" attribute of the below side of "Set Material Index" nodes.
When the index is 1, "yellow" is expected and it will be "yellow".
And when the index is 2, "yellow" is expected but it will be "blue".
And when the index is 3, "blue" is expected but it will be "pink".
And when the index is 4, "pink" is expected but it will be white that we didn't make.
If you change the material links back to (red, yellow, green, blue, pink), it will works as expected.
Blend file :
