GPU SkinnedMesh Instancing

Have you ever tried to instantiate thousands of animated skinned meshes in a Unity scene? Even with GPU Skinning enabled and baked skinned meshes, the Animation Class on every instance is consuming all your CPU resources.

As there is no way to write 32F in RenderTexture and proceed like DirectX10 technique (see below), I used DirectX11 and ComputeBuffers to bake mesh topology and animations for GPU processing. Then I use a compute shader to iterate through these buffers, calculating and transmitting data to a classic render shader that draws every vertices and triangles of the instantiated mesh according an animation buffer.

There is no shadow handling yet but diffuse and specular lights are working.

Inspired from DirectX10 technique:

QGPU SkinnedMesh Instancing


Join the conversation
  • Avatar

    Bret Cowart - September 12, 2014 reply

    Hi Quentin,

    This looks like a great technique. Will you be releasing this in the Unity Asset Store ?

    I have many questions about your technique and would like to contact you (sorry I don’t use LinkedIn).

    Please email me at so we can get in touch.

  • Avatar

    Neal - September 27, 2014 reply

    I would also be interested in this solution, as we currently have a project that needs ton of skinned instancing. Looks like your solution would do the trick.

  • Avatar

    Gg - September 30, 2014 reply

    This technique has a caveat though;
    I see 3072 peaceful men on screen and no women. If you put just one “skinned” woman into this scene, FPS would drop significantly (since all men would try to do different animations then they normally do, to attract the woman) and if you put 2 women into that scene, all men will start watching the women having a cat fight.
    Those are the problems you will be facing if you continue this.
    You’ve been warned!

    Jokes aside; good luck, looking really good 🙂


    Quentin Lengelé - September 30, 2014 reply

    LOL 😀

    Thanks guys for your reply.
    I’m very busy right now. I need to do some refactoring and packaging before putting this on the asset store… like many of my other plugins 🙁 But the agency where I work asked me to finalize the GPU SkinnedMesh Instancing for an internal project. So, in a near futur, I will be able to finalize this. And I hope Unity will give to ability to handle shadows with DrawProcedural method soon…

  • Avatar

    Steve - December 9, 2015 reply

    Nice work here! Any movement on this towards the Asset store? We could use this for our project for crowds. Thanks

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.