Armature: apply new DualQuat scale handling to constraints and crazyspace. #111759
No reviewers
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
2 Participants
Notifications
Due Date
No due date set.
Dependencies
No dependencies set.
Reference: blender/blender#111759
Loading…
Reference in New Issue
No description provided.
Delete Branch "angavrilov/blender:armature-dualquat-pivot"
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?
The
f12e9f32b5
patch introduced a new improved method of blendingdual quaternion transformations to handle combined scale and rotation
better. However, the changes were not complete:
a complete transformation matrix. As an optimization, the new method
avoided fully computing the scale component, so the matrix would
have no scale or shear.
modifier, and it was not updated. The constraint also requires
computing a complete matrix.
This change extracts the new math into a utility function, change
the optimization to be controlled by a parameter, and use the new
function in the constraint.
Attached are files from the original #108134 PR with added empties using the Armature constraint.
Thanks for putting the work in on this! Everything works great in my testing, and the code generally looks good. Just some nits I'd like addressed and some questions.
@ -82,3 +69,1 @@
else {
add_weighted_dq_dq(dq_accum, deform_dq, weight);
}
add_weighted_dq_dq_pivot(dq_accum, deform_dq, co_in, weight, mat_accum != nullptr);
It's not clear to me why the last parameter here is based on whether
mat_accum
is null or not, especially sincemat_accum
doesn't seem to be used at all if we're in this branch. Can you add a comment documenting that?From blender.chat:
@ -292,0 +279,4 @@
/* The matrix itself is only computed in mul_v3m3_dq below, but
* smat not being null is important for pchan_deform_accumulate. */
smat = summat;
}
This was easier for me to follow when it was rolled into the code around lines 370-380 ish. Is moving the code up here a bug fix, or is it just a stylistic change? If it's just stylistic, please revert.
smat
==mat_accum
, it was using the pointer as an implicit boolean parameter. Now it is an explicit bool flag.@ -2648,3 +2648,3 @@
armdef_accumulate_matrix(ct->tar->object_to_world,
iobmat,
ct->tar->world_to_object,
How sure are you that
world_to_object
is valid here? The previous code was computing this fromobject_to_world
, which makes me wonder ifworld_to_object
isn't always guaranteed to be up-to-date when this function is called.Reverted since this is unrelated to the main problem.
05582b25b0
to7b2961f47c
@ -116,3 +103,3 @@
pchan_deform_accumulate(
&quats[index], mats[index + 1].mat, co, weight * (1.0f - blend), vec, dq, defmat);
&quats[index], mats[index + 1].mat, co, weight * (1 - blend), vec, dq, defmat, full_deform);
According to the style guide, float literals are supposed to be written
1.0f
as it was before. I don't feel strongly about this myself, but since it was already that way, and that adheres to the style guide, I think it's best to leave it as it was.7b2961f47c
toddb85d3d9a
Looks good to me!
Thanks so much for both catching and fixing this!