Geometry node don't expose materials to the solidify modifier #95903

Open
opened 2022-02-20 08:47:13 +01:00 by Alexandre Labedade · 12 comments

System Information
Operating system: Windows 10
Graphics card: Nvidia RTX 2060

Blender Version
Broken: blender-3.1.0-beta+v31.93cc89247010
Worked: 3.0.1

Short description of error

When using a geometry node to generate a mesh, and then applying a solidify modifier to it, the materials are not properly exposed and not or wrongly assigned to the final mesh

Exact steps for others to reproduce the error

  • create a plane
  • go in edit mode and delete all the mesh data
  • back in object mode, add geometry node modifier
  • add a Cylinder mesh primitive, and set its fill type to None
  • add a Join Geometry node and plug the Group Input Geometry socket and the Cylinder node Mesh socket into the Join node
  • plug the join node into the output
  • add 3 materials to the object and set different colors
  • add a solidify modifier and set material for offset and rim to indices 1 and 2

The resulting tube doesn't show any of the materials.

  • go in edit mode and add at least one vertex to the mesh

Now the resulting tube displays the last material of the list on some parts, but this is still not it.

  • Instead of creating a cylinder in the geometry node tree, plug a Mesh circle primitive
    Then add a screw modifier to extrude it, after the geometry node modifier and before the solidify modifier
    Set its angle to 0° and Screw value to 1

Now the resulting tube is only displaying the first material

  • Go in edit mode and add at least one vertex to the mesh

Now the resulting tube displays all the materials properly.

Note : it is not obvious, but it is mandatory to join the original geometry into the end result to get the materials correctly propagated to the output.
Maybe this could be more clearly explained or simplified somehow.

Sample file here reproducing all cases mentionned above :
solidify_material_bug.zip

**System Information** Operating system: Windows 10 Graphics card: Nvidia RTX 2060 **Blender Version** Broken: blender-3.1.0-beta+v31.93cc89247010 Worked: 3.0.1 **Short description of error** When using a geometry node to generate a mesh, and then applying a solidify modifier to it, the materials are not properly exposed and not or wrongly assigned to the final mesh **Exact steps for others to reproduce the error** - create a plane - go in edit mode and delete all the mesh data - back in object mode, add geometry node modifier - add a Cylinder mesh primitive, and set its fill type to None - add a Join Geometry node and plug the Group Input Geometry socket and the Cylinder node Mesh socket into the Join node - plug the join node into the output - add 3 materials to the object and set different colors - add a solidify modifier and set material for offset and rim to indices 1 and 2 The resulting tube doesn't show any of the materials. - go in edit mode and add at least one vertex to the mesh Now the resulting tube displays the last material of the list on some parts, but this is still not it. - Instead of creating a cylinder in the geometry node tree, plug a Mesh circle primitive Then add a screw modifier to extrude it, after the geometry node modifier and before the solidify modifier Set its angle to 0° and Screw value to 1 Now the resulting tube is only displaying the first material - Go in edit mode and add at least one vertex to the mesh Now the resulting tube displays all the materials properly. Note : it is not obvious, but it is mandatory to join the original geometry into the end result to get the materials correctly propagated to the output. Maybe this could be more clearly explained or simplified somehow. Sample file here reproducing all cases mentionned above : [solidify_material_bug.zip](https://archive.blender.org/developer/F12878093/solidify_material_bug.zip)

Added subscriber: @Alesk

Added subscriber: @Alesk
Member

Changed status from 'Needs Triage' to: 'Confirmed'

Changed status from 'Needs Triage' to: 'Confirmed'
Member

Added subscriber: @PratikPB2123

Added subscriber: @PratikPB2123
Member

Added subscriber: @JacquesLucke

Added subscriber: @JacquesLucke
Member

I think this got affected in f5ce243a56
@JacquesLucke, can you check?

Not bisected this time but it's actually broke between: b647509913 - 644eb68524

I think this got affected in f5ce243a56 @JacquesLucke, can you check? Not bisected this time but it's actually broke between: b64750991334 - 644eb68524b9
Member

Added subscriber: @HooglyBoogly

Added subscriber: @HooglyBoogly
Member

I'm not sure I'd consider this a bug. If the original mesh is empty, I'm not sure it should have an effect on the result. i.e. I think an empty mesh is the same as empty geometry.
At least I think that's the design we've been operating with-- maybe I'm wrong though.

I'm not sure I'd consider this a bug. If the original mesh is empty, I'm not sure it should have an effect on the result. i.e. I think an empty mesh is the same as empty geometry. At least I think that's the design we've been operating with-- maybe I'm wrong though.
Member

I find it hard to follow the details of the report. Think that's mainly because it's not entirely clear what the actual and expected behavior is for one very specific example.
In the file some material slots are on the mesh and others on the object, which makes it harder.

Material index propagation when there are no faces using the materials is not guaranteed by the Join Geometry node currently. It could also just drop the unused materials.

Maybe this is related to #95417.

I find it hard to follow the details of the report. Think that's mainly because it's not entirely clear what the actual and expected behavior is for one very specific example. In the file some material slots are on the mesh and others on the object, which makes it harder. Material index propagation when there are no faces using the materials is not guaranteed by the Join Geometry node currently. It could also just drop the unused materials. Maybe this is related to #95417.
Member

I find it hard to follow the details of the report.

@JacquesLucke, open .blend file and notice the difference.

3.1.0Beta, master 3.0.1
image.png image.png
While in recent versions, adding a single vertex in edit mode displays color on backface.
Test File:
#95903.blend

