Home Technical Talk

Is there any way to bring animation into unity without a rig/bones?

I am developing for mobile and to make the game run on lower spec mobiles, I was only going to import bones/rig for the main character. There are other humanoid characters in the scene which do move about and are rigged already in my 3d app but since they wont be controlled in anyway by the player in the game, I just wanted to bake and import their animations alone without the bones. I know unity can handle blendshapes but I am more comfortable with rigs and also cos these characters are already rigged properly.

Replies

  • monster
    Offline / Send Message
    monster polycounter
    Unless you are only blending between poses, it's impracticable to use blend shapes to animate walk and idle animations. It's not a point cache system.

    If your non-playable characters are all bipedal and with different proportions you can use Unity's Humanoid system to share animations between all the non-playable characters.
  • Farfarer
    Offline / Send Message
    Farfarer polycounter lvl 17
    You can also help reduce the load on the engine by lowering the number of bones that affect a given vertex. I think it's 3 bones per vertex by default, but you can set it to 2 or maybe 1 if your models are low poly enough.
  • kreativ
    The non-player characters will be in the scene doing just one animation loop. Think of them jumping where most of the main body and major limbs will move. not head, hands, fingers, etc, so will save bone count there.

    I thought about using generic instead of humanoid setup under unity and only using maybe 10 bones per character in my 3d application but there would be 5 such NPCs in the scene so thats 50 bones


    thought i might have to setup blendshapes and loop them via scripts (was hoping to avoid them but its no biggy. whatevers serves the purpose. But am more comfy with the usual bone-rig setup at this point).



    @monster - yes all are bi-pedal. And all same proportions. Only different textures and colors. So how does one share animations between these??
    I am familiar with mecanim and unity's humanoid system, etc, but never used it for sharing animations between 5 or so models in the same scene. Any relevant tuts you know of, please?



    @farfarer - thanks mate. LOL, I knew that tip, But I usually change that for my main characters to say 2 bones but will remember to change to one-bone now for these fairly low-poly 2k-poly NPC models.
  • monster
    Offline / Send Message
    monster polycounter
    kreativ wrote: »
    @monster - yes all are bi-pedal. And all same proportions. Only different textures and colors. So how does one share animations between these??
    I am familiar with mecanim and unity's humanoid system, etc, but never used it for sharing animations between 5 or so models in the same scene. Any relevant tuts you know of, please?

    In that case it's even easier. If they all use the same bones, and have the same proportions, then just use the same animator controller for all of them.
  • kreativ
    monster wrote: »
    In that case it's even easier. If they all use the same bones, and have the same proportions, then just use the same animator controller for all of them.

    I was hoping to reduce the bone count cos even if they all have 10 bones, on mobiles 50 bones + 20 bones on main character is not feasible.

    They can use the same controller but still dont think I can have 70 bones in th scene on say a 2 year old phone.
  • monster
    Offline / Send Message
    monster polycounter
    I think you'll be fine. I worked on Echo Prime that had about 14 bones per enemy and 24 for the main character. And this was iPad 3 / iPhone 4 days.

    DestroyEnemies.jpg
  • kreativ
  • Biomag
    Offline / Send Message
    Biomag sublime tool
    I think the amount of bones that you could use on mobile isn't as limited as one might fear. We are doing a game that works on desktop and mobile and therefore we made a test if we can use our desktop rig for the mobile version.

    As we have just a single character on screen, we had roughly 70+ bones in there (every finger, minimal facial set up,...). We used it together with my base mesh for sculpting (so also around 8.000 tris) and with 3 bone influences per vertex. In the end we tried 10+ characters animated running&jumping around randomly through a simple scene on a S3 without lagging.

    Now this doesn't mean you can/should use such huge rigs for your project, but it shows that 'complex' rigs by themselves aren't a overkill. In the end textures size, vertex count, shaders, scripts,... all come together so there is a lot of stuff that will impact performance in the end (also different bottlenecks on different devices), but don't let it drive you crazy during the first steps. Be diligent and smart in your workflows, but don't over think it when it comes to performance as you will have to adjust it in the end anyhow if you want the best possible result.
  • kreativ
    Great advise Blomag. Really is. thanks
Sign In or Register to comment.