Set Material Index node does not work on some GN-created geometry #112372

Open
opened 2023-09-14 13:21:28 +02:00 by Ludvik Koutny · 5 comments
Contributor

System Information
Operating system: Windows-10-10.0.22621-SP0 64 Bits
Graphics card: NVIDIA GeForce RTX 2080 Ti/PCIe/SSE2 NVIDIA Corporation 4.5.0 NVIDIA 537.13

Blender Version
Broken: version: 3.6.2, branch: blender-v3.6-release, commit date: 2023-08-16 16:43, hash: e53e55951e7a
Worked: Never.

Short description of error
The scene contains 3 objects:

  1. Mesh object with GN which creates Mesh Cube primitive
  2. Curve object with GN which creates Mesh Cube primitive
  3. Curve object with GN which creates geometry using Curve to Mesh node

All 3 objects have their Material linked to Object, not Object Data

The Set Material Index node works on 1. and 2. but does not work on 3.

Exact steps for others to reproduce the error

  1. Open the attached blender file: curvematerialbug.blend
  2. Check Geometry Nodes setups on all 3 objects
    Result: Set Material Index Node does not work on Geometry generated by Curve to Mesh node.
    Expected: Set material Index Node works on any geometry.
**System Information** Operating system: Windows-10-10.0.22621-SP0 64 Bits Graphics card: NVIDIA GeForce RTX 2080 Ti/PCIe/SSE2 NVIDIA Corporation 4.5.0 NVIDIA 537.13 **Blender Version** Broken: version: 3.6.2, branch: blender-v3.6-release, commit date: 2023-08-16 16:43, hash: `e53e55951e7a` Worked: Never. **Short description of error** The scene contains 3 objects: 1. Mesh object with GN which creates Mesh Cube primitive 2. Curve object with GN which creates Mesh Cube primitive 3. Curve object with GN which creates geometry using Curve to Mesh node All 3 objects have their Material linked to Object, not Object Data The Set Material Index node works on 1. and 2. but does not work on 3. **Exact steps for others to reproduce the error** 1. Open the attached blender file: [curvematerialbug.blend](/attachments/40ef2a4b-d397-4b99-8154-5b4be2ea9a6b) 2. Check Geometry Nodes setups on all 3 objects Result: Set Material Index Node does not work on Geometry generated by Curve to Mesh node. Expected: Set material Index Node works on any geometry.
Ludvik Koutny added the
Priority
Normal
Type
Report
Status
Needs Triage
labels 2023-09-14 13:21:29 +02:00
Iliya Katushenock added the
Interest
Geometry Nodes
Interest
Nodes & Physics
labels 2023-09-14 13:40:13 +02:00
Iliya Katushenock changed title from Set Material Index node does not work on some GN-created geometry to Geometry Nodes: Curve Object materials are not used by Mesh material indices 2023-09-14 13:46:17 +02:00
Author
Contributor

@mod_moder
I think the new name is more confusing. It implies that the problem is with curve objects, which is not true. I've specifically put example of a scene object which is a curve object, but the material works there. The problem is that some geometries generated by GN work with material indices, while others don't. The problem is not that the parent object type is curve, and not a mesh.

If you rename bug reports to worse names it may reduce the chance of responsible developer actually picking it up.

@mod_moder I think the new name is more confusing. It implies that the problem is with curve objects, which is not true. I've specifically put example of a scene object which is a curve object, but the material works there. The problem is that some geometries generated by GN work with material indices, while others don't. The problem is not that the parent object type is curve, and not a mesh. If you rename bug reports to worse names it may reduce the chance of responsible developer actually picking it up.
Iliya Katushenock changed title from Geometry Nodes: Curve Object materials are not used by Mesh material indices to Geometry Nodes: Uninitialized materials 2023-09-14 13:55:46 +02:00
Iliya Katushenock self-assigned this 2023-09-14 13:55:50 +02:00
Ludvik Koutny changed title from Geometry Nodes: Uninitialized materials to Set Material Index node does not work on some GN-created geometry 2023-09-14 14:22:48 +02:00
Author
Contributor

