# Unity-Runtime-Animation-Recorder
This project can make you recording animations in runtime with Unity, and can save into .anim or Maya .ma format.
Though Maya has its own physic simulator, but unity is much faster and can easily control detail movement through scripts.
## Installation
Copy just copy Unity Runtime Recorder folder into your Asset folder and it's ready to go.
If you want to see same sample you can also copy DemoAssets folder.
## How To Use
Here is a short video demo.
[https://youtu.be/RAjU5KodE1w](https://youtu.be/RAjU5KodE1w)
## Unity Anim Saver
※ this function needs UnityEditor to work, so can only work in the Editor.
1. Drag the UnityAnimationRecorder.cs script on any GameObject, and it will record all transforms in children.
2. Press "Set Save Path" button in the inspector, choose pick a folder and enter file name.
3. Play the scene, and start/end recording by press the key you set in the inspector.
4. When End Recording pressed, the .anim file will be generated.
## Maya Exporter
Pretty much the same as Unity Anim Saver.
Additionally, you have to select an .ma file which contains all model information.
My script doesn't generate model informations for maya, it only record animation data and append them at the end of .ma file.
If you want to export the meshes you make in Unity, you can try [Export2Maya](https://www.assetstore.unity3d.com/en/#!/content/17079) which is a nice plugin I use before.
### Export Humanoid Animations to Maya
※ This step is no longer needed, the script will solve this problem automatically. But since this section explains the problem and the solution, so not remove it.
Unity and Maya treat spines differently, which sometimes cause issues when you exporting animation with SkinnedMesh.
In Maya, there is an additional "Joint Orient". The actual spine rotation is the sum of transform rotation and joint orient. But since Unity doesn't have this attribute, the transform rotation values in Unity is alreay the sum value. While this plugin is recording the values in Unity, the joint orient values will add once more in Maya, cause the recorded result weird.
In order to record animation correct, we have to make every spines' "joint orient" values to (0,0,0). And here is a tutorial video if you not sure how to do it.
[Export Humanoid Animation from Unity to Maya - Unity Runtime Animation Recorder](https://youtu.be/Ooxg-rFPTcM)
※ Now the Maya Exporter script will set all spines' joint orient to (0,0,0), which solves this problem automatically.
## FBX Exporter
2017-10-10 Implemented FBX exporter, works similar as Maya Exporter.
But for now, there is some memory issue, can't export too complex objects.
[Export to FBX Demo Video](https://www.youtube.com/watch?v=Hy2U0UYp6cA)
Here are a few things to notice:
1. The "source FBX file" has to be in ASCII format (you can choose ASCII or Binary while exporting FBX file)
2. Make sure every nodes' name are exactly the same as the source file
(sometimes nodes' name got changed by Unity or 3D software)
## Dealing with Lag
If you want to simulate with a big amount of objects, you might ecountered lag.
You just need to adjust the Time.timeScale value in the Project Setting (or by using ChangeTimeScale option in my script).
All physics in Unity will affect by timeScale setting.
And if you want to modify the object animation through your own script, please use FixedUpdate instead of Update.
## License
[MIT](https://github.com/newyellow/Unity-Runtime-Animation-Recorder/blob/master/LICENSE.md)
没有合适的资源?快使用搜索试试~ 我知道了~
温馨提示
Unity-Runtime-Animation-Recorder 该项目可以使您使用Unity在运行时中录制动画,并可以保存为.anim或Maya .ma格式。 尽管Maya拥有自己的物理模拟器,但是统一性要快得多,并且可以通过脚本轻松控制细节移动。 安装 复制只需将Unity Runtime Recorder文件夹复制到您的Asset文件夹中,就可以使用了。 如果要查看相同的样本,还可以复制DemoAssets文件夹。 如何使用 这是一个简短的视频演示。 Unity Anim Saver ※此功能需要UnityEditor才能工作,因此只能在Editor中工作。 将UnityAnim
资源推荐
资源详情
资源评论
收起资源包目录
Unity-Runtime-Animation-Recorder-master.zip (70个子文件)
Unity-Runtime-Animation-Recorder-master
DemoAssets.meta 191B
README.md.meta 174B
Unity Runtime Recorder.meta 191B
LICENSE.md 1KB
DemoAssets
Models
triangles.ma.meta 3KB
triangles.ma 79KB
Scenes.meta 191B
Materials
bounce.physicMaterial 4KB
lambert1.mat.meta 179B
lambert1.mat 5KB
bounce.physicMaterial.meta 179B
Models.meta 191B
Scenes
ExportToMayaAnimation.unity 25KB
UnityRuntimeRecorder.unity.meta 174B
ExportToMayaAnimation.unity.meta 174B
UnityRuntimeRecorder.unity 168KB
Materials.meta 191B
Unity Runtime Recorder
Scripts.meta 191B
Scripts
UnityAnimSaver.meta 191B
BigNumber
BigInteger.cs.meta 262B
BigInteger.cs 43KB
AnimationRecorderHelper.cs.meta 262B
General.meta 191B
BigNumber.meta 191B
FbxExporter
FbxDefinitionManager.cs.meta 262B
FbxConnectionObj.cs.meta 262B
FbxHelper.cs.meta 262B
FbxHelper.cs 400B
FbxConnectionsManager.cs 4KB
FbxObjectNode.cs 2KB
FbxObjectSubNode.cs 1KB
FbxExporter.cs.meta 262B
testFBX.cs 2KB
FbxExporter.cs 10KB
FbxObjectNode.cs.meta 262B
FbxDefinitionManager.cs 255B
FbxObjectSubNode.cs.meta 262B
testFBX.cs.meta 262B
FbxObjectsManager.cs.meta 262B
FbxConnectionsManager.cs.meta 262B
FbxObjectsManager.cs 4KB
FbxDataNode.cs.meta 262B
FbxDataNode.cs 5KB
FbxConnectionObj.cs 2KB
General
ExportHelper.cs.meta 262B
TransformTracker.cs 982B
ExportHelper.cs 2KB
TransformTracker.cs.meta 262B
FbxExporter.meta 191B
MayaExporter.meta 191B
AnimationRecorderHelper.cs 519B
MayaExporter
Editor
MayaAnimationRecorderEditor.cs 4KB
MayaAnimationRecorderEditor.cs.meta 262B
MayaAnimationRecorder.cs 5KB
MayaNodeDataContainer.cs.meta 178B
MayaAnimationRecorder.cs.meta 262B
MayaNodeDataContainer.cs 6KB
Editor.meta 191B
UnityAnimSaver
Editor
UnityAnimationRecorderEditor.cs 3KB
UnityAnimationRecorderEditor.cs.meta 262B
UnityCurveContainer.cs.meta 262B
UnityObjectAnimation.cs 2KB
UnityAnimationRecorder.cs 4KB
UnityObjectAnimation.cs.meta 262B
UnityBlendShapeAnimation.cs.meta 262B
UnityCurveContainer.cs 437B
UnityAnimationRecorder.cs.meta 262B
Editor.meta 191B
UnityBlendShapeAnimation.cs 1KB
README.md 4KB
共 70 条
- 1
资源评论
- 新新手121382021-08-12用户下载后在一定时间内未进行评价,系统默认好评。
PLEASEJUM爬
- 粉丝: 15
- 资源: 4576
上传资源 快速赚钱
- 我的内容管理 展开
- 我的资源 快来上传第一个资源
- 我的收益 登录查看自己的收益
- 我的积分 登录查看自己的积分
- 我的C币 登录后查看C币余额
- 我的收藏
- 我的下载
- 下载帮助
安全验证
文档复制为VIP权益,开通VIP直接复制
信息提交成功