Spring constraint #26825

Closed
opened 2011-04-07 18:07:04 +02:00 by Ivo Grigull · 13 comments
Member

%%%The spring constraint can be used to get wobbly/bouncy effects on bone chains such as antennas etc. The target bone (the one carrying the constraint) copies the transforms of the source bone and adds the spring effect to it. It also uses a buffer that allows skipping and backwards scrubbing while maintaining consistency, and as the buffer is saved along with the blender file, it should work on a renderfarm too (however i did not actually test that).

Here is a little demo on vimeo: http://vimeo.com/22077796

There is a windows build for testing available for download here: http://graphicall.org/builds/builds/showbuild.php?action=show&id=1698

An example blend-file: http://ivogrigull.com/blender25/spring_demo.blend

One issue is interactivity though. It is not possible to pose/animate a chain predictably while the constraint is active, because the buffers of the chain's spring constraints would need to be updated on the fly. I think this goes beyond my coding abilities and understanding of the animation system code. And i gues it would be relatively slow too. Nevertheless i believe it is a great help for animators and certainly nice to have, even if he needs to enable/disable in order to edit it. I suggest to use a python driver expression to control all bones' constraints at once to ease the pain. In the current state it needs to be considered as a post effect.

%%%

%%%The spring constraint can be used to get wobbly/bouncy effects on bone chains such as antennas etc. The target bone (the one carrying the constraint) copies the transforms of the source bone and adds the spring effect to it. It also uses a buffer that allows skipping and backwards scrubbing while maintaining consistency, and as the buffer is saved along with the blender file, it should work on a renderfarm too (however i did not actually test that). Here is a little demo on vimeo: http://vimeo.com/22077796 There is a windows build for testing available for download here: http://graphicall.org/builds/builds/showbuild.php?action=show&id=1698 An example blend-file: http://ivogrigull.com/blender25/spring_demo.blend One issue is interactivity though. It is not possible to pose/animate a chain predictably while the constraint is active, because the buffers of the chain's spring constraints would need to be updated on the fly. I think this goes beyond my coding abilities and understanding of the animation system code. And i gues it would be relatively slow too. Nevertheless i believe it is a great help for animators and certainly nice to have, even if he needs to enable/disable in order to edit it. I suggest to use a python driver expression to control all bones' constraints at once to ease the pain. In the current state it needs to be considered as a post effect. %%%
Author
Member

Changed status to: 'Open'

Changed status to: 'Open'

%%%updated to svn r41542
attached .spring_patch_r41542.patch%%%

%%%updated to svn r41542 attached .spring_patch_r41542.patch%%%

%%%update to r41769%%%

%%%update to r41769%%%

%%%update to r46801%%%

%%%update to r46801%%%

%%%Update to R55180%%%

%%%Update to R55180%%%

Added subscriber: @mont29

Added subscriber: @mont29

Is this patch still alive/useful?

Is this patch still alive/useful?

I still use it , but it crash in object mode , works fine in armature pose mode.
It's from same author of mesh cache modifier , very useful for character animation.

I still use it , but it crash in object mode , works fine in armature pose mode. It's from same author of mesh cache modifier , very useful for character animation.

Added subscriber: @Sergey

Added subscriber: @Sergey

This is useful feature to have, but i'm not totally happy with the code. Main issues:

  • Use mathutil funcitons instead of vector macros (i.e. copy_v3_v3 instead of VECCOPY)
  • Boolean are to be true/false not TRUE/FALSE nowadays
  • Code style is a bit weird, would be nice to have it closer http://wiki.blender.org/index.php/Dev:Doc/Code_Style
  • But main concern is storing the way constraint is storing the previous location in itself/ That's always asking for problems when mixing viewport and final render and also when you change the current frame directly in the timeline. Not totally sure how it should work reliably, could require some more general purpose caching or so, which is not totally what constraints currently are intended to use..
This is useful feature to have, but i'm not totally happy with the code. Main issues: - Use mathutil funcitons instead of vector macros (i.e. copy_v3_v3 instead of VECCOPY) - Boolean are to be true/false not TRUE/FALSE nowadays - Code style is a bit weird, would be nice to have it closer http://wiki.blender.org/index.php/Dev:Doc/Code_Style - But main concern is storing the way constraint is storing the previous location in itself/ That's always asking for problems when mixing viewport and final render and also when you change the current frame directly in the timeline. Not totally sure how it should work reliably, could require some more general purpose caching or so, which is not totally what constraints currently are intended to use..

Added subscriber: @dfelinto

Added subscriber: @dfelinto

Changed status from 'Confirmed' to: 'Archived'

Changed status from 'Confirmed' to: 'Archived'
Dalai Felinto self-assigned this 2019-12-23 18:53:42 +01:00

Hi, thanks for your patch.

We are undergoing a Tracker Curfew where we are automatically closing old patches.

If you think the patch is still relevant please update and re-submit it. For new features make sure there is a clear design from the user level perspective.

Hi, thanks for your patch. We are undergoing a [Tracker Curfew ](https://code.blender.org/?p=3861) where we are automatically closing old patches. If you think the patch is still relevant please update and re-submit it. For new features make sure there is a clear design from the user level perspective.
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
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
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#26825
No description provided.