Search Unity

[Released] Vertex Animation Tools - import and play Point Cache & Mesh Sequences

Discussion in 'Assets and Asset Store' started by polyflow3d, Oct 6, 2014.

  1. polyflow3d

    polyflow3d

    Joined:
    Oct 6, 2014
    Posts:
    297
  2. polyflow3d

    polyflow3d

    Joined:
    Oct 6, 2014
    Posts:
    297
    Attention!
    There is a bug with GPU skinning in 2018. Disable it in Project Settings if displayed unexpected result
     
  3. wuliangguo

    wuliangguo

    Joined:
    Nov 29, 2016
    Posts:
    2
    Hello, I have a problem. After importing pc2 animation, I find that the motion of animation is flipped by the mirror image. How can I solve this problem?
     
  4. polyflow3d

    polyflow3d

    Joined:
    Oct 6, 2014
    Posts:
    297
    use SwapYZ toggle in Mesh tab and Flip Normals if needed
     
  5. JuanJSAR

    JuanJSAR

    Joined:
    Feb 21, 2014
    Posts:
    47
    Can you export an animation as in the examples?
     
  6. polyflow3d

    polyflow3d

    Joined:
    Oct 6, 2014
    Posts:
    297
    I did not understand the question:(
     
  7. JuanJSAR

    JuanJSAR

    Joined:
    Feb 21, 2014
    Posts:
    47
    Can you export an animation as in the examples that use blendshapes?
     
  8. polyflow3d

    polyflow3d

    Joined:
    Oct 6, 2014
    Posts:
    297
    Do you want to give me an animation that should be imported into unity? Yes, I can, please send sources to polyflow3d@gmail.com
     
  9. spvn

    spvn

    Joined:
    Dec 10, 2013
    Posts:
    80
    hey can I check if this tool helps with importing vertex animations from 3DS Max files? so that I can easily play them back in Unity? The asset includes scripts to handle playback correct?
     
  10. polyflow3d

    polyflow3d

    Joined:
    Oct 6, 2014
    Posts:
    297
    what did you mean by saying "correct"? You can provide to polyflow3d@gmail.com test Max source files or a sequence of .obj files. I will send the result to you.
     
  11. spvn

    spvn

    Joined:
    Dec 10, 2013
    Posts:
    80
    Hi I bought it but it's not working properly.

    When I export .pc2 and .obj from 3ds Max and try to playback in Unity, there are 2 problems

    1) the normals are inverted. pc2 clip causes normals to become inverted. If weight of clip is 0, normals are ok. but if it's at 1, normals become inverted.
    2) The mesh becomes skewed during animation. For example my animation is only a rotation by 90 degrees, but the mesh will become scaled down in the middle of its animation, but then expand back to normal size at the end of the animation.

    Any advice on how to fix these problems? Thanks

    EDIT: Second problem was fixed by changing my animation from 3 frames to 40 frames. But first problem is still there (inverted normals during playback). I could import my obj with inverted normals but that feels wrong...

    EDIT 2: First problem is also now fixed. I had accidentally checked "Swap YZ" when importing clip. Unchecking it solved the problem.
     
    Last edited: Mar 31, 2020
    polyflow3d likes this.
  12. whitezealousq

    whitezealousq

    Joined:
    Jul 13, 2019
    Posts:
    2
    I have an issue,I used explosion deformer effect on a sphere with 50 segments in the c4d,then transformed the mesh into alembic and used python script to build obj sequence. However, I can't import the sequence with the your plugin in unity. Why?
     

    Attached Files:

  13. polyflow3d

    polyflow3d

    Joined:
    Oct 6, 2014
    Posts:
    297
    Hello. If frames of sequence has different number of vertices you should use MeshSequencePlayer
    Hello. If frames of sequence has different number of vertices you should use Mesh Sequence Player
     
  14. whitezealousq

    whitezealousq

    Joined:
    Jul 13, 2019
    Posts:
    2
    Cool!thank you!
     
    polyflow3d likes this.
  15. polyflow3d

    polyflow3d

    Joined:
    Oct 6, 2014
    Posts:
    297
  16. Johannski

    Johannski

    Joined:
    Jan 25, 2014
    Posts:
    826
    Hey there,

    one quick question, since I didn't find it anywhere in the docs: Does the animation support Motion Vectors in order to apply Motion Blur for the animation through the post processing stack?
     
    Last edited: Aug 20, 2020
    polyflow3d likes this.
  17. polyflow3d

    polyflow3d

    Joined:
    Oct 6, 2014
    Posts:
    297
    yes!

     
    Johannski likes this.
  18. polyflow3d

    polyflow3d

    Joined:
    Oct 6, 2014
    Posts:
    297
    Any post-effects, shadows and any materials are also supported.

     
  19. Johannski

    Johannski

    Joined:
    Jan 25, 2014
    Posts:
    826
    Thanks a lot for the quick response. That is awesome! Just to be sure, since I'm not really sure that is solvable, here is my use case: I want to have a water animation presimulated with realflow. I tried using alembics, but there the animation does not generate any motion vectors (repro: https://github.com/JohannesDeml/AlembicInterpolationBug).
    Would this be possible with VAT? I'm wondering since I guess the problem here, is that the vertex count changes since it is a morphing liquid. I'm not even sure that problem is solvable without some extra shader step, but maybe your tool is just pure witch craft (even without supporting that, it is very magic).
     
  20. polyflow3d

    polyflow3d

    Joined:
    Oct 6, 2014
    Posts:
    297
    Hi I thought you meant Point Cache animation (with constant mesh topology). VAT supports Mesh Sequences ( animations with an arbitrary number of vertices ) but without motion vectors.
    I've added a description of this limitation to the comparison table in the documentation.
     
    Johannski likes this.
  21. Johannski

    Johannski

    Joined:
    Jan 25, 2014
    Posts:
    826
    Thanks for the quick response and clarification. I already thought this might be the case, I'm really not sure how it would be possible with changing topology.
     
  22. polyflow3d

    polyflow3d

    Joined:
    Oct 6, 2014
    Posts:
    297
    I got an idea how to make motion blur for sequences. This is a quick test for ghosting of frames that play animation with a delay and have transparent material. What do you think of this method?

     
  23. Johannski

    Johannski

    Joined:
    Jan 25, 2014
    Posts:
    826
    Ah, smart solution! I cheated a lot with the shader in usage, but it is sure worth a try! Thanks a lot for the input!
     
    polyflow3d likes this.
  24. Krapok

    Krapok

    Joined:
    Nov 14, 2017
    Posts:
    1
    Hello,
    VAT seems to be a good solution to replace an Alembic pipeline for Cinematics sequences but I would like to know if it can be used with the Unity Timeline and if the clips in and out can be easily adjusted by this way?
    I couldn't find any information about that in the documentation.
    Thanks for your help.
     
  25. MSachs

    MSachs

    Joined:
    Nov 22, 2017
    Posts:
    122
    Hi, I have imported an animation which works great.
    I want the animation to play once but then I also want to be able to play it again after that ideally via script.

    So I set the Auto Playback to "Once". I can set the Normalized Time back to 0 via script but the Auto Playback property automatically sets itself to "None" after the first playback and I can't seem to find a way to set it back to "Once" via script....
     
    polyflow3d likes this.
  26. polyflow3d

    polyflow3d

    Joined:
    Oct 6, 2014
    Posts:
    297
    Hello, MSachs.

    Oh, I didn’t foresee that after a "playback once" happended it might be necessary to play the clip again.
    Anyway, autoplayback doesn't do anything special except change the normalized time.
    I suggest you to set playback to Manually and control the playback (normalizedTime) through your script.
     
  27. A3DAAN

    A3DAAN

    Joined:
    Nov 8, 2017
    Posts:
    7
    Hello, I'm very satisfied with the Vertex Animation Tools asset I just purchased. But there seems to be one issue with the mesh sequence importer I can't figure out; The obj sequences I import in Unity are not showing the normals stored in the files, even though the smoothing groups dropdown is set to "From Obj File". I've tried exporting from C4D and Blender. Could there be something I'm missing?
     
    polyflow3d likes this.
  28. polyflow3d

    polyflow3d

    Joined:
    Oct 6, 2014
    Posts:
    297
    Hello, thank you very much.
    VAT does not support the normals importing from the .obj file, since I suppose this option unnecessary, since VAT has its own high-quality mesh normals recalculation algorithm inside.
    I can implement importing of mesh-normals from .obj, but may I ask for what cases it is required?

    Smoothing Groups are not the same as mesh normals. Smoothing Groups is controls crease edges between polygons. Mesh normals and mesh triangles topology are calculated based on this data.
    Note, As far as I know, other programs uses different terms for Smoothing Groups - hard/crease edges or something like that. I use the same terminology as 3ds max/.obj are.
     
    A3DAAN likes this.
  29. A3DAAN

    A3DAAN

    Joined:
    Nov 8, 2017
    Posts:
    7
    Thank you for the quick response!
    Ah yes, I might've mixed up the terminology there. I guess I ment the smoothing groups. I have attached an image of an example mesh in both the modelling software and Unity to clarify the issue.
     

    Attached Files:

  30. polyflow3d

    polyflow3d

    Joined:
    Oct 6, 2014
    Posts:
    297
    It looks as if c4d did not write the data about the smoothing groups to the .obj file. Could you provide me with this .obj? Or try importing it into the Unity as a regular mesh.
     
    Last edited: Nov 24, 2020
  31. A3DAAN

    A3DAAN

    Joined:
    Nov 8, 2017
    Posts:
    7
    Yeah, that's what I thought. But regular importing of the model shows the broken edges properly..(see attachment) I will send you the 3D test model via mail. Thank you ever so much for your support.
     

    Attached Files:

    polyflow3d likes this.
  32. polyflow3d

    polyflow3d

    Joined:
    Oct 6, 2014
    Posts:
    297
    The information about compatibility: The Vertex Animation Tool works great with Unity 5.6 up until 2021.1.0b6 (including)

     
  33. htlai39

    htlai39

    Joined:
    Apr 15, 2021
    Posts:
    5
    polyflow3d likes this.
  34. polyflow3d

    polyflow3d

    Joined:
    Oct 6, 2014
    Posts:
    297
  35. htlai39

    htlai39

    Joined:
    Apr 15, 2021
    Posts:
    5
    Thank you for the quick reply :)
    I manage to follow the steps and imported the scripts into the cinema 4D but when I execute the script in the script manager I can't find the exported.obj file in the system?
    I'm currently using cinema 4d S24.035 and Exporter_r20 will that be the cause of the problem?
     
  36. polyflow3d

    polyflow3d

    Joined:
    Oct 6, 2014
    Posts:
    297
    ..sometimes i hate c4d..

    I need some time to investigate this. I am currently not have a 4d S24. Have there been any warning/exceptions? Can you fall back to earlier version to export?
     
  37. htlai39

    htlai39

    Joined:
    Apr 15, 2021
    Posts:
    5
    XD. hello yes I don't see any warning or error. the script said that the export is done but then when I try to access the obj file in unity. there's nothing in the file.
    I can try download an older version see if it works or not
     
  38. polyflow3d

    polyflow3d

    Joined:
    Oct 6, 2014
    Posts:
    297
    File is empty? I thought that the files are not created at all. Did you bake the animation in Alembic before exporting?
     
  39. htlai39

    htlai39

    Joined:
    Apr 15, 2021
    Posts:
    5
    Yes, I did bake the animation in Alembic before. I mean the. obj files are not created.
    The file I mention is the one I created on my own just for containing the .obj sequence
     
    polyflow3d likes this.
  40. htlai39

    htlai39

    Joined:
    Apr 15, 2021
    Posts:
    5
    Maybe I will try using an older version of the C4D later to see if the problem still occurs. No need to rush :):)
     
    polyflow3d likes this.
  41. palmacci

    palmacci

    Joined:
    Jun 27, 2020
    Posts:
    1
    polyflow3d likes this.
  42. polyflow3d

    polyflow3d

    Joined:
    Oct 6, 2014
    Posts:
    297
  43. Passeridae

    Passeridae

    Joined:
    Jun 16, 2019
    Posts:
    395
    Hi!
    Any chances it works with Unity 2021.2?
    Thanks!
     
  44. polyflow3d

    polyflow3d

    Joined:
    Oct 6, 2014
    Posts:
    297
    Hi, I have tested it with version 2020 and have not received any reports of problems with version 2021
     
  45. Passeridae

    Passeridae

    Joined:
    Jun 16, 2019
    Posts:
    395
    I've tested it with the latest 2021.2 beta and can confirm that everything works!
    One question: what does the weight of the point cache asset mean in practice? For example, I created a point cache asset for a quite complex mesh and animation which resulted in ~650mb. Where will this asset reside during the runtime? VRAM, RAM or just disk space?
    Thanks!
     
    polyflow3d likes this.
  46. polyflow3d

    polyflow3d

    Joined:
    Oct 6, 2014
    Posts:
    297
    Weight is a persentage of influence of clip over base (bind) form.

    Weights can be used to clip blending. Note that clips affects additively so that summ of all clip weights at any time should equal 1.

    You can find examples of using weight property in the Sail ship and Flowers demo scenes.

    VAT - is not streaming asset, so it always load whole animation in RAM / VRAM.

    There are two ways (that can used in conjunction) to reduce the size of an asset - decimate the number of vertices and decrease the number of frames in the animation. It is often possible to reduce the number of frames without losing visual fidelity.
     
  47. Passeridae

    Passeridae

    Joined:
    Jun 16, 2019
    Posts:
    395
    Thanks!
    Which memory does the point cache use? Because I'm okay with ~1GB point cache asset if it is loaded in RAM, but not okay if it is loaded into video memory, and will try to reduce it then.
     
  48. polyflow3d

    polyflow3d

    Joined:
    Oct 6, 2014
    Posts:
    297
    VAT uses blendshapes to store animation frames, so I assume video memory will be used on most platforms. Feel free to ask me for tips on optimizing the model, I have a lot of experience with this. There is often huge potential for optimizing the size of the point cache.
     
  49. Passeridae

    Passeridae

    Joined:
    Jun 16, 2019
    Posts:
    395
    Hi! Will the video memory stay unaffected if I choose the mesh sequence player instead of point cache player? I assume the mesh sequence player doesn't rely on blendshapes and gpu for the playback? (since it uses a regular mesh renderer instead of the skinned one) Am I correct?
     
  50. Image3d

    Image3d

    Joined:
    Jun 20, 2008
    Posts:
    155
    Hi..what about collision on Point Cache Player ? Does it have an option to update dynamic mesh collision ?