Geometry Nodes: Implicit Conversion from Color to Rotation Not Working #124797

Open
opened 2024-07-16 17:20:26 +02:00 by Simon Thommes · 8 comments
Member

System Information
Operating system: Linux-6.8.12-gentoo-x86_64-AMD_Ryzen_9_5950X_16-Core_Processor-with-glibc2.39 64 Bits, X11 UI
Graphics card: NVIDIA RTX A6000/PCIe/SSE2 NVIDIA Corporation 4.6.0 NVIDIA 550.90.07

Blender Version
Broken: version: 4.2.0, branch: blender-v4.2-release, commit date: 2024-07-16 06:20, hash: a51f293548ad
Worked: (newest version of Blender that worked as expected)

Short description of error
Since color to vector and vector to rotation work implicitly and the implicit conversions should be transitive where possible, color to rotation (and vice versa) should work just as well.
image

Exact steps for others to reproduce the error

  • add new Geometry Nodes node-tree
  • connect color socket to rotation socket
**System Information** Operating system: Linux-6.8.12-gentoo-x86_64-AMD_Ryzen_9_5950X_16-Core_Processor-with-glibc2.39 64 Bits, X11 UI Graphics card: NVIDIA RTX A6000/PCIe/SSE2 NVIDIA Corporation 4.6.0 NVIDIA 550.90.07 **Blender Version** Broken: version: 4.2.0, branch: blender-v4.2-release, commit date: 2024-07-16 06:20, hash: `a51f293548ad` Worked: (newest version of Blender that worked as expected) **Short description of error** Since color to vector and vector to rotation work implicitly and the implicit conversions should be transitive where possible, color to rotation (and vice versa) should work just as well. <img width="876" alt="image" src="attachments/8e748ca2-dba3-4051-ab03-20dd39f78613"> **Exact steps for others to reproduce the error** - add new Geometry Nodes node-tree - connect color socket to rotation socket
Simon Thommes added the
Type
Report
Severity
Normal
Status
Needs Triage
labels 2024-07-16 17:20:27 +02:00

Rotation in any case will be just 1.0 for scalar. This means that we just can not support all possible types, there is just no geometrycal mean for that.

Rotation in any case will be just 1.0 for scalar. This means that we just can not support all possible types, there is just no geometrycal mean for that.
Member

I don't agree that all implicit conversions should be transitive. Things will get much less defined as we propagate that logic. It would mean we would have boolean to rotation conversions, for example.

I don't agree that all implicit conversions should be transitive. Things will get much less defined as we propagate that logic. It would mean we would have boolean to rotation conversions, for example.
Author
Member

Things will get much less defined as we propagate that logic. It would mean we would have boolean to rotation conversions, for example.

Yes. I guess this is something to be discussed, but imo there is no reason not to fall back to the most reasonable conversion when there is a simple vector representation of a socket that we already do implicit conversion for.

> Things will get much less defined as we propagate that logic. It would mean we would have boolean to rotation conversions, for example. Yes. I guess this is something to be discussed, but imo there is no reason not to fall back to the most reasonable conversion when there is a simple vector representation of a socket that we already do implicit conversion for.

What the point of using Euler angle (with range [0.0, pi * 2]) as color (with range [0.0, 1.0])? Or there should be some other way to convert quaternion to color?

What the point of using Euler angle (with range [0.0, pi * 2]) as color (with range [0.0, 1.0])? Or there should be some other way to convert quaternion to color?
Author
Member

With nodes you don't always care about exact values, especially in cases where you would rely on implicit conversion. My specific use-case here would be to use an un-normalized noise texture to drive a rotation for randomization based on a texture.

The color socket does not imply the range [0,1] anyways.

With nodes you don't always care about exact values, especially in cases where you would rely on implicit conversion. My specific use-case here would be to use an un-normalized noise texture to drive a rotation for randomization based on a texture. The color socket does not imply the range [0,1] anyways.

Is there is some obvious difference between Rotation data type and Transformation one in such use-case? I mean, this is not trivial data types and any time you try to apply simple logic like Color->Rotation this mean that we have to choose some non-trivial way to do that. Basicaly, we even can use random to peform such convertion in such use case, there is no some an mathematical well defined rule or convention in the programming to choose something certain\

Is there is some obvious difference between Rotation data type and Transformation one in such use-case? I mean, this is not trivial data types and any time you try to apply simple logic like Color->Rotation this mean that we have to choose some non-trivial way to do that. Basicaly, we even can use random to peform such convertion in such use case, there is no some an mathematical well defined rule or convention in the programming to choose something certain\
Author
Member

I mean yea. That's where we need to apply reason and make choices that lead to useful and understandable behavior. I don't think only ever sticking to what is mathematically well defined gets us anywhere in terms of good UX, we need to make reasonable decisions whenever something isn't and stick to it.
Not saying that's easy or always possible but at least we need to have a discussion about it.

Here imo, since vectors and colors are treated largely as interchangeable, it's reasonable to do the same implicit conversion via Euler rotation.

I mean yea. That's where we need to apply reason and make choices that lead to useful and understandable behavior. I don't think only ever sticking to what is mathematically well defined gets us anywhere in terms of good UX, we need to make reasonable decisions whenever something isn't and stick to it. Not saying that's easy or always possible but at least we need to have a discussion about it. Here imo, since vectors and colors are treated largely as interchangeable, it's reasonable to do the same implicit conversion via Euler rotation.
Member

What the point of using Euler angle (with range [0.0, pi * 2]) as color (with range [0.0, 1.0])? Or there should be some other way to convert quaternion to color?

Hi, If adding [0, 180deg] works with another vector, then why not to convert "rotation to color"? 👀
Looking at geometry_node_tree_validate_link, case for SOCK_ROTATION --> SOCK_RGBA is missing.
I wonder where is the code for implicit conversion (type_conversion.cc?)
Confirming for now.

> What the point of using Euler angle (with range [0.0, pi * 2]) as color (with range [0.0, 1.0])? Or there should be some other way to convert quaternion to color? Hi, If adding [0, 180deg] works with another vector, then why not to convert "rotation to color"? 👀 Looking at `geometry_node_tree_validate_link`, case for SOCK_ROTATION --> SOCK_RGBA is missing. I wonder where is the code for implicit conversion (`type_conversion.cc`?) Confirming for now.
Bart van der Braak added
Type
Bug
and removed
Type
Report
labels 2024-08-14 12:56:32 +02:00
Sign in to join this conversation.
No Label
Interest
Alembic
Interest
Animation & Rigging
Interest
Asset System
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
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
Viewport & EEVEE
Interest
Virtual Reality
Interest
Vulkan
Interest
Wayland
Interest
Workbench
Interest: X11
Legacy
Asset Browser Project
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
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
Module
Viewport & EEVEE
Platform
FreeBSD
Platform
Linux
Platform
macOS
Platform
Windows
Severity
High
Severity
Low
Severity
Normal
Severity
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
4 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#124797
No description provided.