Please just leave the title as is and let whoever claims the report to change it? I really think since this is a bug report, it should be more informative than "Geometry Nodes: Uninitialized materials". That doesn't really explain what the report is about.

EDIT: Nevermind, I thought you just triaged it. Didn't know you actually claimed it. In that case, use whatever name you need. I will revert it.

Please just leave the title as is and let whoever claims the report to change it? I really think since this is a bug report, it should be more informative than "Geometry Nodes: Uninitialized materials". That doesn't really explain what the report is about. EDIT: Nevermind, I thought you just triaged it. Didn't know you actually claimed it. In that case, use whatever name you need. I will revert it.
Ludvik Koutny changed title from Set Material Index node does not work on some GN-created geometry to Geometry Nodes: Uninitialized materials 2023-09-14 14:49:46 +02:00
Hans Goudey changed title from Geometry Nodes: Uninitialized materials to Set Material Index node does not work on some GN-created geometry 2023-09-14 18:40:02 +02:00
Author
Contributor

This issue is still present in Blender 4.1. Any geometry created purely in Geometry Nodes can't have materials simply assigned in the Materials Properties panel, and has to be assigned in Geometry Nodes only. This makes it impossible to create GN assets users can assign material with ease, without having to open and mess with the geometry node tree.

Unlike Blender 4.0, the workaround of joining the GN created geometry with base object geometry and then deleting the base object geometry to get the mesh material no longer works.

So while in 4.0, this was broken and there was a workaround, in 4.1 it is still broken, but there's no longer a workaround.

This issue is still present in Blender 4.1. Any geometry created purely in Geometry Nodes can't have materials simply assigned in the Materials Properties panel, and has to be assigned in Geometry Nodes only. This makes it impossible to create GN assets users can assign material with ease, without having to open and mess with the geometry node tree. Unlike Blender 4.0, the workaround of joining the GN created geometry with base object geometry and then deleting the base object geometry to get the mesh material no longer works. So while in 4.0, this was broken and there was a workaround, in 4.1 it is still broken, but there's no longer a workaround.

Just to add to the conversation. Working with materials in GN is non intuitive.
Here some more things, everything listed below is on a object that has two material slots:

mat_01.png

Something like this will never work:

mat_02.png

When we join with the original object it will:

mat_03.png

If we have the order wrong in the join geometry then it doesn't work cause the plane does donates it's default material.

mat_04.png

If we don't want to original mesh but do want to use the material slots we have to delete the geometry, but not use mode "all" cause then it deletes the material slots.

mat_05.png

I hope this helps in some way.

Just to add to the conversation. Working with materials in GN is non intuitive. Here some more things, everything listed below is on a object that has two material slots: ![mat_01.png](/attachments/56e1c699-a43a-4ee2-8a8b-219a6a937b8e) Something like this will never work: ![mat_02.png](/attachments/8c59a759-bdc2-42a5-ad81-639a3cf482e7) When we join with the original object it will: ![mat_03.png](/attachments/d32f6229-523a-489a-a3a6-f989c0f6d99e) If we have the order wrong in the join geometry then it doesn't work cause the plane does donates it's default material. ![mat_04.png](/attachments/a79ed46b-2d38-440f-a861-eb2ef4485dca) If we don't want to original mesh but do want to use the material slots we have to delete the geometry, but not use mode "all" cause then it deletes the material slots. ![mat_05.png](/attachments/d7af0b02-f3e7-4aef-a2c4-147f3fcbf8d4) I hope this helps in some way.

@clankill3r For help using Blender, please try one of the community websites: https://www.blender.org/community/

@clankill3r For help using Blender, please try one of the community websites: https://www.blender.org/community/
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
3 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#112372
No description provided.