Bone IK constraint - add lockable axis properties for stretching #83911

Open
opened 2020-12-17 23:16:22 +01:00 by Daniel Bystedt · 12 comments
Member

Adding task after e-mail conversation with Sybren 2020-12-17

The bone IK constraint can activate stretching on the constrained bones if constrained bones has

Properties / Bone properties / Inverse Kinematics / IK Stretch > 0

example:

bpy.context.object.pose.bones["Bone.005"].ik_stretch = 0.01

The problem is that the constrained bones stretch in all axes and not only in the +Y axis of the bone, which results in unwanted "scaling" of each bone.


Here is a video showing the issue:

ik stretch.mp4


My suggestion is to fix this by adding properties to each bone that show the resulting IK stretching per axis on each bone. These properties should be readable (for drivers) but not possible for the user to change, since the stretching is generated. The property should be lockable by the user in order to fix any unwanted scaling on a specific axis.

Another solution is to add properties that is a factor (multiplier) to the scaling/stretching per axis. The upside is that the user can change the values, but the downside is that the user does not have a property to read the generated IK stretch values.

I leave it up to you to decide what is the most "blender way" in regards to implementation.

image.png

*Adding task after e-mail conversation with Sybren 2020-12-17* The bone IK constraint can activate stretching on the constrained bones if constrained bones has **Properties / Bone properties / Inverse Kinematics / IK Stretch > 0** example: ``` bpy.context.object.pose.bones["Bone.005"].ik_stretch = 0.01 ``` The problem is that the constrained bones stretch in all axes and not only in the +Y axis of the bone, which results in unwanted "scaling" of each bone. --- Here is a video showing the issue: [ik stretch.mp4](https://archive.blender.org/developer/F9515707/ik_stretch.mp4) --- My suggestion is to fix this by adding properties to each bone that show the resulting IK stretching per axis on each bone. These properties should be readable (for drivers) but not possible for the user to change, since the stretching is generated. The property should be lockable by the user in order to fix any unwanted scaling on a specific axis. Another solution is to add properties that is a factor (multiplier) to the scaling/stretching per axis. The upside is that the user can change the values, but the downside is that the user does not have a property to read the generated IK stretch values. I leave it up to you to decide what is the most "blender way" in regards to implementation. ![image.png](https://archive.blender.org/developer/F9515708/image.png)
Sybren A. Stüvel was assigned by Daniel Bystedt 2020-12-17 23:16:22 +01:00
Author
Member

Added subscriber: @DanielBystedt

Added subscriber: @DanielBystedt

Added subscriber: @jpbouza-4

Added subscriber: @jpbouza-4

I'm gonna take the liberty to add Campbell and Daniel Lara to the conversation because I think both worked on this topic in the past, but I don't remember what solution they got to...

I'm gonna take the liberty to add Campbell and Daniel Lara to the conversation because I think both worked on this topic in the past, but I don't remember what solution they got to...

OK, as I don't own this task, I don't think I can add subscribers??? haha, you guys do it if you can.

OK, as I don't own this task, I don't think I can add subscribers??? haha, you guys do it if you can.
Member

Added subscribers: @ideasman42, @pepe-school-land

Added subscribers: @ideasman42, @pepe-school-land

Added subscriber: @brecht

Added subscriber: @brecht

I think this is a nice idea. I haven't seen the "read-only but lockable to the current value" approach anywhere else in Blender, but I think it makes sense here.

Adding @brecht as he's the main developer for the constraints (wiki).

I think this is a nice idea. I haven't seen the "read-only but lockable to the current value" approach anywhere else in Blender, but I think it makes sense here. Adding @brecht as he's the main developer for the constraints ([wiki](https://wiki.blender.org/wiki/Modules#Animation_.26_Rigging)).

Changed status from 'Needs Triage' to: 'Confirmed'

Changed status from 'Needs Triage' to: 'Confirmed'
  • For reading the values: all IK stretch does is modify the bone scale. Reading the bone Y scale through a driver appears to work here. Is that enough?
  • For control: a single slider to set for how much IK stretch affects both X and Z axis seems most convenient to me. Changing it for Y does not make much sense as the IK chain would not hit the target. Independent control of X and Z seems unimportant.
* For reading the values: all IK stretch does is modify the bone scale. Reading the bone Y scale through a driver appears to work here. Is that enough? * For control: a single slider to set for how much IK stretch affects both X and Z axis seems most convenient to me. Changing it for Y does not make much sense as the IK chain would not hit the target. Independent control of X and Z seems unimportant.
Author
Member

In #83911#1078308, @brecht wrote:

  • For reading the values: all IK stretch does is modify the bone scale. Reading the bone Y scale through a driver appears to work here. Is that enough?

Yes, that makes sense.

  • For control: a single slider to set for how much IK stretch affects both X and Z axis seems most convenient to me. Changing it for Y does not make much sense as the IK chain would not hit the target. Independent control of X and Z seems unimportant.

That sounds like a nice solution.

> In #83911#1078308, @brecht wrote: > * For reading the values: all IK stretch does is modify the bone scale. Reading the bone Y scale through a driver appears to work here. Is that enough? Yes, that makes sense. > * For control: a single slider to set for how much IK stretch affects both X and Z axis seems most convenient to me. Changing it for Y does not make much sense as the IK chain would not hit the target. Independent control of X and Z seems unimportant. That sounds like a nice solution.
Sybren A. Stüvel removed their assignment 2021-02-08 10:43:21 +01:00

Added subscriber: @dr.sybren

Added subscriber: @dr.sybren

As I'm currently working on another project, I don't want to keep claiming this task. I'll unassign this from myself, so that someone else could pick it up.

As I'm currently working on another project, I don't want to keep claiming this task. I'll unassign this from myself, so that someone else could pick it up.
Philipp Oeser removed the
Interest
Animation & Rigging
label 2023-02-09 14:35:56 +01: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 project
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#83911
No description provided.