Nodes to convert between cartesian/spherical coordinates #94722
Labels
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
6 Participants
Notifications
Due Date
No due date set.
Dependencies
No dependencies set.
Reference: blender/blender#94722
Loading…
Reference in New Issue
No description provided.
Delete Branch "%!s(<nil>)"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
There should be nodes to convert between spherical and cartesian coordinates in a standardized way.
This point came up when discussing D12746 .
They are multiple design aspects to be figured out:
Changed status from 'Needs Triage' to: 'Confirmed'
Added subscriber: @SimonThommes
For usability I would suggest the following definitions:
Combine/Separate Vector
nodes that can have different 3D coordinate modes. E.g. Cartesian (X/Y/Z) (->default), Spherical (R/Phi/Theta), Cylindrical (Rho,Phi,Z)Math:
x = R*cos(Phi)cos(Theta)
y = Rsin(Phi)cos(Theta)
z = Rsin(Theta)
Added subscriber: @GeorgiaPacific
Added subscriber: @CharlieJolly
WIP patch here: D13772: (WIP) Node: Add Vector Convert node
Added subscriber: @zNight
Added subscriber: @sozap
Added subscriber: @HooglyBoogly
Testing D12746, I started to think that this is really the more important node to include short term.
Node Layout
The three inputs and an enum for the conversion make sense to me.
Node Name
Calling the node "Combine Vector" sounds too general in my opinion. Combining the "Combine XYZ" functionality with something like converting to spherical coordinates doesn't seem ideal, since one is very simple, and one is a much more complicated operation.
The name then wouldn't tell you much about what the node does.
I would suggest a name like "Convert Vector" or "Spherical Coordinates". The former is nice because it fits with cylindrical coordinates and it's phrased like an action.
Socket Names
For naming, I also think there's no need to use math variable names like Phi and Theta, we should just use the proper terms directly-- "Radius", "Zenith", and "Azimuth".
Units/Ranges
Everything Simon proposes here makes sense to me too.
Hm. This might be personal bias due to my physics background, but to me combining a vector socket from 3 components is fundamentally the same operation regardless of the used coordinate system.
Sure, in the code the cartesian system is used for everything, but I personally would prefer if a more agnostic approach.
This ties into the fact that conceptually there is no such thing as a cartesian vector or a spherical vector. A 3D vector can just be represented in different coordinate systems. So coming from that, to me it makes most sense to have general combine/separate vector nodes where the system can be chosen. Rather than having multiple nodes that have fundamentally the same purpose with very different names.
I've been looking at Sverchok recently and they use Compose/Decompose for this. For coordinate system, this could also be other data types like color e.g. HSL
So question is if the node should be generalized into a compose/decompose vector type node with different modes or if we have pairs of nodes for each conversion?
Edit:
@HooglyBoogly @SimonThommes
Due to discussion in D14034: Geometry/Compositor/Shader/Texture Nodes: Add general Combine/Separate Color nodes, shall I change D13772: (WIP) Node: Add Vector Convert node so that it just expands functionality of existing separate/combine xyz by adding modes and call it separate/combine vector? Or is this one of those nodes that should be shipped as an asset bundle?
This is getting a bit theoretical, but I don't think this is the way typical users will think about these operations. Spherical coordinates are much more complicated, they're the "other", the "non-standard", and I think it would be expected that this is reflected in the UI.
This might be technically true, but at every point in a node tree, doesn't a certain vector have a semantic meaning as well? That would include its coordinate system. Node link data is useless without that semantic meaning, so I'd personally consider it "part of the data", at least that's how it ends up working practically.
I like the names "Compose/Decompose" that @CharlieJolly mentioned above. "Decompose Vector" and "Compose Vector" sound reasonable. But if we end up calling this "Combine Vector", well it's certainly not the end of the world :)
Personally I think that would be taking the generic typed node idea too far, beyond what's actually useful conceptually. Combining colors and vectors are quite different.
If we end up adding a 2D vector socket, I think that could still be included in this node, but IMO a color node should still be separate.
@HooglyBoogly I'm getting a bit lost in what you are proposing. It seems to me that while we are disagreeing on the reasoning an a fundamental level, we are combing to the same conclusions on what this node should look like. That makes it a bit confusing to me.
Maybe we can just clear up the confusion in a meeting and get back to this thread. I'll put the topic on the agenda.
Copying from the meeting nodes here: