Maniphest T93128

set material node doesn't work unless there are the same number of empty materials in the property panel's material section
Closed, Archived

Assigned To
None
Authored By
michael campbell (3di)
Nov 16 2021, 3:21 PM
Tags
  • BF Blender
  • Geometry Nodes
Subscribers
Howard Trickey (howardt)
Jacques Lucke (JacquesLucke)
michael campbell (3di)

Description

System Information
Operating system: Windows-10-10.0.19042-SP0 64 Bits
Graphics card: NVIDIA GeForce GTX 1070/PCIe/SSE2 NVIDIA Corporation 4.5.0 NVIDIA 472.12

Blender Version
Broken: version: 3.1.0 Alpha, branch: master, commit date: 2021-11-11 18:53, hash: rB0533f2851e7e
Worked: (newest version of Blender that worked as expected)

Set material node doesn't work unless there are the same number of empty materials in the property panel's material section. The below will work, but if the empty material's are removed from the property panel, then the actual materials can no longer be assisnged by the set material nodes. This means staff have to manually add empty materials to each new object they need to use the node tree on. Extremely time consuming and non-sensical.

Event Timeline

michael campbell (3di) created this task.Nov 16 2021, 3:21 PM
michael campbell (3di) added a project: Geometry Nodes.
michael campbell (3di) added a comment.Nov 16 2021, 3:45 PM

very confusingly, it's not possible to re-assign a different material to the same material ID later in the the tree:

The below results in material ID 0 getting 'material' rather than 'glass' (which is assigned last)

Jacques Lucke (JacquesLucke) changed the task status from Needs Triage to Needs Information from User.Nov 16 2021, 3:47 PM
Jacques Lucke (JacquesLucke) added a subscriber: Jacques Lucke (JacquesLucke).

Please prepare a minimal example and provide the .blend file.

michael campbell (3di) added a comment.Nov 16 2021, 4:13 PM

Hi @Jacques Lucke (JacquesLucke) , please open the below file, remove the 3 empty material slots from the ball by pressing minus 3 times. The materials will dissapear. Now click the plus icon 3 times, the materials will be re-assigned.

For the second bug, Set the far right compare node to 0. Faces that have mat ID 0 are not given the 'C' material (blue) as expected.

Jacques Lucke (JacquesLucke) closed this task as Archived.Nov 19 2021, 9:57 AM

Everything works fine when you don't deal with material indices directly. The Set Material node chooses which material indices it will use depending on the existing material slots on the geometry. If you change that (by removing material slots on the original mesh) the Set Material node will use different material indices. This will mess up your logic with applying materials based on material indices. I guess you wanted to use a (non-existant) Set Material for Index node, but that's not what the Set Material node is doing, and hence it has no material index input.

michael campbell (3di) added a comment.EditedNov 21 2021, 6:12 AM

Hi @Jacques Lucke (JacquesLucke) . I'm trying to use your workaround, but I still have the same issue even when using the set material node, It still only works if there are materials in the properties panel in a specific order.

I can't set the material after the boolean because the face indices have changed. Is there a solution to this with your current design?

Jacques Lucke (JacquesLucke) added a comment.Nov 21 2021, 10:03 AM

It's possible that the Boolean node does not handle materials as expected. That has to be checked again. Can you reproduce the same issue without the boolean node?

michael campbell (3di) added a comment.Nov 21 2021, 5:49 PM

@Jacques Lucke (JacquesLucke) I think I recall someone mentioning a similar issue with the realize instances and join nodes, but I've just tried and can't replicate it. Would you like me to open a new report for the boolean node?

Jacques Lucke (JacquesLucke) added a subscriber: Howard Trickey (howardt).Nov 21 2021, 10:35 PM

Yes, it might be classifies as a known issue for now, have to talk to @Howard Trickey (howardt) to see what the current state is. Please make the file as simple as possible.

michael campbell (3di) added a comment.EditedNov 21 2021, 11:05 PM

thanks @Jacques Lucke (JacquesLucke) I've raised a new report: https://developer.blender.org/T93272

Creating that file also unearthed another bug with the material assisgnment system, and I've raised a bug for that here: https://developer.blender.org/T93271

Reporting bugs is becoming a full time job, have a word with Ton would you and see if he'll stick me on the payroll :D