Spring Magic in Maya

Spring Magic for Maya is a script tool that can create dynamic bone chain animation.


Create waving, twisting, flexibility effect on bone chain

Create loop animation

Collision supporting

Work with existed animation controller

Wind effect

Latest Version: 3.2

Download SpringMagic 3.2

There is MotionBuilder Version Click Here

Version History


  • fix wind effect cannot set key issue
  • add warning for risky case, to avoid ” No valid objects supplied to ‘xform’ command” error

88 thoughts on “Spring Magic in Maya”

  1. hi man, it’s me again, do you have any solutions to make the spring motion larger and faster without changing the body motion? I animating a long hair with joint, tried to increase spring and twist value, the spring was smoother, but it also got slower, like, it’s weight got lighter with floating feeling or something

  2. 大神你好,我给裙子添加了解算,然后给两条腿加上碰撞体并约束在腿上了,已检查碰撞体可以跟着大小腿移动,解算出来的裙子依然会和腿穿插,不是小穿插,是解算直接忽略了碰撞体!请问碰撞体创建后是只需要把圆柱体缩放到腿部大小?还是需要连碰撞体的骨骼也要缩放到对应大小?另外碰撞体的范围是以圆柱体上下两端还是以两端延伸出来的两个球体为末梢?

    1. 1. 碰撞计算只处理被计算骨骼与胶囊体之间的碰撞关系,只有胶囊体的大小会对碰撞结果产生影响
      2. 碰撞体范围,是你所创建的胶囊体的体积范围,即两端的半球和它们之间的圆柱体


  3. Looks great, thanks. I tried to install or run the plugin in Maya 2018, but ran into some problems .

    The SpringMagic window that pops up sticks to the upper left corner of my desktop screen, there’s no toolbar visible so I can’t drag the window anywhere else, and can only close SpringMagic by quitting Maya completely.

    Also there’s no “install maya toolbar” button, as pointed out in the youtube tutorial video.

    Might I be doing something wrong ?



    1. few ideas for the UI issue:
      1 – click on the edge of springMagic window, usually it will pop back
      2 – run it couple times, it should slightly change position everytime it start
      3 – run tool then change screen resolution to larger desktop

      for install button:
      the button still there but not shows it’s icon because i accedently broken the link of image, will fix in next build, for now you can still click on that empty area to run the shelf function

  4. Hi 大佬~您的插件真的很棒 感觉很好用! 但我想问下 现在3.1版本的插件 进入到maya2019的时候ui界面会有些错乱,感觉按钮和字的比例或者分辨率不太对? 不知是我这边maya配置的问题还是怎么

    1. Maya 2018 开始改变了 UI 系统框架,2019 又做了额外调整,导致 Maya 的脚本工具界面在这两个版本里容易出现问题,我做了一些调整,但如果要完美匹配,则需要针对不同 Maya 版本配置不同界面,相对比较麻烦,所以如果不是非常影响使用的话,就先忍忍吧,毕竟老版本 Maya 用户是主流

  5. Hello baiyanbin,

    thank you so much for creating such a wonderful script.
    I just have one question regarding the collision.
    When the collision passes the joints very fast, like in 8 frames, the collision can’t react.
    Even when the fast move check box is on.
    Is there a way to have the collision working in that case??


  6. 烘焙错误
    select -r group3_nurbsCircle1_SpringProxy ;
    select -r group4_nurbsCircle1_SpringProxy ;
    select -r group4_nurbsCircle1_SpringProxy group5_nurbsCircle1_SpringProxy group6_nurbsCircle1_SpringProxy group7_nurbsCircle1_SpringProxy group8_nurbsCircle1_SpringProxy group9_nurbsCircle1_SpringProxy group10_nurbsCircle1_SpringProxy ;
    # 错误: IndexError: file D:\mayacj\SpringMagic\springMagic.py line 827: list index out of range #

  7. 白老师,我是一名动画师,非常喜欢您做的Spring Magic,有关里面的的算法,白老师能否给我推荐一些学习书籍或网站,非常感谢您

    1. Spring Magic 的飘带算法是我在研究袁锡中的 Max 版本插件基础上,自己领悟的,并且用了自己的方式来实现,碰撞和风的算法是完全我自己想出来的。网络上并没有对于这个算法的详细介绍,是因为我和袁先生都没有发表过相关内容,但我并不清楚是否有其他人研究过相关问题。
      如果你只是对 Maya 脚本感兴趣的话,可以在 google 搜索 pymel 为关键字的教程,视频等等,有许多详细的文字和视频教程。但大多为英文版,中文教程我没有专门找过,不太清楚,想来也是有足够入门教程可供选择的。
      最后,有任何技术问题,欢迎随时发邮件至 [email protected],我会尽量提供帮助

  8. 嗨白!
    感谢你分享这款伟大的插件。。我在使用时候遇到一个通病,当的角色已经K好动画后 再添加解算 就会报错,有时候还会出现模型飞掉的情况 。 但同样的绑定模型,打开没有动画的 它就没问题了 ·· 可以帮忙解决一下吗?

    1. 跟进一下,这位用户的问题是由于 Maya 文件使用了 ref 来参照其他绑定问题,导致计算出现问题

  9. I’m having a weird problem.
    When I press apply, top hierarchy joint along selected just began to spin very fast.
    I don’t know what to do.
    this happens very very often.

  10. 2016跟2017陆续出现这个问题,现在只能在2015里面算了再放进2016里面用了。
    # 错误: NameError: file D:\MAYA\X\SpringMagic\springMagic.py line 232: global name ‘springBindController’ is not defined

  11. Hi, thanks for the script man, but I have few unrelated question to your script:
    let say my scene is 50 frame (1->50), had a jump animation, 1st and 50th pose can’t be changed
    1.Is there any tips that can run the script from start to end without changing the 1st and the 50th pose? and make the whole animation basing on those 2 pose? I currently using key setting to set it from 2-49 so the script don’t touch them, but the 49th pose look totally unrelated to the 50th pose, which made the motion look really fast between them, I tried to set it from 2-48 or 45, result still the same.

    2. Man, the gimbal lock, in this case, is a nightmare to me, after playing the script, I used euler filter so I can simplify the curve later, but it also changed the rotate value of last pose, which is no good, since they must not be changed, do you know how to deal with it ?

    3. I also noticed that when I set the key setting from 1-49 it just delete my 50th key after applying, is that a bug ?

    1. 1. script will always try to back to start pose of calculation range, so your 1st frame will not been changed if you set start from 1 and no loop. but 50th frame cannot been guaranteed by procedural result, i usually will apply an animation layer to let it blend back to the end pose.
      2. try quaternion rotation interp when you met gimbal lock issue
      3. that may a bug, will log it, thx

  12. 你好,用了你的spring magic 很好用,但是有一个问题,在原有绑定控制器上使用控制器绑定按钮,新生成的关节并没有末端,导致解算的时候最后一个控制器没有动画。目前只能手动创建一个末端,有其他办法解决吗?

  13. Hello, thanks for creating such a wonderful tool to make our lives easier! I have a problem though, I can run the tool fine and it was able to create the bones with the correct simulation and movement. However, it could not bind the mesh and controllers to the bonechain. I’m kind of sure that this is a simple fix to do with either location of the script or the rig, but I’m bad at technical stuff and I could not figure out how to make it work. Here is the error log:

    # Error: RuntimeError: file C:\Program Files\Autodesk\Maya2016\Python\lib\site-packages\pymel\internal\pmcmds.py line 133: Could not add constraint or connections.
    Could not add constraint or connections. #

    I put the folder and scripts into the My Documents path (C:\Users\std\Documents\maya\2016\scripts\SpringMagic) and I followed your instructions to execfile from this path. I have also tried to import the reference into the scene but seems like the referencing is not the issue. Hence, I’m not sure why the mesh is not binding.

    Please let me know what I’m doing wrongly, and thank you again for your gift to the community!

    1. Also, I tried to create a collision for the bonechain just to try it out, but I receive this error and it doesn’t calculate after that. I followed the tutorial steps and settings as well.

      # Error: IndexError: file C:\Users\std\Documents\maya\2016\scripts\SpringMagic\springMagic.py line 881: list index out of range #

      This only happens when I turn Collisions on Active. When I turn it off, the bonechain simulates correctly again, but I will need the collision to work…

      1. Hi Jo,

        To make spring simulation works with controller through “Bind” function, you need to make sure that controllers are “free to move”, which means no other constraint that already applied on them, or you will get error when Spring Magic trying to apply another contraint on controller.

        About the collision issue, could you send me the file that i can repro the issue on my local?

        [email protected]

    1. did you check the tuotorial videos of spring magic collision?
      and btw, bone chain need to have a kind of movement motion to make collision working, it usually not a problem when real production, but may cause confusing when testing, so add some move and key it then try

  14. 你好,
    # Warning: pymel.core.general : Could not create desired MFn. Defaulting to MFnDagNode. #
    # Warning: pymel.core.general : Could not create desired MFn. Defaulting to MFnDagNode. #
    # Warning: pymel.core.general : Could not create desired MFn. Defaulting to MFnDagNode. #
    # Warning: pymel.core.general : Could not create desired MFn. Defaulting to MFnDagNode. #
    # Error: RuntimeError: file C:\Program Files\Autodesk\Maya2016\Python\lib\site-packages\pymel\internal\pmcmds.py line 133: No valid objects supplied to ‘xform’ command. #

    1. 嗯,没见过这种报错,估计可能是你的控制器事先关联了特殊的节点吧,导致脚本想做约束的时候发生冲突了,我只是猜的,具体得看文件才知道

  15. Thx for this script, much appreciated
    However I do have a certain issue with error : Python\lib\site-packages\pymel\internal\pmcmds.py line 140: Maya Node does not exist (or is not unique):: u’joint12_joint8_joint9_joint10_SpringNull’
    and also this one, more frequently : Python\lib\site-packages\pymel\internal\pmcmds.py line 134: No valid objects supplied to ‘xform’ command.

    I am not really good with Python at all and also, there is no real solutions presented on google for this particula issue so I was wondering could you explain in depth why and how these issue come to be in the first place and also what could we do to avoid it ?
    Many thanks

    1. 1. Make sure you have a clear scene to calculate, do calculate again on a faild one may cause error
      2. Make sure there has no duplicate name object in your scene

      If you still get error, plz send me the file and version of Maya to [email protected], i’ll check in my local to see what i can do, thx!

    1. Maya 版跟 Max 版的工具基本操作是一样的,区别只在于骨骼显示的样子不一样罢了,所以 Max 的使用方式完全可以用在 Maya 版上,只是有些功能 Maya 版还没有

  16. 大大 您的插件为什么我计算的时候会报错Maya2017\Python\lib\site-packges\pymel\internal\pmcmds.py line 134;Object is already connectde. 这是我模型绑定的问题吗 该怎么解决呢

    1. 你描述的很含糊,最好有详细的步骤。但看报错,可能是你想在自己设置的角色控制器上用飘带效果时产生的吧?可能是你的控制器上已经有了其他约束,然后脚本想加新的约束时造成冲突了。

  17. 您好,非常感谢您分享的插件,很好用~
    看了您B站的教程,后面给那个人物绑定模型做飘带效果的时候,腿没有飘起来,是因为膝关节的控制器的某个轴向被锁定了,我试过必须要XYZ轴3个轴向都有效的情况下才可以计算成功,如果说旋转轴XYZ轴,其中有一个轴被锁了,仍然可以绑定成功只计算其他没被锁定的轴向的话,就更好了~ 多谢作者

  18. 大白,你好,非常感谢你分享的springMagic插件,在使用中有个问题,就是碰撞体只有胶囊体形状,没法模拟墙面或者地面的碰撞,请问如果要用到的话, 自己要如何创建立方体的碰撞体。

    1. 在早期版本是有水平地面碰撞的,后来做了胶囊体碰撞后就去掉了,因为会令界面变得复杂,难以理解

  19. 白先生,您好

    1. 最近又研究了一下这个问题,发现 Maya 自带的 Animation Sweep 功能应该就是你要的,2014 版以上就有这个功能了,之前的版本不确定有没有。如果我要做一个工具的话,应该也是基于这个功能进行拓展,所以你如果有相关需求,先了解一下这个功能吧。

      1. 能得到您的回复真的很高兴!
        我尝试了这个功能很像我们需要的 但是它是首尾直接生成了一整段 而且不进行消失.所以在动画上可能不能很好的使用到这个功能.

  20. Hi Yanbin
    can you help me for somethings? when i click apply srping tools so….
    # Error: RuntimeError: file C:\Program Files\Autodesk\Maya2015\Python\lib\site-packages\pymel\internal\pmcmds.py line 134: No valid objects supplied to ‘xform’ command.

    help me fix,

    1. sometimes if you fail to finish a spring cauculation, there will be some nodes cannot be clean correctly, try reopen the file and do again.

      if still not working, you can mail me your with the steps you can reproduce the error to [email protected], i’ll look into it

    1. 循环功能并不会保留第一帧的 pose,它只是让整个计算结果本身能循环流畅
      如果需要保留初始 pose,则建议先复制第一帧的姿势(可以用工具提供的复制功能),在计算完成后再建立一个动画层,把初始 pose 粘贴回开头

  21. Spring Magic is wonderful!

    近日报道的PhysicsTools Promo插件似乎是在动画层上去添加随动效果,且能保持住原先的Keyframe,不知道在新版Spring Magic上能否见到超越该插件的功能?


    1. 本来有考虑过实现保留关键POSE的跟随动画,用于做鞭子攻击等效果,但是发现没什么人有这方面需求,也许大家有更好的解决方案吧,所以我也不来费这个力气了

    1. 1. spring magic 3.2 支持从Maya 2011 – 2018
      2. 请确保你的骨骼链是X轴指向子骨骼的
      3. 对于非X轴指向子骨骼的骨骼链,可以使用控制器模块的绑定功能生成骨骼链来计算

  22. 您好 白先生
    您的 Spring Magic 3.2 非常的好用 让我极大的简化了工作流程 节省很多时间
    感谢 敬您一杯奶茶!
    另外也希望以后能有更好的碰撞效果 希望它能越来越好

  23. Hi Baiyanbin,

    Thank you bro for this magical tool “SpringMagic”. I am a freelance animator who works alone, and it is tools like these that make my day. You definitely deserve a coffee.

    Hoping for more of the magic.

    Thank you.

    Jinu John

Leave a Reply

Your email address will not be published. Required fields are marked *