Geometry Nodes: Initial basic rotation socket nodes #109030

Merged
Hans Goudey merged 24 commits from HooglyBoogly/blender:geometry-nodes-rotation-type into main 2023-08-24 14:59:02 +02:00
Member

This PR adds an initial set of nodes using the new rotation socket.
6 nodes build rotations or convert them to other formats, a 7th rotates
a vector with a rotation, and the last inverts rotations.

The design task #109965 describes the choice to use separate nodes
for the rotation construction and separation operations. In the future,
a "Switch Node" operator (#111438) will help to make working with
these separated nodes faster.

  • Axis Angle to Rotation
  • Rotation to Axis Angle
  • Combine Quaternion
  • Separate Quaternion
  • Euler to Rotation
  • Rotation to Euler
  • Rotate Vector
  • Invert Rotation

See #92967


image

This PR adds an initial set of nodes using the new rotation socket. 6 nodes build rotations or convert them to other formats, a 7th rotates a vector with a rotation, and the last inverts rotations. The design task #109965 describes the choice to use separate nodes for the rotation construction and separation operations. In the future, a "Switch Node" operator (#111438) will help to make working with these separated nodes faster. - **Axis Angle to Rotation** - **Rotation to Axis Angle** - **Combine Quaternion** - **Separate Quaternion** - **Euler to Rotation** - **Rotation to Euler** - **Rotate Vector** - **Invert Rotation** See #92967 --- ![image](/attachments/1a85661a-f210-4531-b0e8-0e2e2aff2ecc)
181 KiB
Hans Goudey added 10 commits 2023-06-15 20:30:45 +02:00
Hans Goudey added this to the 4.0 milestone 2023-06-15 20:30:56 +02:00
Hans Goudey added this to the Nodes & Physics project 2023-06-15 20:32:16 +02:00
Author
Member

@blender-bot package

@blender-bot package
Member

Package build started. Download here when ready.

Package build started. [Download here](https://builder.blender.org/download/patch/PR109030) when ready.
Hans Goudey added 1 commit 2023-06-15 20:35:55 +02:00
Author
Member
  • From Iliya: zero normal for axis angle cause crash
  • From Leon: maybe the inputs of the "Rotate Vector" node should be flipped ("Vector" first, "Quaternion" second).
- From Iliya: `zero normal for axis angle cause crash` - From Leon: `maybe the inputs of the "Rotate Vector" node should be flipped ("Vector" first, "Quaternion" second).`
Hans Goudey added 4 commits 2023-06-16 20:28:33 +02:00
Hans Goudey requested review from Lukas Tönne 2023-06-16 20:28:43 +02:00
Hans Goudey requested review from Jacques Lucke 2023-06-16 20:28:44 +02:00
Member

Generally looks fine, couldn't spot any issues. We should just go over the nodes in a meeting once to make sure everyone is on the same page.

Generally looks fine, couldn't spot any issues. We should just go over the nodes in a meeting once to make sure everyone is on the same page.
Hans Goudey added 1 commit 2023-06-21 15:45:59 +02:00
Hans Goudey added 1 commit 2023-06-24 20:05:27 +02:00

Hi, very cool!
One thought though, maybe flip the Rotation and Vector socket of the "Rotate Vector" Node.
This would make it consistent to the Vector Rotate node, the these two nodes can even be combined. So that the Vector Rotate node also has an Quaterion Type
(Ups Typo in Quaternion)

Hi, very cool! One thought though, maybe flip the Rotation and Vector socket of the "Rotate Vector" Node. This would make it consistent to the Vector Rotate node, the these two nodes can even be combined. So that the Vector Rotate node also has an Quaterion Type (Ups Typo in Quaternion)
Author
Member

I made a design task regarding the choice to use a separate node for each operation here: #109965

I made a design task regarding the choice to use a separate node for each operation here: #109965
Hans Goudey added 3 commits 2023-07-25 22:02:45 +02:00
Hans Goudey added 2 commits 2023-08-22 00:23:00 +02:00
Member

Generally looks good, but some notes:

  • Would be good to have some task for the replace node operator, since that's related to the discussion of whether to split or merge these nodes. I can create a task, but I'm not sure right now if you have already and I'm not finding it.
  • I still find the naming a bit inconsistent. The rotation socket is meant to be somewhat opaque, i.e. on the user level it doesn't matter what internal representation it uses. However the Separate Quaternion node kind of leaks that information. I think it should be called Rotation to Quaternion instead, just like the Rotation to Euler node. Same with the Combine Quaternion node.
Generally looks good, but some notes: * Would be good to have some task for the replace node operator, since that's related to the discussion of whether to split or merge these nodes. I can create a task, but I'm not sure right now if you have already and I'm not finding it. * I still find the naming a bit inconsistent. The rotation socket is meant to be somewhat opaque, i.e. on the user level it doesn't matter what internal representation it uses. However the `Separate Quaternion` node kind of leaks that information. I think it should be called `Rotation to Quaternion` instead, just like the `Rotation to Euler` node. Same with the `Combine Quaternion` node.
Hans Goudey added 2 commits 2023-08-23 21:03:48 +02:00
Jacques Lucke approved these changes 2023-08-24 06:03:54 +02:00
@ -450,14 +450,14 @@ static void fluid_free_endjob(void *customdata)
if (job->success) {
/* Show free job info */
WM_reportf(
RPT_INFO, "Fluid: %s complete! (%.2f)", job->name, PIL_check_seconds_timer() - job->start);
Member

unrelated changes

unrelated changes
HooglyBoogly marked this conversation as resolved
@ -0,0 +20,4 @@
static void node_build_multi_function(NodeMultiFunctionBuilder &builder)
{
static auto fn = mf::build::SI2_SO<float3, float, math::Quaternion>(
"Axis Angle to Quaternion", [](float3 axis, float angle) {
Member

const, in a few places

`const`, in a few places
HooglyBoogly marked this conversation as resolved
Lukas Tönne approved these changes 2023-08-24 14:02:52 +02:00
Hans Goudey merged commit 45d8a8b0c3 into main 2023-08-24 14:59:02 +02:00
Hans Goudey deleted branch geometry-nodes-rotation-type 2023-08-24 14:59:04 +02:00
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 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#109030
No description provided.