Spring Magic for Maya is a script tool that can create dynamic bone chain animation.
Features:
Create waving, twisting, flexibility effect on bone chain
Create loop animation
Collision supporting
Work with existed animation controller
Wind effect
Special Thanks:
Benoit Degand, who help improved performance and re-constract script in a better way.
Latest Version: 3.5a
Download Spring Magic 3.5a Python 3
( For Maya 2022+, Credit to “MCL” and “二次元bug” )
There is MotionBuilder Version Click Here
Version History
v3.5a
- Fix bug tension calculation introduced in the 3.5 (Benoit Degand)
- Fix bug inertia calculation introduced in the 3.5 (Benoit Degand)
- Fix bug Shelf button error
v3.5
- Add possiblity to cancel the operation (Esc) (Benoit Degand)
- Increase speed x2 (Benoit Degand)
- Fragment source code in several files (Benoit Degand)
- Pose Match default off
v3.4b
- fix collision bug
- fix wind bug
v3.4
- add plane collision
- add pose match
v3.3
- add inertia effect
v3.2
- fix wind effect cannot set key issue
- add warning for risky case, to avoid ” No valid objects supplied to ‘xform’ command” error
是不是 maya2019 以上版本就不能用这个插件了
您好。请问下,我按照您哔哩哔哩上面的流程一样去操作骨骼飘动解算,但是骨骼在第二节就疯狂乱转了,后面几节也没有跟随运动。。。。请问如何解决。。感激不尽。。。
老生常谈的问题,翻翻前面几个人的提问,很多都是类似情况。
你的骨骼链得是 +X 轴指向子骨骼的设置才行
line 14: No module named springmagic
请问老师 这个是什么问题?
maya2018
请认真看工具附带的安装说明,并按照指引操作
// 警告: line 42: 开始位置(1)无效。它必须在从 1 到字符串长度的范围内。正在将索引钳制到相应范围。
这个问题怎么解决呢?
你看看参与计算的骨骼在场景里有没有重名物体
老师你好 我安装后为什么不能移动窗口呢
Thanks for the amazing tool, it’s very helpful.
Two ideas.
Scale the spring twist or flex per bone in a chain.
Say you want the root of the chain to be stiffer than the tip.
e.g. a four joint chain 1-2-3-4-
being able to enter 0.2 for the start(Joint1) 0.8 for the end(Joint4) and have the script work out it needs to apply 0.4 and 0.6 to the middle joints. This can be done manually however it becomes tedious for large amounts of bones.
Having the option to bake to an animation layer for the controllers. This would allow the script to be run multiple times each time recording to a different animation layer to see what looks best or easily crossfade between or back to the base animation layer
你好,为什么我总是安装不了
execfile(r”C:\Users\admin\Documents\SpringMagic”)
# 错误: IOError: file line 1: 21 #
execfile(r”C:\Users\admin\Documents\SpringMagic\SpringMagic.py”)
把命令改成这样
老师太优秀了,我正到处找包裹变权重的工具,一不小心发现了一个宝藏。谢谢老师无私的分享。
老师,您好,我在完成了所有操作之后,确认了动画没有问题,就把骨骼上的动画烘焙回到控制器上,但是烘焙不了,给了我一个错误信息————–# 错误: IndexError: file F:\SpringMagic\SpringMagic\springMagic.py line 827: list index out of range
你是不是改过“绑定”功能生成的骨骼链的名字?或者有重名的物体?
都没有这些操作,可能是我的模型不支持这个,因为模型是蛇,除了正常的骨骼外,还有一段是路径动画的专用骨骼,不知道是这个原因导致的
# 错误: RuntimeError: file C:\Program Files\Autodesk\Maya2018\Python\lib\site-packages\pymel\internal\pmcmds.py line 134: 无法添加约束或连接。
无法添加约束或连接。
求助大大,我报了这个错误,难受。。难道不兼容18版本吗?我的最新3.2版本的
我的也是这个问题,maya2018有这个问题,16能正常运行。
# 警告: joint39|joint40|joint41|joint42|joint43|joint44|joint45 has duplicate name objcet! Stopped!
老师老师,我绑定的文件计算骨骼时会弹出这个错误,请问是怎么回事啊,我这边单个检查也没看到有重复的名字
joint45 这个有重名物体,仔细检查一下
嗯嗯,谢谢老师(之前忘回了……)
老师您好 我使用的是3.2的版本 MAYA 版本是2018的 飘带计算完成 烘焙不到控制器上,提示这样的报错。# 错误: IndexError: file D:\my_scripts\SpringMagic\springMagic.py line 827: list index out of range。 我应该怎么解决。
你是否使用了参考方式引入的绑定?如果是那样的话,目前不支持
老师您好 。我没有用引入的角色 是直接打开的角色。
那你可以把文件和你的操作步骤说明发到我邮箱 [email protected],我看看是什么原因
我这边最高是 Maya 2018
好的。谢谢
大神你好! 建多节骨骼测试加碰撞的是可以的,但用骨骼建立一个碰撞体 ,用角色的控制器去约束它,解算骨骼为何没有碰撞效果?
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
usually people will set key on root bone of their chain, to get better control of follow throw result
大神你好,我给裙子添加了解算,然后给两条腿加上碰撞体并约束在腿上了,已检查碰撞体可以跟着大小腿移动,解算出来的裙子依然会和腿穿插,不是小穿插,是解算直接忽略了碰撞体!请问碰撞体创建后是只需要把圆柱体缩放到腿部大小?还是需要连碰撞体的骨骼也要缩放到对应大小?另外碰撞体的范围是以圆柱体上下两端还是以两端延伸出来的两个球体为末梢?
1. 碰撞计算只处理被计算骨骼与胶囊体之间的碰撞关系,只有胶囊体的大小会对碰撞结果产生影响
2. 碰撞体范围,是你所创建的胶囊体的体积范围,即两端的半球和它们之间的圆柱体
请确认你计算时开启了碰撞选项,而不仅仅是创建了胶囊体
另外建议观看教学视频,确认操作无误
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 ?
Thanks,
R.
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
Hi 大佬~您的插件真的很棒 感觉很好用! 但我想问下 现在3.1版本的插件 进入到maya2019的时候ui界面会有些错乱,感觉按钮和字的比例或者分辨率不太对? 不知是我这边maya配置的问题还是怎么
Maya 2018 开始改变了 UI 系统框架,2019 又做了额外调整,导致 Maya 的脚本工具界面在这两个版本里容易出现问题,我做了一些调整,但如果要完美匹配,则需要针对不同 Maya 版本配置不同界面,相对比较麻烦,所以如果不是非常影响使用的话,就先忍忍吧,毕竟老版本 Maya 用户是主流
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??
Thankyou.
plz try “sub-frame” setting, which is design for that situation and will do n times check in 1 frame to get better collision catch
烘焙错误
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 #
Hello dear baiyanbin. it looks like this isn’t working in maya 2018.
the script is running but it doesn’t even make things move smoothly with overlap.
plz make sure your bone chain set up with +X axis towards child
can you explain how to do that?
白老师:我的win10系统 安装你的插件后一直安装不上去 进度卡在0%不动弹
不是很明白你的意思,我的工具并没有安装进度,直接解压缩后按照说明文档设置即可
白老师,我是一名动画师,非常喜欢您做的Spring Magic,有关里面的的算法,白老师能否给我推荐一些学习书籍或网站,非常感谢您
Spring Magic 的飘带算法是我在研究袁锡中的 Max 版本插件基础上,自己领悟的,并且用了自己的方式来实现,碰撞和风的算法是完全我自己想出来的。网络上并没有对于这个算法的详细介绍,是因为我和袁先生都没有发表过相关内容,但我并不清楚是否有其他人研究过相关问题。
如果你只是对 Maya 脚本感兴趣的话,可以在 google 搜索 pymel 为关键字的教程,视频等等,有许多详细的文字和视频教程。但大多为英文版,中文教程我没有专门找过,不太清楚,想来也是有足够入门教程可供选择的。
最后,有任何技术问题,欢迎随时发邮件至 [email protected],我会尽量提供帮助
好的,谢谢白老师
嗨白!
感谢你分享这款伟大的插件。。我在使用时候遇到一个通病,当的角色已经K好动画后 再添加解算 就会报错,有时候还会出现模型飞掉的情况 。 但同样的绑定模型,打开没有动画的 它就没问题了 ·· 可以帮忙解决一下吗?
请把出问题的的文件发我邮箱 [email protected],并告诉我 Maya 版本,最好还附上你的操作视频,我可以帮你查查什么原因
已发送。
跟进一下,这位用户的问题是由于 Maya 文件使用了 ref 来参照其他绑定问题,导致计算出现问题
之前也有用户说到过类似现象,但由于我缺乏测试文件来解决此类问题,所以目前无能为力
我测试如果绑定文件中如果含有namespace,再ref制作就会报错,
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.
Plz make sure it always x-axis point to child in your bone chain
2016跟2017陆续出现这个问题,现在只能在2015里面算了再放进2016里面用了。
# 错误: NameError: file D:\MAYA\X\SpringMagic\springMagic.py line 232: global name ‘springBindController’ is not defined
我很不幸的也遇到了这个错误,年前都用得好好的。。。不知道是哪里出了问题?
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. 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
白老师请您喝了6杯奶茶并想请教了一个springmagic的问题:D
通过邮件发给您了,有空的话若能瞟一眼则感激不尽!
点击计算出现爆红# Error: AttributeError: file D:\SpringMagic\springMagic.py line 1112: ‘NoneType’ object has no attribute ‘name’
你提的两个问题应该都修复了,之前有点bug,请重新下载一下
安装爆红# Error: IndexError: file D:\csz\Spring\springMagic.py line 508: list index out of range
UI 界面弹出来了 但是里面命令点击任何都爆红
你好,用了你的spring magic 很好用,但是有一个问题,在原有绑定控制器上使用控制器绑定按钮,新生成的关节并没有末端,导致解算的时候最后一个控制器没有动画。目前只能手动创建一个末端,有其他办法解决吗?
嗯。。。这确实是个问题,我会记下来,下次更新的时候修复,目前来说你先手动创建一个吧
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!
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…
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]
Hello!
Collisions don’t work in Maya. Otherwise all is okay.
What I can do wrong? Tested in Maya 2016 and 2017
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
你好,
我在使用插件的时候一直报错
# 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. #
用控制器生成骨骼选择骨骼去进行计算就会出现这个问题
但是单独用骨骼去生成跟随动画的时候是没有问题的,请问是怎么回事
嗯,没见过这种报错,估计可能是你的控制器事先关联了特殊的节点吧,导致脚本想做约束的时候发生冲突了,我只是猜的,具体得看文件才知道
有没有种可能是我之前有计算过一遍,然后烘焙后保存了,下次打开就不能继续进行第2次计算了呢?
这个我没试过,按说应该不会,你可以把文件发我 [email protected]
我帮你查查原因
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
N.
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!
大神能不能像max版一样,出几集实战案例啊。
Maya 版跟 Max 版的工具基本操作是一样的,区别只在于骨骼显示的样子不一样罢了,所以 Max 的使用方式完全可以用在 Maya 版上,只是有些功能 Maya 版还没有
您的插件是否会考虑出MAX版本?非常期待碰撞和风力。
已经有了,请看首页
大大 您的插件为什么我计算的时候会报错Maya2017\Python\lib\site-packges\pymel\internal\pmcmds.py line 134;Object is already connectde. 这是我模型绑定的问题吗 该怎么解决呢
你描述的很含糊,最好有详细的步骤。但看报错,可能是你想在自己设置的角色控制器上用飘带效果时产生的吧?可能是你的控制器上已经有了其他约束,然后脚本想加新的约束时造成冲突了。
谢谢回复!
您好,非常感谢您分享的插件,很好用~
看了您B站的教程,后面给那个人物绑定模型做飘带效果的时候,腿没有飘起来,是因为膝关节的控制器的某个轴向被锁定了,我试过必须要XYZ轴3个轴向都有效的情况下才可以计算成功,如果说旋转轴XYZ轴,其中有一个轴被锁了,仍然可以绑定成功只计算其他没被锁定的轴向的话,就更好了~ 多谢作者
不好意思,留言位置错了,应该是想留言在Spring Magic下面的~
你说的情况是对的,将来可能会调整工具使其能适应更复杂的绑定设置
谢谢意见!
大白,你好,非常感谢你分享的springMagic插件,在使用中有个问题,就是碰撞体只有胶囊体形状,没法模拟墙面或者地面的碰撞,请问如果要用到的话, 自己要如何创建立方体的碰撞体。
在早期版本是有水平地面碰撞的,后来做了胶囊体碰撞后就去掉了,因为会令界面变得复杂,难以理解
目前的解决方法就是做一排胶囊,组成类似一个面的效果来模拟平面碰撞
Thanks
白先生,您好
使用过您的插件以后感觉非常棒.特别感谢您能带给我们这样的插件.
在工作的过程中我们还希望能有类似ghosttrails这样的刀光插件,不知道您在平时的日常工作中有没有使用到相关插件,如果有能否推荐一下,希望能得到您的帮助.
谢谢!
很高兴我的软件能帮到你
关于 ghost trails,Maya有自带的ghost功能你可以试试
最近又研究了一下这个问题,发现 Maya 自带的 Animation Sweep 功能应该就是你要的,2014 版以上就有这个功能了,之前的版本不确定有没有。如果我要做一个工具的话,应该也是基于这个功能进行拓展,所以你如果有相关需求,先了解一下这个功能吧。
能得到您的回复真的很高兴!
我尝试了这个功能很像我们需要的 但是它是首尾直接生成了一整段 而且不进行消失.所以在动画上可能不能很好的使用到这个功能.
https://animbai.com/zh/2018/07/12/tracer-effect-in-maya/
我写了一个关于这个功能的教程,希望能够帮到你,如有问题,可以在文章下面讨论
白先生 我用了maya自带的human ik 碰撞就好像失效了 没有碰撞的效果 直接穿过去了 请问这个怎么解决
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,
please!
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
白先生 您好
勾选循环 第一帧也没办法和初始帧一样 这个问题让我很懊恼
循环功能并不会保留第一帧的 pose,它只是让整个计算结果本身能循环流畅
如果需要保留初始 pose,则建议先复制第一帧的姿势(可以用工具提供的复制功能),在计算完成后再建立一个动画层,把初始 pose 粘贴回开头
不好意思不太理解 不知道怎么操作 谢谢
# 错误: RuntimeError: 没有为“xform”命令提供有效的对象。 这个报错要怎么解决 白先生
需要你的详细步骤,并最好附带源文件,否则缺少相关信息我无法解决
希望作者能出一版MAX的,同样给到碰撞和风动力学,那就完美了
Spring Magic is wonderful!
我在实际使用中,发现这个插件没有办法保住Keyframe,经常被局限住。
比起从root运动计算出完美的但子层级不可控的真实的随动效果,
我更期待Keyframe能保持原先的样子,这样就能更强有力的控制住画面。
近日报道的PhysicsTools Promo插件似乎是在动画层上去添加随动效果,且能保持住原先的Keyframe,不知道在新版Spring Magic上能否见到超越该插件的功能?
https://vimeo.com/iurimonteiro
另外只要价格不离谱我愿意付费购买国人制作的插件
本来有考虑过实现保留关键POSE的跟随动画,用于做鞭子攻击等效果,但是发现没什么人有这方面需求,也许大家有更好的解决方案吧,所以我也不来费这个力气了
另外,从你的文字表达来看,感觉你的母语不是中文啊
Hi great job with tool!! but can u give us for 3ds max?
if u could, i would like to donate 100 usd right now
Cheers,
The orignal author of Spring Magic Max is still mantain his scripts, I’ll not take it over in this case.
白先生,您的spring magic不支持maya2014?
14版本一算骨骼就像直升飞机一样乱转。
我用的是3.2版本
1. spring magic 3.2 支持从Maya 2011 – 2018
2. 请确保你的骨骼链是X轴指向子骨骼的
3. 对于非X轴指向子骨骼的骨骼链,可以使用控制器模块的绑定功能生成骨骼链来计算
白先生 我也遇到同样的问题 不知道怎么解决 能不能出个视频 你说的我不知道如何操作
https://www.bilibili.com/video/av15407663/
请问您的springmagic有3dmax版本的吗?太想要风力和碰撞的功能了。
您好 白先生
您的 Spring Magic 3.2 非常的好用 让我极大的简化了工作流程 节省很多时间
感谢 敬您一杯奶茶!
另外也希望以后能有更好的碰撞效果 希望它能越来越好
谢谢!
很高兴能帮到你,有什么好的建议也可以随时讨论,谢谢奶茶!
Hi Baiyanbin
Ive been having issues getting your script to work for maya 2018. is your script compatible with this version of maya?
I see no issue on spring magic 3.1 with my maya 2018, could you provide more information? you can mail me you test file as well
[email protected]
Cheers!
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
Thank you for your support!
Let me know if any bug or good idea.
Cheers!
Yanbin