Viewport shading solid mode not displaying geometry nodes color attributes correctly #107206

Open
opened 2023-04-21 07:10:42 +02:00 by James Redmond · 5 comments

System Information
Operating system: Win10
Graphics card: 960m

Blender Version
Broken: 3.5
Worked: never

Short description of error

When using geometry nodes to add color attributes, there are several situations where the viewport solid mode attribute option does not display the color attributes correctly.

As can be seen by this example. The first image shows a cube with a color attribute added. The geometry nodes setup adds a red color to the "Color" attribute. This all works as expected as can be seen in the viewport and the spreadsheet.

color_attr_1.jpg

If a GN cube is added instead of the standard mesh cube (which has been bypassed by the switch node) then the color attribute is added as expected. This can be seen in the spreadsheet as to be the same as the previous screenshot for the color attribute. However, it is not being displayed in the viewport.

color_attr_1a.jpg

This is a problem seen with any procedural geometry made with just nodes. As a workaround, you can have a single vertex as the only "real" geometry and use a join node to join with any nodal procedural geometry. Strangely though, this has to be the first connection in the join node, and won't work if it is second. This can be seen by the next 2 images:

color_attr_2.jpg

color_attr_2a.jpg

A similar related case is that some mesh nodes will also make the viewport lose the displayed attribute. For instance, if you create a cube, add a GN modifier and add a dual mesh node to the chain, the color attribute is still there, but no longer displayed in the viewport. This happens with some nodes (like mesh to volume and back to mesh) but not others (like subdivide or extrude).

color_attr_3.jpg

There is also a related issue that when exporting to obj or gltf the color attributes are not exported if they are not displayed in the viewport. If apply the GN modfier, you have to actually click on the color attribute in the properties panel to see it in the viewport or to be able to export it.

Oddly, the fbx exporter seems fine without applying the modifier. It also doesn't matter if the color attribute is on the vertices, or face corners, or if the color is float or byte color. The same issues happen regardless.

**System Information** Operating system: Win10 Graphics card: 960m **Blender Version** Broken: 3.5 Worked: never **Short description of error** When using geometry nodes to add color attributes, there are several situations where the viewport solid mode attribute option does not display the color attributes correctly. As can be seen by this example. The first image shows a cube with a color attribute added. The geometry nodes setup adds a red color to the "Color" attribute. This all works as expected as can be seen in the viewport and the spreadsheet. ![color_attr_1.jpg](/attachments/0f4f8cf8-40f1-4eb1-976f-c958c3290cbd) If a GN cube is added instead of the standard mesh cube (which has been bypassed by the switch node) then the color attribute is added as expected. This can be seen in the spreadsheet as to be the same as the previous screenshot for the color attribute. However, it is not being displayed in the viewport. ![color_attr_1a.jpg](/attachments/6f8386c0-bbb1-47de-9a53-6e1e9f21c893) This is a problem seen with any procedural geometry made with just nodes. As a workaround, you can have a single vertex as the only "real" geometry and use a join node to join with any nodal procedural geometry. Strangely though, this has to be the first connection in the join node, and won't work if it is second. This can be seen by the next 2 images: ![color_attr_2.jpg](/attachments/9361bef2-d051-4ec1-974e-28537fd2293a) ![color_attr_2a.jpg](/attachments/4d1945be-738b-43d5-833a-c7063196f14e) A similar related case is that some mesh nodes will also make the viewport lose the displayed attribute. For instance, if you create a cube, add a GN modifier and add a dual mesh node to the chain, the color attribute is still there, but no longer displayed in the viewport. This happens with some nodes (like mesh to volume and back to mesh) but not others (like subdivide or extrude). ![color_attr_3.jpg](/attachments/9bda8ce1-3310-4cc6-aa69-d6178573c64a) There is also a related issue that when exporting to obj or gltf the color attributes are not exported if they are not displayed in the viewport. If apply the GN modfier, you have to actually click on the color attribute in the properties panel to see it in the viewport or to be able to export it. Oddly, the fbx exporter seems fine without applying the modifier. It also doesn't matter if the color attribute is on the vertices, or face corners, or if the color is float or byte color. The same issues happen regardless.
James Redmond added the
Priority
Normal
Type
Report
Status
Needs Triage
labels 2023-04-21 07:10:43 +02:00
James Redmond changed title from Viewport shading solid mode not displaying geometry nodes color attributes correctly. to Viewport shading solid mode not displaying geometry nodes color attributes correctly 2023-04-21 07:22:34 +02:00

This is a duplicate of #106563

This is a duplicate of #106563
Blender Bot added
Status
Archived
and removed
Status
Needs Triage
labels 2023-04-21 08:48:17 +02:00
Martijn Versteegh added
Status
Duplicate
and removed
Status
Archived
labels 2023-04-21 08:48:44 +02:00
Author

@Baardaap I did see that, but thought it pertained only to instanced geometry. What about the export issues I mentioned for obj and gltf, that also occur in the same manner as this. Should I file a bug report or not?

@Baardaap I did see that, but thought it pertained only to instanced geometry. What about the export issues I mentioned for obj and gltf, that also occur in the same manner as this. Should I file a bug report or not?

You're right. It's not exactly the same problem. Related though.

the problem here is that GN does not set the active color attribute at all when it creates one.

I think the fix should still be in the same patch #107066 though.

You're right. It's not *exactly* the same problem. Related though. the problem here is that GN does not set the active color attribute *at all* when it creates one. I think the fix should still be in the same patch https://projects.blender.org/blender/blender/pulls/107066 though.
Blender Bot added
Status
Needs Triage
and removed
Status
Duplicate
labels 2023-04-21 10:10:37 +02:00

I'm not sure, but how can this be resolved?
If you create a new geometry, its active slot information is not related to the original. Without a mechanism for specifying the active slot, this is not solvable.

I'm not sure, but how can this be resolved? If you create a new geometry, its active slot information is not related to the original. Without a mechanism for specifying the active slot, this is not solvable.

if a color attribute is newly created on a geometry which does not contain any it should be set active/default. This is how it used to work before the change to name based active/default. Or the last created layer could be set as active, though last/first is often somewhat arbitrary in GN.

Or we could decide to always consider the first available layer 'active/default' if it's not set explicitly.

that would at least fix a large part of the use cases where people attach only a single color attribute for pointcloud visualisation and the like.

A 'set attribute active' node might maybe be useful eventually. Though we might want to switch away from the system with active/default layers altogether eventually and add pickers/dropdowns where needed.

if a color attribute is newly created on a geometry which does not contain any it should be set active/default. This is how it used to work before the change to name based active/default. Or the last created layer could be set as active, though last/first is often somewhat arbitrary in GN. Or we could decide to always consider the first available layer 'active/default' if it's not set explicitly. that would at least fix a large part of the use cases where people attach only a single color attribute for pointcloud visualisation and the like. A 'set attribute active' node might maybe be useful eventually. Though we might want to switch away from the system with active/default layers altogether eventually and add pickers/dropdowns where needed.
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#107206
No description provided.