Search Unity

  1. Unity 2020.1 has been released.
    Dismiss Notice
  2. Good news ✨ We have more Unite Now videos available for you to watch on-demand! Come check them out and ask our experts any questions!
    Dismiss Notice

[BETA RELEASE] GPU Instancer - Crowd Animations

Discussion in 'Assets and Asset Store' started by LouskRad, Apr 29, 2019.

  1. LouskRad

    LouskRad

    Joined:
    Feb 18, 2014
    Posts:
    818
    Hi there, and thanks!

    unity_WorldToObject is actually being overridden with each instance's transform matrix in the GPU instancing setup. You can take a look at the GPUInstancerInclude.cginc to see this. What looks missing from your vertex method, however, is the required instancing setup call in the beginning of the method, namely:

    UNITY_SETUP_INSTANCE_ID(v);
    GPUI_CROWD_VERTEX(v);
    ...

    Having said that, it might actually be a better idea to do the rotations matrix-based instead of doing it vertex-based. To do this on the GPU side, using a custom compute shader would be ideal. You can take a look at the included boids fish demo in the package for an example of this.

    It is also possible to do the instance matrix rotations on the CPU side if you are not familiar with compute shaders to do this. In that case, I would recommend using a threaded system to divide load in the CPU (like the job system).
     
  2. pdinklag

    pdinklag

    Joined:
    Jan 24, 2017
    Posts:
    76
    This is definitely the better idea, yes. Thanks for pointing at the boids fish demo, I got it to work!

    Using the CPU works too and that's what I did, but since these kinds of computations are what GPUs excel at, I thought why not use it. I don't render too much and the audience is really the heaviest part. So give the GPU something to chew on and don't waste any precious CPU on it. :)
     
    LouskRad likes this.
  3. MaliGames

    MaliGames

    Joined:
    Aug 8, 2017
    Posts:
    1
    Hi, do you know if support for mobile is coming soon?
     
    JoeStrout likes this.
  4. LouskRad

    LouskRad

    Joined:
    Feb 18, 2014
    Posts:
    818
    Hi there,

    Mobile support is currently not a priority in our roadmap, so at this point I can't confirm if or when this feature will be implemented.
     
  5. blacksun666

    blacksun666

    Joined:
    Dec 17, 2015
    Posts:
    189
    that's a shame, can't wait to use this on the oculus quest platform
     
    JoeStrout and hungrybelome like this.
  6. PiAnkh

    PiAnkh

    Joined:
    Apr 20, 2013
    Posts:
    112
    Hello,

    I just got your asset and am looking forward to experimenting and discovering if it feasible to move our project to this.
    Could you tell me if the use of layers or masks is on the roadmap?
    Or is there perhaps someway around the lack of layers using blending, for example blending where one animation has no keys for some of the bones?

    Thanks!!
     
  7. LouskRad

    LouskRad

    Joined:
    Feb 18, 2014
    Posts:
    818
    Hi there,

    We are currently looking into layers and masks, but it is at this stage experimental and I cannot give you an ETA on this. A workaround using blending would not work out of the box since blending would be applied to all bones.
     
  8. hungrybelome

    hungrybelome

    Joined:
    Dec 31, 2014
    Posts:
    300
    Me too. I'll buy this asset once Android is supported.
     
    JoeStrout likes this.
  9. Arthur-LVGameDev

    Arthur-LVGameDev

    Joined:
    Mar 14, 2016
    Posts:
    119
    Another question for you -- and apologies in advance as we're still somewhat new to the animation/rigging side of things, so I may butcher some of the terms here, but I'll do my best to describe the situation and what I'm looking to do:

    • We're using the "No GO" workflow with the Crowd add-on; Unity 2019.2.17f1 currently.
    • We've got N different humanoid models (distinct meshes) that are all rigged the same (Mixamo).
    • Each of the models has is configured as Humanoid with its own 'Avatar'.
    • We have a library of animations that work with all of these imported humanoid models (via importing them, dis-associating them from the model they were imported with, and adding them all onto a 'generic animation controller' that is assigned to each character [to get them recognized by Crowd-GPUI]). This works/previews within Unity correctly for all agent models/rigs.
    • Creating a 'Prefab Variant' for each of the models so that they can be added as Prototypes (Unity/GPUI requires it and no longer allows editing the imported GO-model asset).
    • At this point, we can drag each into the Prototype list for GPUI and then bake the animations; as far as I can tell, and perhaps I'm not understanding it correctly, but I think that the animation data will be the same for them all -- but GPUI will require me to bake the animation data for each individually, even though they're sharing the same animation controller & underlying animations (the actual meshes do differ though).

    • The Question:
      Is it possible to share the animation data (texture) in this situation? Or is there per-avatar data contained within the baked animation texture, and it just visually looks similar/identical (didn't photoshop-compare it, but it sure looks the same in the Unity preview)? I'm not well-versed on 3D animation overall (learning more each day, though!) -- but my question is basically whether or not there is any per-"avatar" (or per-mesh data) contained within the texture file, or if the animation texture data is purely "rig + animation" derived.

      In the latter case, then I'd expect that we could re-use the animation texture for all of our characters despite them being distinct models -- simply because they're rigged the same (the animations play correctly, within Unity for all of them, outside of GPUI, for instance). It's not a huge issue either, but if we can avoid baking+uploading N copies of each animation texture to the GPU, and instead only have to upload/bake 1 texture per animation, then it seems we'd be able to realize a fairly substantial savings.

    Thank you!! :)
     
  10. LouskRad

    LouskRad

    Joined:
    Feb 18, 2014
    Posts:
    818
    This is an interesting point, and we will look into adding this as a feature. For now, however, you could use a hacky method to establish the same effect by baking all the prototypes' animations, and then assigning the same animation texture to their AnimationTexture field in their prototype scriptable objects. You can find these SOs under:

    /GPUInstancer/PrototypeData/Crowd/Prefab

    You can then remove the other generated texture files.
     
  11. Arthur-LVGameDev

    Arthur-LVGameDev

    Joined:
    Mar 14, 2016
    Posts:
    119
    Thank you very much, that's what I suspected but wanted to double-check!

    Based on my description of the scenario, you'd generally expect it to work without issue it sounds like -- given that the characters are all Mixamo-rigged and sharing the same animations? Are we potentially "doing it wrong" by having each character (prototype) have its own 'Avatar', or does it generally sound like we're using the systems properly here?

    Two more questions actually, if I may -- only tangentially related, but along the same lines (sorry!):
    1. Are blend-shapes supported?
      EDIT: They are not. Blend shapes are not supported, and I had asked about it a while back via email and completely forgotten that I had done so. Sorry!

      For context: Our intended use-case would be to gain agent variation (ex: "thin-to-chubby" or female "long-skirt to no-skirt") while still being able to instance them from a single mesh.

    2. As an alternative, and I believe (but may be wrong) that this is essentially how GPUI works, but could we basically have a prototype with two meshes that have identical vertex layouts and 'bake vertex offset' into a map to achieve the same result as the examples I mentioned above?

      For example, we have two female characters -- 'chubby' and 'thin' -- and they have exactly the same mesh layout/topology, the only difference being certain vertices are displaced in certain areas. My goal would be to instance them as one single prototype and then send an extra "chubbyFactor" float via buffer, to allow us to essentially "lerp" between the two sizes.

      For a standard mesh, I'd expect that what I've described would work fine & without issue -- but I'm far less confident on whether it would work (or not) when animation comes into play. I think it's basically the same thing that GPUI is doing, (though it may be baking bone positions instead of individual vert offsets..?), but then I'm left unsure/wondering what that may end up looking like/resulting in when it's lerping between two "base models" and then applying the animation "on top" as well.

      Any thoughts on this overall? BTW, if you'd prefer I'd be more than happy to take this offline & email direct (and would be happy to compensate you for your time as well). :)
    Thank you!!
     
    Last edited: Jan 12, 2020
  12. Arthur-LVGameDev

    Arthur-LVGameDev

    Joined:
    Mar 14, 2016
    Posts:
    119
    I don't want to take away from my question above(!), but after doing substantial work with/in/around the GPUI Crowd Animations asset the last few days I have a couple of feature requests & pain-points that I think are worth mentioning. Not demanding any of this, and am able to workaround it all, mainly just a wish-list / some quirks / and food-for-thought! Apologies in advance, this list got a whole lot longer than I had anticipated. :)

    1) Add 'Bake All [MISSING]' + 'RE-Bake ALL' buttons.
    Don't even worry about the multi-select stuff IMO, just a quick-fix queue solves 90% of the "problem". For me that problem is being able to hit the button and let it run (ie bake 5-15 prefabs with >100 animations each) while I walk away, without having to wait & click twice between each, before finally hitting 'Bake' again. My hack-around queue works great for now but this is easily the #1 request I'd have. I'm guessing the main obstacle is getting an Update() and/or editor coroutine running; I used a hacky solution, but if you wanted to make the 'Editor Coroutines' package a required dependency (or similar approach) that wouldn't bother me at all... This is *easily* the biggest pain point that people will hit IMO; only took ~20min to wire up a queue, but definitely worth having out-of-the-box IMO.

    2) Multi-select for setting animation frame-rate.
    Such a tiny thing, and trivially worked around/scripted away -- but it annoyed me as I was mass-dragging stuff around the past few days.

    3) Allow optional use of a custom data structure for List<Animations>
    We use the API only, and I'm not familiar with the Animator UI which is fine as I can quickly "delete all" and re-drag the animations back in -- but the Animator UI stinks for updating/maintaining what amounts to a list, and (AFAICT at least) there's no way to get it to *list* them. Obviously the Animator UI isn't your fault, but I'd sure prefer to just have a List/data structure. Others may disagree here though if they're using GameObjects probably -- but it's just not a UI or workflow that's overly useful for me as a "code developer" who generally wants to avoid editor UIs. I can almost surely hack around this too, but haven't done so yet.
    Screenshot -- shows why/how ugly is actually is w/ my setup: https://imgur.com/a/p6KVW4q

    4) Detect & alert if "delta" between Animations in list (controller) vs what is Baked.
    Ideally allow user to bake only the delta/whatever is missing. I'm not sure if delta-baking is already happening or not (because of issue #3), or if it's trivial do or not -- if not, then even just alerting that "this one has N animations in the List/Controller that are NOT YET BAKED" would be helpful.

    5) Auto-Detect "Same Animation Controller"
    As mentioned & we discussed a few posts back. I'm just about to take a look to see if I can bypass the actual image output part of the bake process or not, am guessing it may be required (or data may need copied) to get 'pixel offsets', but I currently have 5 prototypes that I'm not going to bake until I go to sleep tonight (due to how many animations are involved); if able to bypass it, that'd be excellent.
    [Edit: Took a real quick peek, looks like I can copy the data as long as rig is truly identical, but I will have to test it to be certain -- though it *should* be the same I think, the only vert positions that change are due to 'thickness'/bloat, but rig+indices should all be otherwise precisely identical, I think!].

    6) Delete animation data/textures when removing a CrowdPrototype from CrowdManager.
    Either a checkbox to "delete related stuff" down by the delete button, or honestly even just provide a tool somewhere that can multi-select the ones that are no longer in-use by registered prototypes. After testing/working with it for a few days I find myself with quite a few textures that are 'orphaned'; I can write some quick code to find/fix/delete but would rather it stayed clean so I don't accidentally commit textures to LFS that aren't used anymore. If they are supposed to be getting removed already, then there may be a bug.


    Anyways -- I've hacked in my own "solutions" to most/almost all of these for now, but figured it'd be worth providing the feedback if nothing else; at least a few of them are likely to be pain points for others too. Also plenty of well-deserved "Thank You" is warranted, both for the product & the support! :)

    PS - Far and away the best asset on the store. Code quality alone blows away anything else I've picked up [which is more than I'd like to admit, and 98% of anything code-related it is outright unusable due to code quality issues] ; not only does GPUI/Crowd Animations plugin work flawlessly, but you can work with it so easily and it's clean -- you don't find yourself having to go through to fix bad code everywhere. Thank you for making [and standing behind] a high-quality product. :)

    PPS - Gentle reminder: My my question above WRT blend-shapes / Lerp'ing between two 'base' models. =D
     
  13. LouskRad

    LouskRad

    Joined:
    Feb 18, 2014
    Posts:
    818
    Hi Arthur,
    and thanks for the detailed description.

    GPUI CA is generally bone based; that is, the compute shader works on bone layout data. That is why the avatar is completely not related to how it works. You can have your rigs use the same avatar or different ones, and wouldn't change anything as far as runtime execution is concerned. At runtime, GPUI will only use the baked bone data regardless of how that data was originally set up for the animation.

    As for your "bake vertex offset" strategy for blend shapes, this would be possible to do in a shader (using an instance based variations strategy - e.g. offsetting vertices depending on vertex color). This of course would be a rather complicated undertaking, and the performance considerations should be kept in mind. We are looking into implementing a generic solution for blend shapes, but at this point I cannot offer you an ETA on if and when this will be added to the asset.
     
  14. LouskRad

    LouskRad

    Joined:
    Feb 18, 2014
    Posts:
    818
    Thanks a lot for such a detailed wishlist :)

    We have took note of all these points, and we will look into implementing them in future updates. Also, thanks for your review of the codebase, we appreciate it.
     
  15. Arthur-LVGameDev

    Arthur-LVGameDev

    Joined:
    Mar 14, 2016
    Posts:
    119
    Couple more things... =D

    1 -- I think that removing an animation clip from the controller results in borked state in the GPUI Editor code. It's possible I messed something else up (nuked a ref or similar), but I think it was a nullref or out-of-range around ~L350 of GPUICrowdManagerEditor.cs -- though again it's possible I messed up a ref or similar, but just a heads-up as I think it may have been a bug.

    2 -- Animation Blending. Okay, forewarning that I'm still learning 3D animation, but I've read through and have a decent grasp of how everything works at this point (less so on the rig/model config side). I know we don't currently have support for blendshapes/morph-targets, animation masks, or layers -- so I went and tried something which I was hoping might 'just work' though my results showed it didn't and/or was inconclusive results.

    Here's what I was trying to do:
    I created an animation that only had bone data for a characters "bottom half". And I created an animation that only had bone data for the character's "top half". My goal was to achieve a poor-man's concept of "masking" -- my theory being that if I played these two animations blended together with equal weights, that I would get the full effect of both animations since the "top" animation had null data for the bottom, and vice versa. Unfortunately it appears that I ended up with a blend of the character's default/original "T-Pose" mixed in for both -- at least I think that's what I was seeing.

    Does that match up with your expectations as far as how it should work? Is it possible for me to encode "null" data for bones, so that they 'fall back' to any other blended animations that are playing and that do have "non-null" data for those bones?

    I don't mind getting my hands dirty, though I will say the ComputeShader is a bit intimidating (never was too great with advanced maths), but with some direction it may be something I could tackle -- it seems like it may be possible to get some very simple "masking" support, even if simply "top" vs "bottom" or "hands-only" or similar, just via baking some "subsets" of animations. But all of that is predicated on being able to have the ComputeShader handle "null data" by passing through to blended animations, and not inferred the "default". Doable? =D

    Thank you!!
     
  16. LouskRad

    LouskRad

    Joined:
    Feb 18, 2014
    Posts:
    818
    I'm afraid I can't think of an easy way to do this. It has to be done in a compute shader since the whole bone matrix manipulation is done in one. Also the bake data holds transform data in relation to the bind pose, and that is why you are getting the T-Pose when you try this.

    Masking/Blend shapes are rather complex issues surrounding the skinning solution. We have not investigated this thoroughly yet, so I can't say more about how this can be accomplished.
     
  17. cocarceaion

    cocarceaion

    Joined:
    Jun 28, 2014
    Posts:
    1
    Hi, Guys, I bought these tools last month, and I have a problem when I am trying to bake animations it gives me 2 errors: I have 2019.2.17f1 version
    1.
    Kernel 'CSAnimationToTexture' not found
    UnityEngine.ComputeShader:FindKernel(String)
    GPUInstancer.CrowdAnimations.GPUICrowdAnimationBaker:AnimationBakerFinish() (at Assets/GPUInstancer-CrowdAnimations/Scripts/Editor/GPUICrowdAnimationBaker.cs:412)
    GPUInstancer.CrowdAnimations.GPUICrowdAnimationBaker:AnimationBakerUpdate() (at Assets/GPUInstancer-CrowdAnimations/Scripts/Editor/GPUICrowdAnimationBaker.cs:382)
    UnityEditor.EditorApplication:Internal_CallUpdateFunctions()

    2.
    System.ArgumentException: Kernel 'CSAnimationToTexture' not found.
    at (wrapper managed-to-native) UnityEngine.ComputeShader.FindKernel(UnityEngine.ComputeShader,string)
    at GPUInstancer.CrowdAnimations.GPUICrowdAnimationBaker.AnimationBakerFinish () [0x00028] in D:\UnityProj\GateKeeper\GateKeeper\Assets\GPUInstancer-CrowdAnimations\Scripts\Editor\GPUICrowdAnimationBaker.cs:412
    UnityEngine.Debug:LogError(Object)
    GPUInstancer.CrowdAnimations.GPUICrowdAnimationBaker:AnimationBakerFinish() (at Assets/GPUInstancer-CrowdAnimations/Scripts/Editor/GPUICrowdAnimationBaker.cs:482)
    GPUInstancer.CrowdAnimations.GPUICrowdAnimationBaker:AnimationBakerUpdate() (at Assets/GPUInstancer-CrowdAnimations/Scripts/Editor/GPUICrowdAnimationBaker.cs:382)
    UnityEditor.EditorApplication:Internal_CallUpdateFunctions() (at C:/buildslave/unity/build/Editor/Mono/EditorApplication.cs:303)
     
  18. FrozenEmpire

    FrozenEmpire

    Joined:
    Sep 10, 2016
    Posts:
    77
    Hey guys.. just installed both the GPUI and this CA, and when loading the demo scenes in CA there are various MissingPrefabs in there... all the demo scenes.

    Have tried to reimport CA but doesn't seem to fix it. Did you see this issue before? Quick search didn't throw anything up.
    Many thanks for any hints

    GPUI demo scenes working fine.

    (still on Unity 2017.4.21f1)
     
  19. FrozenEmpire

    FrozenEmpire

    Joined:
    Sep 10, 2016
    Posts:
    77
    Ahh.. just seen CA has minimum of 2018.3.4 or higher whereas GPUI is good for 5.6.5 or higher. Guess thats the root cause for these MissingPrefabs on 2017.4 ?
     
  20. LouskRad

    LouskRad

    Joined:
    Feb 18, 2014
    Posts:
    818
    Hi there,

    The errors you have posted are related to compute shaders. Please check if your target platform meets the minimum requirements, it might not be supporting compute shaders.
     
  21. LouskRad

    LouskRad

    Joined:
    Feb 18, 2014
    Posts:
    818
    Yes, Unity changed the prefab system in 2018, and the demo scene prefabs would not work in lower versions.
     
  22. Dobalina

    Dobalina

    Joined:
    Sep 6, 2013
    Posts:
    63
    @LouskRad Hey LouskRad, I'm impressed seeing your GPU crowd instancer for the first time. I'm possibly interested in picking it up and have a few questions.

    - I generally create my own character shaders in Shaderforge or Amplify Shader. If I apply the GPU crowd instancer, am I able to keep my custom shaders or do I need to use yours?

    -Sometimes I scale bones down to create the illusion of limb removal. ie, loosing a arm or leg. Does this still work with gpu instancing?

    -Lastly, I have particles and objects attached to bones. Would these be affected?

    Thanks!
     
  23. LouskRad

    LouskRad

    Joined:
    Feb 18, 2014
    Posts:
    818
    Hi there, and thanks.

    - Custom shaders are supported but not out of the box. Unlike base GPUI, you will need to setup your shader to support Crowd Animations manually. You can take a look at this wiki entry to see how.

    - Bones are baked for the animation (gpu skinning) so runtime bone changes would not work with CA.

    - Currently, Bone attachments work with the Mecanim Animator Workflow, but not with the Crowd Animator Workflow.
     
  24. sebas77

    sebas77

    Joined:
    Nov 4, 2011
    Posts:
    1,213
    Out of curiosity, are you interested in implementing an IK system that goes with it? Without IK unluckily this can be used only for a limited set of functionalities (read I am still forced to use gameobjects rendering for the main character)
     
  25. LouskRad

    LouskRad

    Joined:
    Feb 18, 2014
    Posts:
    818
    Hi Sebastiano,

    Crowd Animator is designed mainly for crowds; where you have many instances of the animated characters, be it NPCs or animals, etc. It would not be fit for Hero characters where you have a single (or few) character with IK details, etc.

    Having said that, currently CA works by saving animation bone data to a texture to sample it in compute shaders. We have plans to use alternative methods (e.g. reading bone transforms directly and only take over rendering) in which it would be possible to use all Unity animation features such as IK, ragdolls, etc. But this requires further performance testing and consideration of other dependencies (such as ECS and Job system). Thus if and when this will be implemented is too early for me to comment on.
     
    sebas77 likes this.
  26. sebas77

    sebas77

    Joined:
    Nov 4, 2011
    Posts:
    1,213
    Thanks for the reply. I am not sure I would wait for the Unity ECS animation solution if this is what you were talking about. Like GPUInstancer is a good replacement of the Unity ECS rendering, I would love to see a similar solution for the animation so I don't need to depend on unity ecs. However I understand that the investment on this one is enormous, and it may not have much return, so this is just a wish of mine, I would understand if you don't want/can't to do it.
     
  27. SENSEARENA

    SENSEARENA

    Joined:
    Jan 11, 2019
    Posts:
    7
    Hello,
    I bought your plugin GPU instancing and GPU CA.
    I am trying to achieve to fill a hockey stadium with fans. I have 50 prototypes with 3 LOD. I am instancing around 100 of each prototype. That is like 5000 characters that is not that much. All other characters are 2D static planes rendered through Prefab manager with NO GO workflow.

    All animated characters are rendered through GPUI Crowd manager with NO GO workflow and only created once with zero overhead in the update.

    I got everything except VR camera disabled. Only Crowd managers is on and nothing is else is rendering. I got 12+ms cpu 7 ms render thread and 346 draw calls.
    There is
    upload_2020-3-18_17-57-46.png
    With crowd manager active and fans rendering
    upload_2020-3-18_17-59-8.png
    and without
    upload_2020-3-18_17-59-27.png
    How is that possible? Can we discuss this issue in DM ? Thanks.
     
  28. Ragoo

    Ragoo

    Joined:
    Feb 15, 2014
    Posts:
    84
    I'm experiencing various issues with this in HDRP (latest). Initially I too had the aforementioned "Kernel 'CSAnimationToTexture' not found" issue - this I resolved by reimporting the folder (wasn't an issue with shader compatibility).

    The crowd skinning seems to work, but only for the HDRP Crowd Animations Test shader - the issue however is that it results in an entirely transparent material. Any idea how to fix this?

    FYI - the shader also throws a number of errors when inspecting the material, e.g. : "Material doesn't have a texture property '_BaseColorMap'".

    Finally, is there a chance we'll get a shader graph node for this? I'd love to couple this with ECS' RenderMeshSystem's MaterialPropertyBlocks directly from ECS.

    For your reference, everything works fine in other projects in Standard rendering.

    Other than that, great job on this amazing asset, and hope to get it up and running in HDRP soon!
     
  29. LouskRad

    LouskRad

    Joined:
    Feb 18, 2014
    Posts:
    818
    Hi there,

    I'm not sure I understand the question. A video of this test can help us investigate it. You can contact us from our support mail.
     
  30. LouskRad

    LouskRad

    Joined:
    Feb 18, 2014
    Posts:
    818
    Hi there,

    We will submit an update package for CA in the next few days which will also include a new HDRP Lit shader and HDRP animations test shader. These shaders will be compatible with the latest HDRP version.

    As for a shader graph node, Unity still did not provide an official solution to support procedural instancing via such a node. In any case, there are still some hacky solutions we are considering to implement for this in the near future. However, using MPBs with CA instances would not work for variations since every instances uses the same material properties. For an example of material variations, you can check the TextureVariationDemo scenes in the package (HDRP versions will be available with the next update).
     
    Ragoo likes this.
  31. SENSEARENA

    SENSEARENA

    Joined:
    Jan 11, 2019
    Posts:
    7
    Sure,

    I profile the app and see that Semaphore.WaitForSignal is spiking every second only when my GPUI Crowd Manager is enabled. I got 2864 low poly instances with NOGO workflow.
    upload_2020-3-25_16-16-4.png

    When I disable it the spikes are gone for good. Is it a performance issue? Because the render thread is taking only like 4 ms.
     
  32. LouskRad

    LouskRad

    Joined:
    Feb 18, 2014
    Posts:
    818
    GPUI's and CA's operations (instance culling, skinning, etc.) would show under "WaitForGPU" because all these operations are done in compute shaders. Camera.Render would show Unity's rendering thread, and would not give you an idea about GPUI's cost.
     
  33. LouskRad

    LouskRad

    Joined:
    Feb 18, 2014
    Posts:
    818
    Hi everyone,

    We have just submitted a major version update (v0.9.4) for Crowd Animations to the Asset Store. This update should be available in a few days.

    - Please note that you need to bake your animations again after this update.
    - This update also requires GPU Instancer v1.4.0 to work, so please update your GPU Instancer beforehand if you haven't already done so.


    You can see the full changelog for Crowd Animations v0.9.4 below:

    New: Added HDRP and URP versions of Demo scenes
    New: Added support for HDRP 7 Lit shader
    New: Added animations test shader for HDRP 7
    New: Added "Optional Renderers" feature to be able to disable/enable child Skinned Mesh Renderers per instance at runtime
    New: Added demo scene showing use of enabling/disabling skinned mesh renderers during runtime
    New: Added option to bake animation clip lists for prefabs without an Animator component
    New: Added Animation Data ScriptableObject to store the baked animation data which allows to use the same baked data for multiple prototypes
    New: Added Bake All/Missing buttons
    New: Added option to delete baked data while deleting a prototype
    New: Added multi-select feature to Frame Rate slider

    Changed: Updated support for URP 7 Lit shader and Animations Test shader (re-export package needed)
     
    Ragoo, sebas77 and Rowlan like this.
  34. EliotVR

    EliotVR

    Joined:
    Jan 12, 2017
    Posts:
    14
    Hi
    I am buying and using GPUI and GPUI Crownd Animation.
    I am trying to bake the animation of my project character according to the tutorial.
    However, if I bake the animation, the mesh is rendered strangely.
    I attached the mesh modeling that I used.
    Can you test it and tell me how to solve it?
     

    Attached Files:

  35. LouskRad

    LouskRad

    Joined:
    Feb 18, 2014
    Posts:
    818
    Hi there, and thank you for the mail. We will look into this and write back to you.
     
  36. wwz456

    wwz456

    Joined:
    Jun 9, 2019
    Posts:
    5
    How to use it with UCC(opsive)?I use it ,but the fps drop more than befoer,have any vedio?
     
  37. fujindevil

    fujindevil

    Joined:
    Oct 3, 2012
    Posts:
    70
    Any word on mobile release? I want to buy this if it will support mobile in the future.
     
    JoeStrout likes this.
  38. wwz456

    wwz456

    Joined:
    Jun 9, 2019
    Posts:
    5
    integrated with UCC(opsive),i set up CROWD ANIMATIONS in my project,,and the AI can not take his gun,the gun is floating
     

    Attached Files:

  39. LouskRad

    LouskRad

    Joined:
    Feb 18, 2014
    Posts:
    818
    It looks like UCC is using IK to handle attached objects. IK is currently not supported by Crowd Animations.
     
  40. LouskRad

    LouskRad

    Joined:
    Feb 18, 2014
    Posts:
    818
    Mobile is currently not supported and at this point I cannot comment on if and when it will be implemented.
     
  41. wwz456

    wwz456

    Joined:
    Jun 9, 2019
    Posts:
    5
    Report error
     

    Attached Files:

  42. wwz456

    wwz456

    Joined:
    Jun 9, 2019
    Posts:
    5
    so am i,i bake another agent,and the mesh render is strange like yours
     
  43. LouskRad

    LouskRad

    Joined:
    Feb 18, 2014
    Posts:
    818
    This is the root of your problem:

    upload_2020-4-21_19-59-31.png

    It might be the case that there is a skinned mesh in the scene instance of your prefab that does not exist in your original prefab (namely Box003).

    You can make a support request following this guideline if you are having issues with GPUI or Crowd Animations to help us identify any other issues.
     
  44. alex_1302

    alex_1302

    Joined:
    Aug 20, 2019
    Posts:
    24
    hi. i have a question: i have hundred of animated characters, but they are not using skinned mesh. They are hierarchies of mesh renderers. could i use this asset to optimize in some way thiese characters ? or do you recommend other method ?. thanks
     
  45. sandBucket2

    sandBucket2

    Joined:
    Mar 26, 2016
    Posts:
    29
    Hello, quick question. How do I blend animations using the mecamin workflow of the gpu instancer crowd animations?

    It seems like CrossFade or CrossFadeInFixedTime does not work on the mecanim workflow

    The issue is that I need the mecanim workflow instead of the crowd Animator workflow because I need the character to hold a rifle. The Crowd Animator does not support this.

    Let me know if there is a work around for this and thanks!
     
    Last edited: Apr 30, 2020
  46. LouskRad

    LouskRad

    Joined:
    Feb 18, 2014
    Posts:
    818
    Hi there,
    the Crowd Animations plugin is solely for skinned mesh renderers.

    However, if your project is using many instances of the same meshes and materials combinations, you can use the base GPU Instancer package for this purpose. Please make sure to read the description and wiki pages to decide if it's for you.
     
  47. sandBucket2

    sandBucket2

    Joined:
    Mar 26, 2016
    Posts:
    29
    Hey LouskRad,

    I've been getting some unusual artifacts during runtime, so I've used the custom shader mentioned in the FAQ (GPUInstancer/Shaders/Internal-DepthNormalsTexture_GPUI.shader) and it helped significantly. However there are still artifacts on each of the prefabs. I've attached an image of the scene below. The prefabs are using a regular standard shader, let me know how I can fix this and thanks
     
  48. CityGen3D

    CityGen3D

    Joined:
    Nov 23, 2012
    Posts:
    459
    Hi,

    Thanks for a great tool!
    I'm currently testing compatibility with CityGen3D and having great results.

    I’m curious what people do if they want hitboxes for their Crowd Rendered prefabs.

    My understanding is that GPUI has either Mecanim (slower) or Crowed Rendering (faster) modes. In the Crowd Rendering mode the bone transforms are not updated automatically, so hitboxes don’t automatically move along with the animation. So while you can still detect collisions, the hitboxes won’t be in the correct place.

    Is there anything built into the asset to help with that? Is this something people have already solved, and if so what approach did you take?

    I’m aware I could use the Mecanim instancing solution, but I really like the performance benefits of the Crowd Rendered solution (its obviously much faster).

    So I was just wondering if there was a workflow for this that would allow hitbox positions to update, or would a scripted solution to this be so slow that I may as well just use the Mecanim rendering mode, if I want hitboxes?
     
  49. LouskRad

    LouskRad

    Joined:
    Feb 18, 2014
    Posts:
    818
    Hi there,
    and thanks!

    Currently, the collider on the main (parent) object would work as intended. However if you mean colliders on bones (such as an attached sword GO), that would not be possible since that would require a readback of the bone transform data from the GPU - which would beat the purpose by slowing GPUI.

    We are currently exploring alternative options for bone transform updates when using the Crowd Workflow, but I cannot comment on whether this will result in a solution at this stage.
     
    CityGen3D likes this.
  50. zetingq

    zetingq

    Joined:
    Dec 8, 2016
    Posts:
    16
    LouskRad
    Hello, I have some problems with GPU Instancer and GPU Instancer-Crowd Animations. At present, these two are the latest version,
    unity2018.3.13.

    Let me first talk about my engineering structure:

    After the crowd animation of my scene, I need to package Asset Bundle, and then call this scene Asset Bundle in another unity exe program

    The problems now appear are:

    The crowd animation is normal after calling the Scene Asset Bundle under the Unity editor, but after calling the Scene Asset Bundle under the exe program built by Unity, the crowd animation is not the same as the initial performance.

    Under normal circumstances, the crowd will play the animation randomly. Now, the crowd will not play the animation randomly. The crowd can play the animation, but they are all playing neatly, and the FPS is half of the original.

    I do n’t understand what went wrong, what needs to be done to solve this problem?
     
unityunity