(note: I haven't seen the file which reporter has attached)

> I find it hard to follow the details of the report. @JacquesLucke, open .blend file and notice the difference. | 3.1.0Beta, master | 3.0.1 | | -- | -- | | ![image.png](https://archive.blender.org/developer/F12882888/image.png) | ![image.png](https://archive.blender.org/developer/F12882891/image.png) | While in recent versions, adding a single vertex in edit mode displays color on backface. Test File: [#95903.blend](https://archive.blender.org/developer/F12882901/T95903.blend) (note: I haven't seen the file which reporter has attached)

In #95903#1311989, @JacquesLucke wrote:
I find it hard to follow the details of the report. Think that's mainly because it's not entirely clear what the actual and expected behavior is for one very specific example.

the expected behavior is to get the solidify modifier give the same result, whether it receives as input a standard mesh or a geometry node result.
In this case the expected result is to have material 0 on the original mesh (before solifidy) and the materials 1 and 2 assigned to the offset and rim parts of the solidify resulting mesh.

In the file some material slots are on the mesh and others on the object, which makes it harder.

During my tests I've put the materials (the 3 of them, in the same order) on the object and on the mesh to see if it could help somehow.
Result : materials on mesh are ignored, only matrerials on objects are effective.

Material index propagation when there are no faces using the materials is not guaranteed by the Join Geometry node currently. It could also just drop the unused materials.

Maybe this is related to #95417.

Yes, it could be related.
If the mesh data or the object are referring to a list of materials, having an empty mesh ( or only some vertices and no faces ) should not be a problem to properly access this list of materials.

> In #95903#1311989, @JacquesLucke wrote: > I find it hard to follow the details of the report. Think that's mainly because it's not entirely clear what the actual and expected behavior is for one very specific example. the expected behavior is to get the solidify modifier give the same result, whether it receives as input a standard mesh or a geometry node result. In this case the expected result is to have material 0 on the original mesh (before solifidy) and the materials 1 and 2 assigned to the offset and rim parts of the solidify resulting mesh. > In the file some material slots are on the mesh and others on the object, which makes it harder. During my tests I've put the materials (the 3 of them, in the same order) on the object and on the mesh to see if it could help somehow. Result : materials on mesh are ignored, only matrerials on objects are effective. > > Material index propagation when there are no faces using the materials is not guaranteed by the Join Geometry node currently. It could also just drop the unused materials. > > Maybe this is related to #95417. Yes, it could be related. If the mesh data or the object are referring to a list of materials, having an empty mesh ( or only some vertices and no faces ) should not be a problem to properly access this list of materials.

Added subscriber: @dfelinto

Added subscriber: @dfelinto

Not entirely sure yet that this is a bug, but better to investigate further together with the other material bugs.

Not entirely sure yet that this is a bug, but better to investigate further together with the other material bugs.
Philipp Oeser removed the
Interest
Nodes & Physics
label 2023-02-10 08:44:14 +01:00
Sign in to join this conversation.
No Label
Interest
Alembic
Interest
Animation & Rigging
Interest
Asset Browser
Interest
Asset Browser Project Overview
Interest
Audio
Interest
Automated Testing
Interest
Blender Asset Bundle
Interest
BlendFile
Interest
Collada
Interest
Compatibility
Interest
Compositing
Interest
Core
Interest
Cycles
Interest
Dependency Graph
Interest
Development Management
Interest
EEVEE
Interest
EEVEE & Viewport
Interest
Freestyle
Interest
Geometry Nodes
Interest
Grease Pencil
Interest
ID Management
Interest
Images & Movies
Interest
Import Export
Interest
Line Art
Interest
Masking
Interest
Metal
Interest
Modeling
Interest
Modifiers
Interest
Motion Tracking
Interest
Nodes & Physics
Interest
OpenGL
Interest
Overlay
Interest
Overrides
Interest
Performance
Interest
Physics
Interest
Pipeline, Assets & IO
Interest
Platforms, Builds & Tests
Interest
Python API
Interest
Render & Cycles
Interest
Render Pipeline
Interest
Sculpt, Paint & Texture
Interest
Text Editor
Interest
Translations
Interest
Triaging
Interest
Undo
Interest
USD
Interest
User Interface
Interest
UV Editing
Interest
VFX & Video
Interest
Video Sequencer
Interest
Virtual Reality
Interest
Vulkan
Interest
Wayland
Interest
Workbench
Interest: X11
Legacy
Blender 2.8 Project
Legacy
Milestone 1: Basic, Local Asset Browser
Legacy
OpenGL Error
Meta
Good First Issue
Meta
Papercut
Meta
Retrospective
Meta
Security
Module
Animation & Rigging
Module
Core
Module
Development Management
Module
EEVEE & Viewport
Module
Grease Pencil
Module
Modeling
Module
Nodes & Physics
Module
Pipeline, Assets & IO
Module
Platforms, Builds & Tests
Module
Python API
Module
Render & Cycles
Module
Sculpt, Paint & Texture
Module
Triaging
Module
User Interface
Module
VFX & Video
Platform
FreeBSD
Platform
Linux
Platform
macOS
Platform
Windows
Priority
High
Priority
Low
Priority
Normal
Priority
Unbreak Now!
Status
Archived
Status
Confirmed
Status
Duplicate
Status
Needs Info from Developers
Status
Needs Information from User
Status
Needs Triage
Status
Resolved
Type
Bug
Type
Design
Type
Known Issue
Type
Patch
Type
Report
Type
To Do
No Milestone
No project
No Assignees
5 Participants
Notifications
Due Date
The due date is invalid or out of range. Please use the format 'yyyy-mm-dd'.

No due date set.

Dependencies

No dependencies set.

Reference: blender/blender#95903
No description provided.