Geometry Nodes: Writing an attribute of type 'color' directly to the position attribute has no effect. #85864

Closed
opened 2021-02-22 06:27:34 +01:00 by Leon Schittek · 11 comments
Member

System Information
Operating system: Darwin-18.7.0-x86_64-i386-64bit 64 Bits
Graphics card: Intel Iris OpenGL Engine Intel Inc. 4.1 INTEL-12.10.16

Blender Version
Broken: version: 2.93.0 Alpha, branch: master, commit date: 2021-02-21 23:22, hash: af940c68cb
Worked: (newest version of Blender that worked as expected)

Short description of error
Writing to the position attribute doesn't work when using an attribute of type 'color'.
This means: Directly writing the output of the Attribute Sample Texture node to the position attribute or mixing colors with the Attribute Mix node with the result set to "position" has no effect.
Both cases work for the rotation and scale attributes.
Explicitly converting the color attribute to a vector attribute first using a Vector Math Node works as expected.

position-attribute-bug.mp4

Exact steps for others to reproduce the error
From startup file:

  • Add a Geometry Nodes modifier to the default cube
  • Add an Attribute Sample Texture node, plug it in between input and output node. Add a new Texture and set the result to "position".
  • The position of the vertices will be unaffected.

From the .blend-file in the video:

  • open the file and plug in different Attribute Sample Texture nodes into the Point Distribute node. The one with the Result set to "position" will have no effect.
    sample-texture-position-bug.blend
**System Information** Operating system: Darwin-18.7.0-x86_64-i386-64bit 64 Bits Graphics card: Intel Iris OpenGL Engine Intel Inc. 4.1 INTEL-12.10.16 **Blender Version** Broken: version: 2.93.0 Alpha, branch: master, commit date: 2021-02-21 23:22, hash: `af940c68cb` Worked: (newest version of Blender that worked as expected) **Short description of error** Writing to the position attribute doesn't work when using an attribute of type 'color'. This means: Directly writing the output of the Attribute Sample Texture node to the position attribute or mixing colors with the Attribute Mix node with the result set to "position" has no effect. Both cases work for the rotation and scale attributes. Explicitly converting the color attribute to a vector attribute first using a Vector Math Node works as expected. [position-attribute-bug.mp4](https://archive.blender.org/developer/F9827360/position-attribute-bug.mp4) **Exact steps for others to reproduce the error** From startup file: - Add a Geometry Nodes modifier to the default cube - Add an Attribute Sample Texture node, plug it in between input and output node. Add a new Texture and set the result to "position". - The position of the vertices will be unaffected. From the .blend-file in the video: - open the file and plug in different Attribute Sample Texture nodes into the Point Distribute node. The one with the Result set to "position" will have no effect. [sample-texture-position-bug.blend](https://archive.blender.org/developer/F9827364/sample-texture-position-bug.blend)
Author
Member

Added subscriber: @lone_noel

Added subscriber: @lone_noel
Member

Added subscriber: @HooglyBoogly

Added subscriber: @HooglyBoogly
Member

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

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

Thanks for the report and the clear test file. This is likely a known issue at the moment, but I think we should address it.
The difference here is that position is the only built-in attribute, so its type can not be changed.
For the others, (scale, rotation), AFAIK they are actually created with a color data type, but since there is implicit conversion back to float, you don't notice it.

I think this comes down to how we've implemented the data type conversion for writing to an attribute's values. It always uses the new type by removing the old attribute and creating a new one.
I think there are many cases where we'd want to use interpolation instead. Built-in attributes are the most obvious case of course, but there may be others.

Not sure if that makes sense, but I wanted to write it down somewhere anyway.

Thanks for the report and the clear test file. This is likely a known issue at the moment, but I think we should address it. The difference here is that `position` is the only built-in attribute, so its type can not be changed. For the others, (`scale`, `rotation`), AFAIK they are actually created with a color data type, but since there is implicit conversion back to float, you don't notice it. I think this comes down to how we've implemented the data type conversion for writing to an attribute's values. It always uses the new type by removing the old attribute and creating a new one. I think there are many cases where we'd want to use interpolation instead. Built-in attributes are the most obvious case of course, but there may be others. Not sure if that makes sense, but I wanted to write it down somewhere anyway.
Author
Member

I see, that's good to know. Thanks for the insight!

I see, that's good to know. Thanks for the insight!
Member

Added subscriber: @CharlieJolly

Added subscriber: @CharlieJolly
Member

In this case, could there be an implicit conversion of rgb(-a) to position when using this node and add a node warning that there is potential data loss.

In future there could be a node to convert color4f to float3 with options on how to handle the alpha value or this could be added to any node that handles color.

In this case, could there be an implicit conversion of rgb(-a) to position when using this node and add a node warning that there is potential data loss. In future there could be a node to convert color4f to float3 with options on how to handle the alpha value or this could be added to any node that handles color.
Member

Closed as duplicate of #86633

Closed as duplicate of #86633
Faster commented 2021-11-22 03:30:12 +01:00 (Migrated from localhost:3001)

Added subscriber: @Faster

Added subscriber: @Faster
Faster commented 2021-11-22 03:30:12 +01:00 (Migrated from localhost:3001)

This comment was removed by @Faster

*This comment was removed by @Faster*

Added subscriber: @ThomasDinges

Added subscriber: @ThomasDinges
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#85864
No description provided.