Geometry Nodes: Add Align Rotation to Vector node #118565

Merged
Hans Goudey merged 9 commits from HooglyBoogly/blender:geometry-nodes-align-rotation-to-vector into main 2024-04-30 15:52:22 +02:00
Member

A version of "Align Euler to Vector" with the rotation socket
instead of the vector Euler socket. Other than that, and a few
cleanups to use newer math functions, the node is the same.

The old node is just "Deprecated" for now. We could remove
it with versioning, but we can also wait to do that.

In a simple test this node is about 1.7 times faster than the old one.


image

A version of "Align Euler to Vector" with the rotation socket instead of the vector Euler socket. Other than that, and a few cleanups to use newer math functions, the node is the same. The old node is just "Deprecated" for now. We could remove it with versioning, but we can also wait to do that. In a simple test this node is about 1.7 times faster than the old one. --- ![image](/attachments/fcf9c599-e2a9-4fa3-ad14-fad6a4e21e8e)
Hans Goudey added 1 commit 2024-02-21 14:57:47 +01:00
40b640d08a Geometry Nodes: Add Align Rotation to Vector node
A version of "Align Euler to Vector" with the rotation socket
instead of the vector Euler socket. Other than that, and a few
cleanups to use newer math functions, the node is the same.

The old node is just "Deprecated" for now. We could remove
it with versioning, but we can also wait to do that.
Hans Goudey requested review from Jacques Lucke 2024-02-21 14:58:42 +01:00
Hans Goudey added this to the Nodes & Physics project 2024-02-21 14:58:50 +01:00
Hans Goudey added the
Interest
Geometry Nodes
label 2024-02-21 14:59:00 +01:00
Member

Not sure, but I feel like it should be possible to achieve this without having to convert the quaternions to rotation matrices and back? That could also be left for a future update of course

Not sure, but I feel like it should be possible to achieve this without having to convert the quaternions to rotation matrices and back? That could also be left for a future update of course
Author
Member

Good point! That's worth looking into anyway, it might be simple.

Good point! That's worth looking into anyway, it might be simple.
Hans Goudey added 2 commits 2024-02-21 18:14:04 +01:00
Hans Goudey added 1 commit 2024-02-22 18:14:40 +01:00
Hans Goudey added 1 commit 2024-02-22 18:42:15 +01:00
First-time contributor

Since we are now free from the arbitrary X/Y/Z axes when talking about rotations, would it make sense to change the pivot axis to a vector input socket?

Since we are now free from the arbitrary X/Y/Z axes when talking about rotations, would it make sense to change the pivot axis to a vector input socket?
Jacques Lucke added 1 commit 2024-04-22 18:27:40 +02:00
Hans Goudey added 1 commit 2024-04-26 17:55:04 +02:00
Jacques Lucke approved these changes 2024-04-30 14:59:32 +02:00
@ -0,0 +22,4 @@
b.is_function_node();
b.add_input<decl::Rotation>("Rotation").hide_value();
b.add_input<decl::Float>("Factor").default_value(1.0f).min(0.0f).max(1.0f).subtype(PROP_FACTOR);
b.add_input<decl::Vector>("Vector").default_value({0.0, 0.0, 1.0}).subtype(PROP_XYZ);
Member

Not sure if we discussed this on this node, but maybe it would be good if the output rotation would be zero by default? I.e. either this should be 1, 0, 0 or the default axis should be Z. Right now I'd argue for the latter, because people generally know better where the local Z axis is compared to the X or Y axis.

Not sure if we discussed this on this node, but maybe it would be good if the output rotation would be zero by default? I.e. either this should be `1, 0, 0` or the default axis should be Z. Right now I'd argue for the latter, because people generally know better where the local Z axis is compared to the X or Y axis.
HooglyBoogly marked this conversation as resolved
Hans Goudey added 2 commits 2024-04-30 15:50:22 +02:00
Hans Goudey merged commit 462e7aeedd into main 2024-04-30 15:52:22 +02:00
Hans Goudey deleted branch geometry-nodes-align-rotation-to-vector 2024-04-30 15:52:25 +02:00
Sign in to join this conversation.
No reviewers
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 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#118565
No description provided.