Search Unity

  1. Megacity Metro Demo now available. Download now.
    Dismiss Notice
  2. Unity support for visionOS is now available. Learn more in our blog post.
    Dismiss Notice

Physics To Animation Tool - Released ! -

Discussion in 'Assets and Asset Store' started by eskovas, Apr 14, 2011.

  1. eskovas

    eskovas

    Joined:
    Dec 2, 2009
    Posts:
    1,373
    New Demonstration:
    We are using it in our fps game, you can check it out in the video below:


    The demonstration is at 1:55;

    UPDATE 3:

    http://www.youtube.com/watch?v=xNZgnk64ujA

    This is a video tutorial of our new tool , physics to Animation Tool, now available in the asset store!

    if you have any questions, i'll do my best to awnser them.

    hope you like the video then rate it, comment and subscribe for more

    PS: Sorry for the bad Sound and video quality... it video recorder program only recorded at 6 FPS, but i choosed 30FPS...

    hope you understand everything, since the audio recorder is not very good...

    UPDATE 2:

    Added the ability for this tool to be able to work with a deep hierarchy of objects

    UPDATE:

    The Physics to Animation Tools is already in the asset store :D

    We hope you like it,

    We added a tutorial, changed and added many things for the tool

    If you have any question please ask and i will do my best to awnser it

    thanks for all your support

    --------------------------------------------------------------------

    Hello Everyone!

    here is final release details :

    ------- Physics To Animations Tool --------

    - Bake physics into a single animation -

    - Ability to define the number of frames per second you want your animation to run at
    - Ability to define the maximum number os points in your animation
    - Ability to define the Animation's name
    - Ability to define the Destination Folder's name
    - Ability to add Rigidbodies and colliders (any) to all children of the selected object
    - Ability to Choose of you want the tool to start recording automatically or by pressing 'enter' on the keyboard
    - You can also change things in the scene window while in play mode and the tool will also record everything that happens

    ------ Extra Tools -------
    - Tool to dinamicaly change the name of all children of a selected object ( and change it's name back to it's original )

    --------- Notes ------------

    - This tool works with EVERY object/character in unity, there are no restrictions (i believe)
    - This tool only works if all names of the objects are different ( we offer a tool that allows you to change )

    Here are some Demonstrations of this tool in action:


    --- Preview 1 ---
    http://www.youtube.com/watch?v=TNNKcH3K1D8


    --- Preview 2 --- Physics Joints
    http://www.youtube.com/watch?v=v1Gqkjx5Z4o


    --- Preview 3 --- Character Physics and more
    http://www.youtube.com/watch?v=RDP7B5wRqx4

    ------ Known Problems --------

    - Still None


    Well we hope you like this tool

    If you have any questions feel free to post it here and i'll try my best to respond

    Many thanks for your support :D
     
    Last edited: Mar 6, 2012
  2. defjr

    defjr

    Joined:
    Apr 27, 2009
    Posts:
    436
    I was excited when I first saw this, can't wait to pick it up. Thanks!
     
  3. Tross

    Tross

    Joined:
    Apr 15, 2009
    Posts:
    22
    I downloaded the tool and it works great!

    Just one issue I'm having is when I have a single parent object with multiple children it works fine but when I have a parent connected to children which are parented to other children it does not work and throws errors... Is there a way to save objects with deep hierarchies?

    Also I could not find the script that removes rigidbodies and colliders from children - As shown in the third video you posted.
     
  4. eskovas

    eskovas

    Joined:
    Dec 2, 2009
    Posts:
    1,373
    Hi, thanks for purchasing the tool :)

    well we actually made this tool to te able to work with deep hierarchies and it worked well, only now i see it is not working...dont know why it stopped working, sorry for that.
    i will fix this as soon as possible and i will post here when its fixed

    for the other tool to remove components, we actually removed that tool since unity only allows that tool if it has an undo function, and we weren't able to do that... but i can offer it to you if you want, but remember you can't undo when you use it.
     
  5. ibyte

    ibyte

    Joined:
    Aug 14, 2009
    Posts:
    1,047
    Hi I find some audio explanation goes a long way when showing off a product. Watching an instructive/demo video without an audio commentary leaves something to be desired. Just my two cents.

    :)

    iByte
     
  6. Tross

    Tross

    Joined:
    Apr 15, 2009
    Posts:
    22
    Thanks for getting back Eskovas! I did some experimenting last night and changed some code in PhysicsToAnimationTool.js. I moved all the code (except the first line) from Awake() to Start() and then I was able to save deep hierarchies. Not sure if this is a permanent fix but everything seems to be working fine now :)

    If you could send me that tool or put it on your website then that would be great!
     
  7. eskovas

    eskovas

    Joined:
    Dec 2, 2009
    Posts:
    1,373
    Hello again,

    i just submited the updated tool(still have to wait for unity to review it), now it works with a deep hierarchy of objects.(thanks Tross)

    for the other tool, i can't guaranty that it will work perfectly, but it has been working very well, just remember you can't undo what you do with this tool, you can download it below :)

    Just put the "RemoveComponents" in the Editor folder, and "RemoveComponentsScript" in the Scripts Folder.
    you can access it the same way you access the other scripts in the window tab.

    To iByte:
    i will try to make a video with audio explanations
     

    Attached Files:

  8. ibyte

    ibyte

    Joined:
    Aug 14, 2009
    Posts:
    1,047
    Hi Eskovas,

    Thank You ... looking forward to it.

    iByte
     
  9. Tross

    Tross

    Joined:
    Apr 15, 2009
    Posts:
    22
    Thanks for sharing the tool!
     
  10. Gigiwoo

    Gigiwoo

    Joined:
    Mar 16, 2011
    Posts:
    2,981
    Interesting tool. Will keep this in mind for the future.
    Gigiwoo
     
  11. eskovas

    eskovas

    Joined:
    Dec 2, 2009
    Posts:
    1,373
    Hello everyone,

    i'll be posting a new video probably next week with audio explanations and better examples, right now i'm full with work from university so i can't really spend much time doing a new video right now... sorry

    also i'm getting more sales than i was expecting :), i would really appreciate if you could review it, so more people can see the potential of this tool (if you agree with me).i haven't received any complaints about this tool, but if you have one then please tell me so i can fix or change it.

    also i would be happy if who bought the tool could share with us what they did with this tool

    again thanks for the support!
     
    Last edited: Apr 21, 2011
  12. ibyte

    ibyte

    Joined:
    Aug 14, 2009
    Posts:
    1,047
    Still looking forward to your new video's but I bought the package last night anyway after watching the video's you already put out there. No time to play yet though.

    iByte
     
  13. eskovas

    eskovas

    Joined:
    Dec 2, 2009
    Posts:
    1,373
    hello everyone again!

    just to let everyone know that the updated version of this tool is now available in the asset store

    with this update, you can now use this tool with a deep hierarchy of objects

    also don't forget to review this tool!
     
  14. eskovas

    eskovas

    Joined:
    Dec 2, 2009
    Posts:
    1,373
    hello everyone

    i'll be putting a new video demonstration this friday, implementing this tool in our new game. (still very early in development)
     
  15. Brady

    Brady

    Joined:
    Sep 25, 2008
    Posts:
    2,474
    Can this save the movement of Unity's interactive cloth? That would be really nice since you could have natural-looking cloth on a mobile device without the physics overhead (also, I think interactive cloth has some bugs on iOS as it causes the app to crash on my iPad...).
     
  16. eskovas

    eskovas

    Joined:
    Dec 2, 2009
    Posts:
    1,373
    sorry no...
    it only works with the object's position and rotation

    i could try to implement that into this tool, but it will take some time

    i'll let everyone know if it's going well :)
     
  17. eskovas

    eskovas

    Joined:
    Dec 2, 2009
    Posts:
    1,373
    @Brady

    i'm sorry but it's not possible to save the movement of a cloth yet ... since you can't access the vertices of a mesh in real time, you can only access the vertices of the base mesh
     
  18. eskovas

    eskovas

    Joined:
    Dec 2, 2009
    Posts:
    1,373
    UPDATE 3:

    http://www.youtube.com/watch?v=xNZgnk64ujA

    This is a video tutorial of our new tool , physics to Animation Tool, now available in the asset store!

    if you have any questions, i'll do my best to awnser them.

    hope you like the video then rate it, comment and subscribe for more

    PS: Sorry for the bad Sound and video quality... it video recorder program only recorded at 6 FPS, but i choosed 30FPS...

    hope you understand everything, since the audio recorder is not very good...
     
  19. eskovas

    eskovas

    Joined:
    Dec 2, 2009
    Posts:
    1,373
    Hello everyone again!

    just to let everyone know( specially Brady since he proposed the idea) that it's actually possible to save the movement of a cloth

    i'm currently working to add this function to this tool. ( it's a bit more tricky than the current functions of this tool :p)

    i'll post results and demonstrations of this new tool soon

    hope you find this interesting and usefull
     
    Last edited: May 4, 2011
  20. bigkahuna

    bigkahuna

    Joined:
    Apr 30, 2006
    Posts:
    5,434
    Are you able to get the position of each vertex of the cloth's mesh? I was told that wasn't possible. If you've found a way to do it, is it through undocumented API calls? I'd love to learn how you've done it.
     
  21. eskovas

    eskovas

    Joined:
    Dec 2, 2009
    Posts:
    1,373
  22. bigkahuna

    bigkahuna

    Joined:
    Apr 30, 2006
    Posts:
    5,434
    Huh, I thought that only included the vertices of where it was attached, but I guess I was mistaken. You still can't determine collisions with the cloth through script, which is the other piece of the puzzle that I need...

    Sorry for the diversion, back to the topic at hand! Very cool tool, I'll need to find some reason to use this. ;)
     
  23. Brady

    Brady

    Joined:
    Sep 25, 2008
    Posts:
    2,474
    That will be cool, Eskovas. So doing realistic, physically-simulated cloth, but without the physics overhead in-game, will be possible. That's going to be nice.
     
  24. eskovas

    eskovas

    Joined:
    Dec 2, 2009
    Posts:
    1,373
    well i already can play the animations of a flag without any physics, but i'm having a problem with performance... instead of having 1300FPS(with unity's cloth system) i'm having 400FPS xD with a plane with 121 vertices

    i'll try to improve the performance but from what i'm seeing it's better to use unity's cloth system rather than modifying positions of all vertices

    if you want some data on how much calculation the CPU has to do:

    for example:

    lets use a plane with 64 vertices,
    and we want the animation to run at 5 frames per second for about 5 seconds
    so, for each vertice we will have to record a total of 5x5 = 25 frames
    bringing the final animation to have a total of 64 x 25 = 1600 frames.

    and that's just a simple, low quality flag...

    if you want a 16x16 flag, then you will have 256 vertices
    then if you want better quality, for example 10 FPS for 10 seconds, then
    in total for each vertice you have to save 100 frames
    bringing the final animation to have a total of 25600 unique frames

    then to modify all vertices positions, we have to do some calculations and assign that value to the current vertice position and then apply that change to the vertices...
    now imagine doing that 2560 times per second (in this example)

    hope you understand these examples, and what i'm trying to say

    i'll still try to improve, but i do not guaranty that i'll be able to have a better performance than with the unity's cloth system
     
  25. Brady

    Brady

    Joined:
    Sep 25, 2008
    Posts:
    2,474
    I can see why that would be. The sheer overhead of iterating over a bunch of vertices.
     
  26. eskovas

    eskovas

    Joined:
    Dec 2, 2009
    Posts:
    1,373
    hello everyone,

    just to let everyone that i'm updating the price of this tool to 25$, since i decided to put the tool for 10$ for the first few weeks as a discont.
    i believe that the price is right for this tool.

    when i add more things for this tool i promise i wont increase the price :)

    if you havent seen the tutorial and demonstrations then go to our youtube page :
    http://www.youtube.com/watch?v=xNZgnk64ujA

    any questions just post here

    thanks.


    @Brady:

    i have tried many things to improve the performance, and also changed all javascript scripts to C# scripts, but it didn't improve much.
    i'm still going to try more things, i'll let you know if i can improve performance
     
  27. Dennis_eA

    Dennis_eA

    Joined:
    Jan 17, 2011
    Posts:
    380
    Hello Eskovas!

    Just purchased your tool and it's doing it's job great so far :)
    Is it possible to use your tool at runtime? For example to capture the player movement and save a replay inside an animation?

    cheers!
     
  28. elbows

    elbows

    Joined:
    Nov 28, 2009
    Posts:
    2,502
    Just got round to using this tool again after quite a long break. Was it always the case that care had to be paid to make sure that the Destination Folder for the animation starts with Assets/ or is that a new issue that has been introduced with a Unity update at some point? Or perhaps I went tired or crazy this evening, either way this issue only took me a few minutes to solve but I thought I would ask here anyway.

    I am using this tool to record Kinect skeleton joint rotations rather than physics :D
     
  29. eskovas

    eskovas

    Joined:
    Dec 2, 2009
    Posts:
    1,373
    Sorry for taking so long to check this thread...

    first of all, Thank you all for buying/being interested in this tool :)

    @dennis_s2k
    I don't think it's possible, this tool is meant to be used inside Unity's editor, since it saves an animation file in a folder inside your project.

    @elbows
    I actually never had an issue with the destination folder, and don't know anyone that had one.


    Also wanted to share a new demonstration of this tool to anyone interested in buying it:
    We are using it in our fps game, you can check it out in the video below:


    The demonstration is at 1:55;

    Please let me know if you have any more questions.
     
  30. MNY

    MNY

    Joined:
    Mar 22, 2012
    Posts:
    1
    Hi Guys,

    Is it possible to use this plugin to record realtime Kinect movements/motion for later playback or processing?
     
  31. eskovas

    eskovas

    Joined:
    Dec 2, 2009
    Posts:
    1,373
    @MNY
    I believe it is possible to record Kinect Motion, since this tool records all objects you want to record dispite what's happening to them.
    This tool will only work in Unity's Editor and not with builds outside of the editor.
    Hope this helps,
    Let me know if you have more questions.
     
  32. Mikie

    Mikie

    Joined:
    Dec 27, 2011
    Posts:
    367
    2011 version. Does it work with 3.5?
     
  33. eskovas

    eskovas

    Joined:
    Dec 2, 2009
    Posts:
    1,373
    I used this tool in the Update #18 of our game (see the video above) and had no problems with it, so it works with 3.5.
     
  34. Matkins

    Matkins

    Joined:
    Aug 24, 2009
    Posts:
    152
    Just want to give the creator and also any potential buyers a heads up about the current state of this tool in v3.5.4.

    Firstly it doesn't compile, there are a lot of type casting issues that need sorting out. Perhaps unity now uses pragma strict by default?
    Also I've had to put in precompile tags around a couple of scripts to make sure unity doesn't try to include them into the build. For instance, the PhysicsToAnimationTool script is a monobehaviour that uses the AssetDatabase class, which is an editor only class and can't be built.

    Once these things are cleared up there's a problem with the tool's functionality. A saved animation will have all recorded transforms starting at local position 0,0,0 even when that wasn't the case whilst recording. This is pretty annoying, I've not managed to fix it yet.

    Edit: I think the 0,0,0 keyframe bug is a unity bug rather than anything to do with this tool.
     
    Last edited: Aug 2, 2012
  35. Matkins

    Matkins

    Joined:
    Aug 24, 2009
    Posts:
    152
    I have fixed the above mentioned 0,0,0 issue. Basically its a unity bug, you can't pass a Keyframe array to the AnimationCurve without this bug occurring. So in PTAScript this code:

    Code (csharp):
    1.  
    2.     for ( var i : int = 0; i < CurrentVectorPosition; i++){
    3.    
    4.         Posx[i] = Keyframe( Times[i], Positions[i].x);
    5.         Posy[i] = Keyframe( Times[i], Positions[i].y);
    6.         Posz[i] = Keyframe( Times[i], Positions[i].z);
    7.         Rotx[i] = Keyframe( Times[i], Rotations[i].x);
    8.         Roty[i] = Keyframe( Times[i], Rotations[i].y);
    9.         Rotz[i] = Keyframe( Times[i], Rotations[i].z);
    10.         Rotw[i] = Keyframe( Times[i], Rotations[i].w);
    11.    
    12.     }
    13.    
    14.     var animationCurvePx = new AnimationCurve(Posx);
    15.     var animationCurvePy = new AnimationCurve(Posy);
    16.     var animationCurvePz = new AnimationCurve(Posz);
    17.     var animationCurveRx = new AnimationCurve(Rotx);
    18.     var animationCurveRy = new AnimationCurve(Roty);
    19.     var animationCurveRz = new AnimationCurve(Rotz);
    20.     var animationCurveRw = new AnimationCurve(Rotw);
    21.  
    Should be replaced with this code:

    Code (csharp):
    1.  
    2. var animationCurvePx = new AnimationCurve();
    3.     var animationCurvePy = new AnimationCurve();
    4.     var animationCurvePz = new AnimationCurve();
    5.     var animationCurveRx = new AnimationCurve();
    6.     var animationCurveRy = new AnimationCurve();
    7.     var animationCurveRz = new AnimationCurve();
    8.     var animationCurveRw = new AnimationCurve();
    9.    
    10.     for ( var i : int = 0; i < CurrentVectorPosition; i++){
    11.        
    12.         animationCurvePx.AddKey( Times[i], Positions[i].x);
    13.         animationCurvePy.AddKey( Times[i], Positions[i].y);
    14.         animationCurvePz.AddKey( Times[i], Positions[i].z);
    15.         animationCurveRx.AddKey( Times[i], Rotations[i].x);
    16.         animationCurveRy.AddKey( Times[i], Rotations[i].y);
    17.         animationCurveRz.AddKey( Times[i], Rotations[i].z);
    18.         animationCurveRw.AddKey( Times[i], Rotations[i].w);
    19.     }
    20.  
    And then its all working beautifully.
     
  36. bigkahuna

    bigkahuna

    Joined:
    Apr 30, 2006
    Posts:
    5,434
    Is this tool still being developed? Have the above issues been fixed in an update? I'm interested in buying this and using it in a 3.5.7 project I have.
     
  37. Jaysta

    Jaysta

    Joined:
    Mar 13, 2013
    Posts:
    141
    Hi, bought your asset but for some reason it will not let me record anything say over 10 - 20 seconds?

    fps 24
    maxFps 1000
     
    Last edited: Feb 8, 2014
  38. vidjo

    vidjo

    Joined:
    Sep 8, 2013
    Posts:
    97
    This tool looks very nice! Does it record precice locations? Or does it approximate?

    Can it record custom component values over time as well? Or does it only work on Transforms?
     
  39. eskovas

    eskovas

    Joined:
    Dec 2, 2009
    Posts:
    1,373
    Hello everyone,

    It's been awhile since i was in this thread.
    I told i was no longer supporting this asset awhile ago, you could also tell it was no longer supported by looking at the last update date, 2011.

    I've been fairly surprised at how popular this asset has been, so i decided to do a complete rework of the asset, to keep everyone happy and add some new features.

    Here's what will be in the new version V2.0:

    - Completely remade the code from scratch in C# ( i still followed some of what i did in the previous version, but improved it )
    - More friendly and easier to understand,
    - Well commented code,
    - All of the problems listed will be fixed,
    - Full open source,

    - Removed limits to how many frames or seconds the animation will have,
    - You can still set those limits if you want,
    - Keyframes are stored based on a threshold for each Position, Rotation and Scale, this will make animations store less keyframes and make the final size smaller,
    - Ability to also record the scale of the objects,
    - Add new objects while it's already recording,
    - Still haven't tested it, but i hope it will get better performance than the last version,
    - Choose if you want to record Positions, Rotations or Scales,
    - Choose which key pressed will start or stop the recording,
    - etc.

    What would you like to see added to the tool?
    I already have the new version fairly advanced and will probably release it in a week or two max.
    I will also drop the price from 25$ to 20$.
     
  40. vidjo

    vidjo

    Joined:
    Sep 8, 2013
    Posts:
    97
    Wow! This is fantastic news!

    I would like to be able to record a simulation and output to humanoid mecanim animations if possible. Its useful to dynamically animate characters then bake them to animate using mecanim.

    Also, I always appreciate user interface improvements.
     
  41. eskovas

    eskovas

    Joined:
    Dec 2, 2009
    Posts:
    1,373
    I'm not very familiar with Mecanim, but i know it also uses .anim files to play the animations.
    This asset records every transform property (position, rotation, scale) and then it saves into a .anim file that can be used within Mecanim or the normal animation component.
    If you are talking about saving each state the Mecanim performs, i don't think it will be in this asset. It could be in a seperate tool, but not in this one right now.

    I forgot to add this one new feature:
    - Before, the tool only saved the animation into a .anim file in the project folder, this would require the tool to only work inside the Editor. Now it will output the animation clip on the Save() function, so it can be used anytime anywhere. But there will also be an option if you want to save it inside the editor.
    The only drawback is that the animation will be lost if you restart the application, because i don't think you can save animation files when you run the standalone application.

    EDIT:
    Since this jumped to a new page, not everyone will know what's happening to this tool, so here's what i posted yesterday:

     
    Last edited: Apr 22, 2014
  42. vidjo

    vidjo

    Joined:
    Sep 8, 2013
    Posts:
    97

    Yes. I want exactly a .anim file. But I assume that mecanim .anim files have a little extra bit of data for making the human avatar. Basically, any humanoid rig can use any humanoid animation because there is a layer of abstraction in the avatar.

    I dont care about the mecanim graphs or anything like that. I just want to bake animations to a humanoid model, and be able to use it on ANY humanoid model with mecanim retargetting.
     
  43. eskovas

    eskovas

    Joined:
    Dec 2, 2009
    Posts:
    1,373
    I'll research about how mecanim works with animations.
    No guarantee it will be in the first release.
     
  44. DrewMedina

    DrewMedina

    Joined:
    Apr 1, 2013
    Posts:
    418
    Did you ever make this? I wish the existing tool was cheaper so I could see if it works in unity5...
    Have you tried it?