Maniphest T93607

Remesh Modifier loses reference from Set Material in Geometry Nodes.
Closed, Archived

Assigned To
None
Authored By
Julio Cargnin Pereira (juliocargnin)
Dec 3 2021, 6:15 PM
Tags
  • BF Blender
  • Geometry Nodes
  • Modifiers
Subscribers
Adriano D'Elia (aDElia)
Hans Goudey (HooglyBoogly)
higgsas (higgsas)
Julio Cargnin Pereira (juliocargnin)
Pratik Borhade (PratikPB2123)
Zijun Zhou (Eary)

Description

System Information
Operating system: Linux-5.13.0-7620-generic-x86_64-with-glibc2.31 64 Bits
Graphics card: NVIDIA GeForce RTX 3080/PCIe/SSE2 NVIDIA Corporation 4.5.0 NVIDIA 470.86

Blender Version
Broken: version: 3.0.0, branch: master, commit date: 2021-12-02 18:35, hash: rBf1cca3055776
Worked: (newest version of Blender that worked as expected)

Short description of error
Remesh Modifier fails holding Set Material from Geometry Nodes.

Exact steps for others to reproduce the error
create two materials for the default cube;
give them distinctive colors;
add a geometry nodes to the cube;
add a set material node;
feed it with the second material slot previously created;
add a remesh modifier.

Notice the material set on the geometry nodes will fall back to the first material slot, not holding the modifier stack hierarchy.
This does not happen if you use other modifiers like bevel, subsurf, solidify, etc.

Event Timeline

Julio Cargnin Pereira (juliocargnin) created this task.Dec 3 2021, 6:15 PM
Julio Cargnin Pereira (juliocargnin) added projects: Geometry Nodes, Modifiers.Dec 3 2021, 6:18 PM
higgsas (higgsas) added a subscriber: higgsas (higgsas).Dec 3 2021, 9:45 PM

Its working as expected because the remesh modifier destroys all attribute data.
Materials are referenced on face attribute (material_index) as integer, by default its gonna set material_index to 0 which take first material from material list

Zijun Zhou (Eary) added a subscriber: Zijun Zhou (Eary).Dec 4 2021, 1:17 AM

I would also guess this to be an expected behavior, because this can actually be seen without Geometry Nodes. Add a cube with the two materials, assign the second one to all faces in edit mode, then use a remesh modifier, you will see it go back to the first material, so I would also say that this is not a bug.

Hans Goudey (HooglyBoogly) closed this task as Archived.Dec 4 2021, 2:20 AM
Hans Goudey (HooglyBoogly) added a subscriber: Hans Goudey (HooglyBoogly).

Right, the previous replies are correct. Further, if the remesh modifier transferred this data then it would be slower, so it's not an obvious thing to just fix. Theoretically it could be an option, but that's more of a new feature.

Thanks anyway for the report.

Julio Cargnin Pereira (juliocargnin) added a comment.Dec 4 2021, 4:19 AM

Thanks guys for the input.

"Theoretically it could be an option, but that's more of a new feature."

That would be great if we could select the slot of the material the Remesh should persist. Like in the other modifiers where you can select a specific slot e.g. in solidify and bevel.

Pratik Borhade (PratikPB2123) mentioned this in T93860: geometry nodes and remesh - material bug.Dec 8 2021, 1:27 PM
Pratik Borhade (PratikPB2123) merged a task: T93860: geometry nodes and remesh - material bug.Dec 8 2021, 1:31 PM
Pratik Borhade (PratikPB2123) added subscribers: Adriano D'Elia (aDElia), Pratik Borhade (PratikPB2123).