Search Unity

Mesh Animator - Highly efficient animated crowds. For support, please use email.

Discussion in 'Assets and Asset Store' started by jschieck, Dec 7, 2014.

  1. abdalla-ramadan

    abdalla-ramadan

    Joined:
    Jul 1, 2020
    Posts:
    10
    Thank you very much. The asset is awesome and it is reassuring to see the developer behind it very actively developing it and responding to support requests.
    I highly recommend this asset for crowd animation solution.
     
    JBR-games likes this.
  2. abdalla-ramadan

    abdalla-ramadan

    Joined:
    Jul 1, 2020
    Posts:
    10
    Hi

    A reverse animation feature can be nice.
    Here is my attempt to add one.

    Code (CSharp):
    1. public void PlayReverse(int index)
    2.         {
    3.             if (index < 0 || animations.Length <= index || currentAnimIndex == index)
    4.                 return;
    5.             if (queuedAnims != null)
    6.                 queuedAnims.Clear();
    7.             currentAnimIndex = index;
    8.             currentAnimation = animations[currentAnimIndex] as MeshAnimationBase;
    9.             currentFrame = currentAnimation.Frames.Length;
    10.             currentAnimTime = currentAnimation.Length;
    11.             previousEventFrame = -1;
    12.             pingPong = true;
    13.             isPaused = false;
    14.             nextTick = Time.time;
    15.             OnCurrentAnimationChanged(currentAnimation);
    16.         }
    Thanks for advance.
     
  3. CharmGames

    CharmGames

    Joined:
    Jun 1, 2017
    Posts:
    9
    Just got version 2.0.4. I tried to set up shader mode instancing on a mesh using the Standard shader. I get the following shader compiler error when trying to swap in the MeshAnimator/Standard shader:

    Shader error in 'Mesh Animator/Standard': variable 'vertexInput' used without having been completely initialized at line 154 (on d3d11)

    Compiling Vertex program with UNITY_PASS_FORWARDBASE DIRECTIONAL SHADOWS_SCREEN LIGHTPROBE_SH _METALLICGLOSSMAP _NORMALMAP _ALPHATEST_ON
    Platform defines: UNITY_ENABLE_REFLECTION_BUFFERS UNITY_USE_DITHER_MASK_FOR_ALPHABLENDED_SHADOWS UNITY_PBS_USE_BRDF1 UNITY_SPECCUBE_BOX_PROJECTION UNITY_SPECCUBE_BLENDING UNITY_ENABLE_DETAIL_NORMALMAP SHADER_API_DESKTOP UNITY_LIGHT_PROBE_PROXY_VOLUME UNITY_LIGHTMAP_RGBM_ENCODING

    Using Unity 2019.4.3f1
     
    edogainc likes this.
  4. jschieck

    jschieck

    Joined:
    Nov 10, 2010
    Posts:
    429
    You can also set the speed to -1, that should do it!

    If you right-click the shader file, and re-import, does the error go away?


    Version 2.0.6 has been submitted to the asset store with the following fixes:
    - Fixed shader animations flickering or displaying incorrectly after switching scenes.
    - Fixed snapshot instances not appearing correctly if displayed alongside shader instances that share the same base mesh.
     
    JBR-games likes this.
  5. niflying

    niflying

    Joined:
    Jul 11, 2012
    Posts:
    108
    Hi, It looks like the "Global Frame Skip" or "Per Animation Frame Skips" can't reduce memory? Only reduce the asset file size.
     
  6. jschieck

    jschieck

    Joined:
    Nov 10, 2010
    Posts:
    429
    Correct, to reduce memory use shader mode, a simpler mesh (strip extra uvs, tangents), or lower bake fps.
     
  7. niflying

    niflying

    Joined:
    Jul 11, 2012
    Posts:
    108
    I am not sure if shader mode support HDRP.
     
  8. niflying

    niflying

    Joined:
    Jul 11, 2012
    Posts:
    108
    Make the shader mode support HDRP, Please.
     
  9. slava_pankratov

    slava_pankratov

    Joined:
    Jan 17, 2015
    Posts:
    47
    is there any public android demo to have a look at a benchmark? Thanks
     
  10. monokelvivien

    monokelvivien

    Joined:
    Oct 10, 2019
    Posts:
    7
    Hi there!
    I'd love to upgrade to 2.0, but after lots of fiddling around I've decided to look at the examples and not even those are working on my setup :(

    We're running on Unity 2019.2.0f1 with Unitys standard pipeline.
    Any ideas what the cause of this is?

    upload_2020-8-14_15-25-16.png
     
  11. jschieck

    jschieck

    Joined:
    Nov 10, 2010
    Posts:
    429
    Yes this is because I submit to the asset store in version 2018.3, and Unity changed how vertex order works in newer versions. You need to rebake the example model and it should correct itself. Working on a fix so this step isn't required.
     
  12. monokelvivien

    monokelvivien

    Joined:
    Oct 10, 2019
    Posts:
    7
    Okay, thanks for the quick update. I'll try the shader animator workflow on the weekend again, and if I can't get it to work, I'll write again. Have a nice weekend.
     
    JBR-games likes this.
  13. imaginationrabbit

    imaginationrabbit

    Joined:
    Sep 23, 2013
    Posts:
    349
    Hello- longtime user- using v 2.06 on Unity2017.4.32f1 LTS

    Got this crash from a build running on Steam- any idea what causes it? How to prevent it?

    [C:\buildslave\unity\build\Runtime/Allocator/MemoryManager.cpp line 1097]
    (Filename: H:/CreativeGit/Puppets/Assets/MeshAnimator/Scripts/MeshAnimation.cs Line: 305)

    More from the output_log

    DynamicHeapAllocator allocation probe 1 failed - Could not get memory for large allocation 383536.
    DynamicHeapAllocator allocation probe 2 failed - Could not get memory for large allocation 383536.
    DynamicHeapAllocator allocation probe 3 failed - Could not get memory for large allocation 383536.
    DynamicHeapAllocator allocation probe 4 failed - Could not get memory for large allocation 383536.
    DynamicHeapAllocator out of memory - Could not get memory for large allocation 383536!
    Could not allocate memory: System out of memory!
    Trying to allocate: 383536B with 32 alignment. MemoryLabel: VertexData
    Allocation happend at: Line:123 in C:\buildslave\unity\build\Runtime/Graphics/Mesh/VertexData.cpp
    Memory overview

    [ ALLOC_DEFAULT ] used: 1033120619B | peak: 0B | reserved: 1066416091B
    [ ALLOC_TEMP_JOB ] used: 1078356B | peak: 0B | reserved: 8388608B
    [ ALLOC_TEMP_BACKGROUND_JOB ] used: 0B | peak: 0B | reserved: 1048576B
    [ ALLOC_GFX ] used: 1431608748B | peak: 0B | reserved: 1600038136B
    [ ALLOC_CACHEOBJECTS ] used: 114648256B | peak: 0B | reserved: 126251648B
    [ ALLOC_TYPETREE ] used: 0B | peak: 0B | reserved: 0B
    [ ALLOC_PROFILER ] used: 7444932B | peak: 0B | reserved: 12582912B
    [ ALLOC_TEMP_THREAD ] used: 32768B | peak: 0B | reserved: 2654208B
    Could not allocate memory: System out of memory!
    Trying to allocate: 383536B with 32 alignment. MemoryLabel: VertexData
    Allocation happend at: Line:123 in C:\buildslave\unity\build\Runtime/Graphics/Mesh/VertexData.cpp
    Memory overview

    [ ALLOC_DEFAULT ] used: 1033120619B | peak: 0B | reserved: 1066416091B
    [ ALLOC_TEMP_JOB ] used: 1078356B | peak: 0B | reserved: 8388608B
    [ ALLOC_TEMP_BACKGROUND_JOB ] used: 0B | peak: 0B | reserved: 1048576B
    [ ALLOC_GFX ] used: 1431608748B | peak: 0B | reserved: 1600038136B
    [ ALLOC_CACHEOBJECTS ] used: 114648256B | peak: 0B | reserved: 126251648B
    [ ALLOC_TYPETREE ] used: 0B | peak: 0B | reserved: 0B
    [ ALLOC_PROFILER ] used: 7444932B | peak: 0B | reserved: 12582912B
    [ ALLOC_TEMP_THREAD ] used: 32768B | peak: 0B | reserved: 2654208B

    UnityEngine.Mesh:SetArrayForChannelImpl(Mesh, InternalShaderChannel, InternalVertexChannelType, Int32, Array, Int32)
    UnityEngine.Mesh:SetSizedArrayForChannel(InternalShaderChannel, InternalVertexChannelType, Int32, Array, Int32)
    UnityEngine.Mesh:SetArrayForChannel(InternalShaderChannel, Vector3[])
    UnityEngine.Mesh:set_vertices(Vector3[])
    FSG.MeshAnimator.MeshAnimation:GenerateFrame(Mesh, Int32) (at H:\CreativeGit\Puppets\Assets\MeshAnimator\Scripts\MeshAnimation.cs:305)
    FSG.MeshAnimator.MeshAnimation:GenerateFrameIfNeeded(Mesh, Int32) (at H:\CreativeGit\Puppets\Assets\MeshAnimator\Scripts\MeshAnimation.cs:130)
    FSG.MeshAnimator.MeshAnimator:UpdateTick(Single) (at H:\CreativeGit\Puppets\Assets\MeshAnimator\Scripts\MeshAnimator.cs:683)
    FSG.MeshAnimator.MeshAnimatorManager:UpdateTick() (at H:\CreativeGit\Puppets\Assets\MeshAnimator\Scripts\MeshAnimatorManager.cs:104)

    Thank you for your time.
     
  14. jschieck

    jschieck

    Joined:
    Nov 10, 2010
    Posts:
    429
    Well looks like it's running out of memory! How many vertices does your mesh have? And do you have tons of animation frames? I'm assuming you're using snapshot mode as well: http://jacobschieck.com/projects/meshanimator/documentation/documentation.html#memory
     
  15. niflying

    niflying

    Joined:
    Jul 11, 2012
    Posts:
    108
    Hi jschieck,
    Do you work out the shader mode for HDRP?
     
  16. imaginationrabbit

    imaginationrabbit

    Joined:
    Sep 23, 2013
    Posts:
    349
    Thanks for the reply- Now that I look at the Characters verts they are way too high at 3000- animation frames are high at 120 as well-

    I did bake them with really low quality if that helps at all.

    So this error is just Unity/App running out of memory because I've loaded too many verts/frames etc? If so I can optimize things- just wanted to make sure it wasn't some other type of error-

    I guess I need to do some tests to see if using standard mecanim characters would make more sense- I kind of just have it in my head like "If there's a lot of characters use MeshAnimator" but I have read the docs about vert/frame count- just got caught up in dev 0_0

    I wasn't aware of snapshot mode- would it make a difference if I re-baked them with it off?

    Thank you for your time.
     
  17. HenryChinaski

    HenryChinaski

    Joined:
    Jul 9, 2013
    Posts:
    108
    Hi and thanks for the grat update!

    Am I right though, that the low "Compression Accuracy" trick to create pixelated characters doesn't work with the shader mode approach?
     
  18. laurentlavigne

    laurentlavigne

    Joined:
    Aug 16, 2012
    Posts:
    6,362
    this looks useful, any chance youd make root nodes for Amplify Shader Editor so we could upgrade our custom shaders to use MeshAnimator??
     
    FloBeber likes this.
  19. MOBILIN

    MOBILIN

    Joined:
    May 6, 2017
    Posts:
    15
    Hi, is there any problem using StateMachineBehaviour in Mesh Animator? All Mechanim features are available?
     
  20. jschieck

    jschieck

    Joined:
    Nov 10, 2010
    Posts:
    429
    If you use shader mode, the large memory requirements don't exist.

    This appears to be a bug, I'll have to release an update.

    If I find time I might be able to do this, and if someone gifts me a copy of Amplify :)

    Technically you could still use the behaviors and the state machines, you just would have to use an additional behavior on your states to call to the mesh animator component to play the appropriate animation to sync the two. But you'd really just be using it as a state machine only. All the mecanim features like layers, masks, and blending aren't supported.
     
    laurentlavigne likes this.
  21. hopeful

    hopeful

    Joined:
    Nov 20, 2013
    Posts:
    5,685
    The Amplify peeps are pretty cool. Tell them what you're trying to do and ask for a copy. :)
     
    FloBeber likes this.
  22. jschieck

    jschieck

    Joined:
    Nov 10, 2010
    Posts:
    429
    This is fixed in 2.0.10 that I just submitted to the store. Should be available in a day or two.
     
    HenryChinaski likes this.
  23. niflying

    niflying

    Joined:
    Jul 11, 2012
    Posts:
    108
    come on ,how about hdrp shader mode?
     
  24. khos

    khos

    Joined:
    May 10, 2016
    Posts:
    1,490
    Hi, I am interested in purchasing your asset, I'd like to ask if this could help improve performance for my game first.
    I have a crowd (NPC's / Dancers) of around 70 people all dancing randomly in a scene (heavy metal nightclub) , these used skinned mesh rendereres e.g.
    upload_2020-9-8_19-43-47.png

    I'd like to bump up the number of NPC's / Dancers, to 500 or more will your asset help?
     
  25. laurentlavigne

    laurentlavigne

    Joined:
    Aug 16, 2012
    Posts:
    6,362
    oh yeah man, I've barely started using his thing and alreadying getting from 4 to 10x speed up on all hardware. just get it you'll love it.
     
  26. khos

    khos

    Joined:
    May 10, 2016
    Posts:
    1,490
    Anyway, took the plunge and purchased :) noticed that ragdoll/IK is not supported, will try see how to workaround..
     
  27. jschieck

    jschieck

    Joined:
    Nov 10, 2010
    Posts:
    429
    Correct, but you can swap prefabs out when you need them to activate.


    Hasn't been easy but almost there!
     
    laurentlavigne likes this.
  28. laurentlavigne

    laurentlavigne

    Joined:
    Aug 16, 2012
    Posts:
    6,362
    Their feet are all wonky! Just kidding :D
    Good job man, that new SRP is so different than the old stuff, I bet you had fun.
    How is URP performance delta so far?
     
  29. LeekAndRibs

    LeekAndRibs

    Joined:
    Mar 7, 2017
    Posts:
    49
    Hey jschieck,

    we are in the process of developing an RTS and need a kind of time freeze for a certain skill. Unfortunately, I can't find a way to easily pause the animator.

    I've already tried:
    - speed set to 0,
    - Pause(),
    - disable the animator-component (as described in the comment above the pause method)

    Even deactivating the MeshAnimatorManager and removing the GPU-Shader-Animated component at the same time does not stop the animations. The animation seems to magically continue to play even though no MeshAnimator or MeshAnimatorManager is active in the scene.

    What works: Set the speed to 0, deactivate the component and reactivate it immediately. Unfortunately, this has the side effect that the default animation is loaded and plays from the beginning (although "ResetOnEnable" is set to false).

    Am I doing something wrong?

    Unity Version: 2020.1.4f1
    MeshAnimator Version: 2.0.8
     
  30. jschieck

    jschieck

    Joined:
    Nov 10, 2010
    Posts:
    429
    PM'd you a fix.
     
  31. LeekAndRibs

    LeekAndRibs

    Joined:
    Mar 7, 2017
    Posts:
    49
    Hey jschieck,

    thanks a lot for your quick help :)

    Unfortunately, the "MeshAnimatorBase" class no longer compiles because "ExposedTransformCrossfade" does not exist :/

    edit: I restored the "MeshAnimatorBase" class to its original state and declared the methods overridden in ShaderMeshAnimator as "virtual" in "MeshAnimatorBase" and now it seems to work! Many thanks :)
     
    Last edited: Sep 10, 2020
  32. jschieck

    jschieck

    Joined:
    Nov 10, 2010
    Posts:
    429
    Ah, it was 2.0.10 I used as the base for the fix, that's a new addition. Glad you figured it out!
     
  33. LeekAndRibs

    LeekAndRibs

    Joined:
    Mar 7, 2017
    Posts:
    49
    Hi jschieck,

    I'm sorry to have to ask again. Pausing the shader animator works great, but unfortunately not in the frame that was just played. When pausing, there is a jump to another frame, which is clearly visible in the game. There is exactly the same problem with "Play" after pausing, it is not resuming in the same frame at which it was stopped. If you have a solution for this, I would be very grateful. I've been trying to solve this problem for hours, unfortunately without success. Is it a problem that my characters have 4 materials on the MeshRenderer?

    Thanks in advance! :)

    edit: The developer was able to solve this problem. In case you are hesitant to buy this asset, I highly recommend it!
     
    Last edited: Sep 10, 2020
  34. FloBeber

    FloBeber

    Joined:
    Jun 9, 2015
    Posts:
    166
    +1

    I would definitely buy right away if it had Amplify support!
     
  35. HenryChinaski

    HenryChinaski

    Joined:
    Jul 9, 2013
    Posts:
    108
    Hi and many thanks for the quick fix!

    Unfortunately, I have some problems getting the UBER Shader to work with the shader mode. Anyone else tried to implement it? It is a very complex shader and since I have no idea of shader programming, I am a bit lost...

    For the meantime, I am working with the provided standard shader but this one seemingly only works in forward rendering mode? I assume this is a bug?
     
  36. jschieck

    jschieck

    Joined:
    Nov 10, 2010
    Posts:
    429
    Version 2.0.12 is released!

    Universal pipeline and shader graph support for Shader mode!

    - URP Lit, Simple Lit, and Unlit Mesh Animator shader versions added.
    - Shader graph support via a custom sub-graph.

    HDRP shaders are still in the works since they are a bit more complex and taking longer to manually convert, though shader graph will work with HDRP.

    Updated documentation as well with a new tutorial regarding shader graph.
     
  37. jschieck

    jschieck

    Joined:
    Nov 10, 2010
    Posts:
    429
    PM me about the UBER shader, since it's a paid asset, I can't post any help here regarding it.

    I will investigate why it's only working in Forward mode.
     
  38. Klausology

    Klausology

    Joined:
    Aug 29, 2017
    Posts:
    131
    Hello mate! I just bought your asset and was extremely excited to use it. However, I am faced with a bunch of errors that has made using the asset impossible. ):

    Issue 1) Importing the asset into a clean empty project results in a bunch of warnings though they appear to be harmless (See SS1 && SS2)

    Issue 2) Playing MAExample_Crowd also resulted in some issues. If I clicked "Mesh Animator Shader mode" and then proceed to click "Skinned Mesh", the meshes become invisible both in scene view and game view. Console outputs the follow error:
    Code (CSharp):
    1. Metal: Shader[Mesh Animator/Example/Human Colored]: Incompatible texture type [MTLTextureType2D] of texture bound at index 0, expected [MTLTextureType2DArray]
    (See SS3 for invisible meshes)

    Issue 3) MAExample_PerformanceComparison is yet another hurdle I've encountered. Clicking "Unity Skinned mesh Spawned" button results in the same error as above:
    Code (CSharp):
    1. Metal: Shader[Mesh Animator/Example/Human Colored]: Incompatible texture type [MTLTextureType2D] of texture bound at index 0, expected [MTLTextureType2DArray]
    Clicking "Mesh Animator Shader Mode Spawned" results in a null reference exception:
    Code (CSharp):
    1. NullReferenceException: Object reference not set to an instance of an object
    2. FSG.MeshAnimator.ShaderAnimated.ShaderMeshAnimator.RefreshTimeData () (at Assets/MeshAnimator/Scripts/ShaderAnimated/ShaderMeshAnimator.cs:240)
    3. FSG.MeshAnimator.ShaderAnimated.ShaderMeshAnimator.Play () (at Assets/MeshAnimator/Scripts/ShaderAnimated/ShaderMeshAnimator.cs:154)
    4. FSG.MeshAnimator.AnimatorStateMachine.OnEnable () (at Assets/MeshAnimator/Examples/Example_PerformanceComparison/AnimatorStateMachine.cs:15)
    5. UnityEngine.Object:Instantiate(GameObject, Vector3, Quaternion)
    6. FSG.MeshAnimator.PerformanceTester:OnGUI() (at Assets/MeshAnimator/Examples/Example_PerformanceComparison/Scripts/PerformanceTester.cs:53)
    7. UnityEngine.GUIUtility:ProcessEvent(Int32, IntPtr, Boolean&) (at /Users/bokken/buildslave/unity/build/Modules/IMGUI/GUIUtility.cs:189)
    8.  

    Amongst the 4 example scenes provided, MAExample_CrowdAI and MAExample_PerformanceComparisonCubes were completely fine and running without any errors/warnings.

    Could I be missing a crucial step or doing something wrong that results in these issues? Thank you very much for your help!

    SS1 & SS2 Screenshot 2020-09-16 at 5.46.04 PM.png Screenshot 2020-09-16 at 5.46.10 PM.png
    SS3 Screenshot 2020-09-16 at 5.51.11 PM.png






    EDIT:

    I am faced with a newfound issue. When baking an alternative 3rd party model using the MeshAnimator tool, it works splendidly in 2020.1.5f1. Repeating the same steps in 2020.2.0b2 throws the following error when entering play mode:
    Code (CSharp):
    1. NullReferenceException: Object reference not set to an instance of an object
    2. FSG.MeshAnimator.MeshAnimatorBase.FireAnimationEvents (FSG.MeshAnimator.IMeshAnimation meshAnimation, System.Single totalSpeed, System.Boolean finished) (at Assets/MeshAnimator/Scripts/Common/Core/MeshAnimatorBase.cs:209)
    3. FSG.MeshAnimator.MeshAnimatorBase.UpdateTick (System.Single time) (at Assets/MeshAnimator/Scripts/Common/Core/MeshAnimatorBase.cs:535)
    4. FSG.MeshAnimator.MeshAnimatorManager.UpdateTick (System.Single time) (at Assets/MeshAnimator/Scripts/Common/Core/MeshAnimatorManager.cs:107)
    5. UnityEngine.Debug:LogException(Exception)
    6. FSG.MeshAnimator.MeshAnimatorManager:UpdateTick(Single) (at Assets/MeshAnimator/Scripts/Common/Core/MeshAnimatorManager.cs:111)
    7. FSG.MeshAnimator.MeshAnimatorManager:Update() (at Assets/MeshAnimator/Scripts/Common/Core/MeshAnimatorManager.cs:74)
    8.  
     
    Last edited: Sep 16, 2020
  39. jschieck

    jschieck

    Joined:
    Nov 10, 2010
    Posts:
    429
    Hmm it seems that for some reason it lost all the metadata links when you imported (all of the warnings in ss1& ss2)

    The custom example shader material then doesn't compile on Metal (ss3)

    I'll have to do some digging into the warnings and why it that example shader isn't working on your Mac
     
  40. Klausology

    Klausology

    Joined:
    Aug 29, 2017
    Posts:
    131

    Alright! Thank you very much! I will be moving my project to the latest production release instead of using the beta release for the moment then. Thank you again for helping!
     
  41. BigRookGames

    BigRookGames

    Joined:
    Nov 24, 2014
    Posts:
    330
    Hi,
    Just got the asset and am messing around with it. When I bake my humanoid guy in snapshot mode using HDRP and then hit play, he is just a cube. The texture of the cube is moving around and current frame variable incrementing so it seems that animation is working, but not sure what happened to the mesh. The mesh that is in the Base Mesh field seems to be correct:
    upload_2020-9-16_11-27-14.png
    and when not in play mode it is normal like the pic above.
    When in play it is just a cube. What might I be doing wrong here? Any help is appreciated!

    upload_2020-9-16_11-26-4.png
     

    Attached Files:

  42. Klausology

    Klausology

    Joined:
    Aug 29, 2017
    Posts:
    131

    Hello Mr. Developer! It appears I have narrowed down this issue to having something to do with Unity Editor's "Enter Play Mode Settings". It seems this is not an issue with beta or production releases of Unity as I originally thought. Enabling "Enter Play Mode Settings" in my editor throws this error. Disabling it shows no error and runs perfectly fine.

    Also, even if the enter-play mode setting was disabled initially, and I subsequently enable it again. My mesh disappears. It appears I can't enable Enter Play Mode Settings if I wish to use this asset )= . Could you verify that this is true?


    May I also verify with you that Mesh Animator will only work if "Texture Quality" under "Quality" in project settings is set to Full-Res? Setting anything apart from Full-Res also makes my mesh disappear.

    Thank you for helping developer!
     
  43. abdalla-ramadan

    abdalla-ramadan

    Joined:
    Jul 1, 2020
    Posts:
    10
    @jschieck Thank you very much for adding URP support. I will switch soon and check the results.
     
  44. jschieck

    jschieck

    Joined:
    Nov 10, 2010
    Posts:
    429
    Can you PM me the model so I can try and help out?

    I will have to test with this new feature. The issue is that Mesh Animator expects the scene to be reloaded to reset everything since that is how it's always worked since the dawn of time. https://docs.unity3d.com/Manual/ConfigurableEnterPlayMode.html
     
  45. Klausology

    Klausology

    Joined:
    Aug 29, 2017
    Posts:
    131
    Alright, thank you very much! :)

    EDIT:

    Hello Mr. Developer! So I have been trying to get Mesh Animator to work with Unity's Enter Play Mode. Enabling or disabling "Scene Reload" appeared to have no effect on Mesh Animator, but I noticed that Mesh Animator works if "Domain Reload" is enabled. So after looking through Unity's manual on domain reloading: https://docs.unity3d.com/Manual/DomainReloading.html, I opened up your ShaderMeshAnimator script and added the following code:

    Code (CSharp):
    1.  [RuntimeInitializeOnLoadMethod(RuntimeInitializeLoadType.SubsystemRegistration)]
    2.         static void Init()
    3.         {
    4.             //Debug.Log("Counter reset.");
    5.             _meshCount = new Dictionary<Mesh, int>();
    6.             _materialCacheLookup = new List<Material>();
    7.             _setMaterials = new HashSet<Material>();
    8.             _animTextures = new Dictionary<Mesh, Texture2DArray>();
    9.         }
    And voila, Mesh Animator now works with blazingly fast enter play mode option! But of course, I might not be doing it entirely right or might have missed some other things. It would be great if you could include a superior version of this code change in your subsequent updates!

    Also, just want to say thank you for providing this asset. It is definitely one of the best assets I have invested in!
     
    Last edited: Sep 22, 2020
    jschieck likes this.
  46. niflying

    niflying

    Joined:
    Jul 11, 2012
    Posts:
    108
    Hi, How about now? Do you go there now? ^^.
     
  47. jschieck

    jschieck

    Joined:
    Nov 10, 2010
    Posts:
    429
    Shader graph support is released already as well as URP. The default HDRP shaders are more complex, so still working on those.
     
  48. laurentlavigne

    laurentlavigne

    Joined:
    Aug 16, 2012
    Posts:
    6,362
    Did the Amplify guys reach out to you for ASE support?
     
  49. jschieck

    jschieck

    Joined:
    Nov 10, 2010
    Posts:
    429
    Yes they were kind enough to give me a key, just need to find the time to make a template
     
    laurentlavigne likes this.
  50. laurentlavigne

    laurentlavigne

    Joined:
    Aug 16, 2012
    Posts:
    6,362
    Great! They're super helpful if you have questions and their tool handles each pipeline. So I think I'm your case you'd only need to make the vertex position node once for all pipelines.