Search Unity

Question Mono + ECS + Jobs + GPU Animation Instancing?

Discussion in 'Entity Component System' started by GeorgePavlovich, Feb 25, 2023.

  1. GeorgePavlovich

    GeorgePavlovich

    Joined:
    Jan 22, 2021
    Posts:
    2
    I don't get it. If GPU Animation Instancing is so good, why isn't it default in Unity3D?
    And can I use Mono + ECS + Jobs + GPU Animation Instancing?
     
  2. DreamingImLatios

    DreamingImLatios

    Joined:
    Jun 3, 2017
    Posts:
    4,269
    Which GPU Animation Instancing are you referring to? There are several different techniques you might be referring to, and they all have different tradeoffs.
     
  3. Rukhanka

    Rukhanka

    Joined:
    Dec 14, 2022
    Posts:
    204
    GPU Animations are good in many aspects. It is very performant, and even complex blends can be handled on GPU without much problems. Main issue with it is animations callbacks. I mean moving attached to bones objects and excuting some code during anmiaton playbacks. If you need read back animation information (as any other GPU data) you have to choose between two options:
    - Read it here and now, but this will introduces GPU-CPU synchronization point, which probably kill any CPU-GPU parellelism and performance (dont do this).
    - Wait for several frames until data you requested will be available, but in this case reqested data will lag several frames behind (acceptable in some situations).

    If game does not requires any type of bone feedback (strategy games for example) and animation is used exclusively for skinned mesh renderers, GPU animation solution is very good option.