Search Unity

Character animation workflow question-what do you prefer

Discussion in 'General Discussion' started by Tom_Veg, Dec 2, 2017.

  1. Tom_Veg

    Tom_Veg

    Joined:
    Sep 1, 2016
    Posts:
    619
    I'm animating character i created for asset store. Stylized chef. I'm hoping people would want to use him in restaurant games. I'm making cooking related animations. Cutting, stirring, throwing pancakes in the air, etc. My confusion is, what should i do with props. Since character will be mecanim ready, and mecanim animations can be combined with animation controller. In that regard, is it necessary to have my animations combinable in that way, which confuses me since many of them he will use different props? I don't have props, but my thought was to add some bone in his hand where you can add any prop later in Unity. Should i do that, or should i simply animate it without this extra bone? I hope i'm making sense.

    Here is sneak peek of the character:
     
  2. AndersMalmgren

    AndersMalmgren

    Joined:
    Aug 31, 2014
    Posts:
    5,358
    For our AI we use one set of animations for lower body (walking etc) then another set of anims for the upper body. For the upper body we parent the item (Weapons) to the right hand, then we use IK for the left hand. This way a long range of items can be used with the same anims.



    edit: he moonwalks a bit when reaching end of navmesh, need to work on that :D
     
    zenGarden, theANMATOR2b and Tom_Veg like this.
  3. Tom_Veg

    Tom_Veg

    Joined:
    Sep 1, 2016
    Posts:
    619
    Thank you for your reply. I like quality of graphics in your game... Interesting rig solution. So skeleton for legs is separate from top of the body?

    If you attach item to right hand, that means in my case i should just make animations with only worry to make position of hands move in right way (example, if animation is about him holding knife, i should grip his hand in that way as if invisible knife is there)? So i don't need to add any extra bones to the hand?
     
  4. AndersMalmgren

    AndersMalmgren

    Joined:
    Aug 31, 2014
    Posts:
    5,358
    Thanks bud! No, we use a avatar mask. So one layer controls the upper body and another one controls the legs.
    We solve the hand gripping by cloning the hand bone and parent it to the item in question. Then when the player (or NPC) grabs the items we rotate all the finger bones the same as the clone. Our characters we bought on the store does have a extra bone called weapon grip or something. But we have not used it. We use the hand bone as parent for our items
     
    Tom_Veg likes this.
  5. theANMATOR2b

    theANMATOR2b

    Joined:
    Jul 12, 2014
    Posts:
    7,790
    Yes - don't add extra bones. Let the developer ad them when they bring in the props for the character. Unless you want to provide a complete character controller solution.
    Allowing the developers to ad the bones they want/need provides the best base set up for the 'most' people.

    Correct.

    You might also consider creating some props to be used with the Chef. If you did - you could parent the mesh to a null bone or empty game object to provide a central attachment point for each prop. But this can also be done by the developer with little effort - and allows for different set ups - if the prop is just a mesh.

    Hope this helps.
     
    dogzerx2 and Tom_Veg like this.
  6. Tom_Veg

    Tom_Veg

    Joined:
    Sep 1, 2016
    Posts:
    619
    Your answers help a lot. Thank you.
     
    dogzerx2 likes this.
  7. AndersMalmgren

    AndersMalmgren

    Joined:
    Aug 31, 2014
    Posts:
    5,358
    Btw, here you can see our finger rigging in more close up



    Its not animation driven but procedural
     
    theANMATOR2b and Tom_Veg like this.
  8. Tom_Veg

    Tom_Veg

    Joined:
    Sep 1, 2016
    Posts:
    619
    This is insane! I have never seen hands behaving so realistic in game. Amazing work!
     
    AndersMalmgren likes this.
  9. AndersMalmgren

    AndersMalmgren

    Joined:
    Aug 31, 2014
    Posts:
    5,358
    Thanks! :D Its very simple actually. Well a few lines of code and many hours of rigging hand bones to items :p
     
    theANMATOR2b and Tom_Veg like this.
  10. theANMATOR2b

    theANMATOR2b

    Joined:
    Jul 12, 2014
    Posts:
    7,790
    This is a really cool technique! Thanks for sharing Anders. So there is no IK goal re-positioning of the fingers once they reach the target 'new bone'?
    Oh - this is interesting - so the targets for the live bones in the character rig target the 'item' bones at run-time and 'tween' to the location during the movement/animation? This is essentially IK isn't it, but without using the built in IK tools?

    Even more interesting - I incorrectly assumed this cloning of the hand bones happened real-time at the time of - or one frame before the grip action/animation plays.
    Are you saying each item that can be interacted with like this has a cloned hand bone where the fingers 'tween' to at run-time?

    The only very minor (non) issue I see it that finger is as strong as the entire characters arm - rig. :) You could re-parent a hmmwv to that finger and the finger would act correctly if the vehicle had the proper cloned hand bones configured to it.
    LOL - I guess the next step here is adding physicality to each object to make them have some weight/drag? Maybe not here in your game - but possible for future games.
    If the physics could be counted on to react properly and not be twitchy - that would be really interesting "mechanic", though at that point each finger would need to have IK controls so they would bend when the weight of something was too much to 'lift'.

    Once the fingers are linked to the cloned bones on an object - do they still have rotation ability?

    Thanks again for sharing.
     
    AndersMalmgren likes this.
  11. AndersMalmgren

    AndersMalmgren

    Joined:
    Aug 31, 2014
    Posts:
    5,358

    Thanks :D no when it comes to third person (NPC and other players) we just parent the item to the handbone of the character model and sync the position using the cloned hand(s) position on the item , once they sync its just a matter of rotating the finger bones to match the bones of the cloned hand.

    I wouldn't call it IK we just map rotations from one transform tree to another :D We do lerp etc to make it a bit smoother. In the case of the NPC the only IK going on is correcting the animations left hand (all NPCs are righthanded) so it matches the front grip of the weapon.

    Ah, the clone is just for rigging setup purpose. You clone the hand bone from the character or first person hand (We have fixed so our first and third person hands sync perfect so they can share setup). Then I have a editor script that moves the hand and rotate fingers based on the clone on the item so you can see in real time and configure your riggings (This is very time consuming, and since we are a VR game it must also look good in stereo 3D). Then in runtime we use this clone to rig the items in realtime the same way the editor script does basicly.

    Oh, all items are Physx items. And networked, we have worked alot with that :D We dont have really heavy items yet though, all items we have are either pickup items (weapons, mags, handgrenades etc) or rotable items like doors. We even have a rotable gate implemented :D



    But all that as really nothing todo with the hand riggings, its more our interactible code. Its two separate things. If we slap our interaction code to a static object and rig it the hand would "hold" it perfect, and the third person character would lean towards it using IK, at a point our code will release the grip because of distance. We also support a physical hand mode were the hand becomes physical and you can push items. The hand weighs 10 kilos I think. So if it tries to move a 80-kilo rigidbody it will only move it a bit. We use real world scales so a rigidbody attachted to a car would be maybe 2k kilos, so the if physx is correct it shouldnt move :D

    The heaviest item we have today that is pickupable is the bomb case


    No they are completely static. But we have some IK to the trigger finger so it moves with the trigger on the weapons (we use real IK for this). Next step is to fix so the thumb will move to the fire selector when changing firemode :D

    No worries always fun to discuss methods used :D

    Sorry for hijacking your thread @Tom_Veg
     
    theANMATOR2b and Tom_Veg like this.
  12. Tom_Veg

    Tom_Veg

    Joined:
    Sep 1, 2016
    Posts:
    619
    No problem, "hijack" all you like. This is all very interesting
     
    theANMATOR2b and AndersMalmgren like this.
  13. theANMATOR2b

    theANMATOR2b

    Joined:
    Jul 12, 2014
    Posts:
    7,790
    Yeah Tom - sorry - figured your stuff was answered well and the topic is very related, especially in VR land.
    PLEASE make that turnstyle work accurately and stop players dead in tracks doing minor damage when they go backwards! :D A nice knock-back - down animation would also be welcome in that scenario.
    Believe me - players will love it! :D
     
    Tom_Veg and AndersMalmgren like this.
  14. AndersMalmgren

    AndersMalmgren

    Joined:
    Aug 31, 2014
    Posts:
    5,358
    haha :p
     
    theANMATOR2b likes this.
  15. Tom_Veg

    Tom_Veg

    Joined:
    Sep 1, 2016
    Posts:
    619
    I made presentation video for my chef. I made more animations then in video, but i'm keeping it less then 1 min for instagram. I expect he will be live in asset store in 20-30 days. Some props from the video will also be in pack. I will upload animations with and without props attached to provide more options. Hope you like.
     
  16. BrandyStarbrite

    BrandyStarbrite

    Joined:
    Aug 4, 2013
    Posts:
    2,076
    That is some nice animation work.

    But ewwwww! :p
    He drank from the red bottle, then poured the rest in the pot? Ewwww! :p
     
  17. Tom_Veg

    Tom_Veg

    Joined:
    Sep 1, 2016
    Posts:
    619
    thank you.

    That is what happens in the kitchen in reality sometime ;)
     
    BrandyStarbrite likes this.
  18. BrandyStarbrite

    BrandyStarbrite

    Joined:
    Aug 4, 2013
    Posts:
    2,076
    Yep. That is so true.
    And that is why, my parents and I, seldom buy/eat food, from some of those
    restaurants and fancy hotels. Ha! Ha! :p
     
    Tom_Veg likes this.
  19. executer

    executer

    Joined:
    Mar 29, 2017
    Posts:
    8
    Hey are you going to provide those animation as well with unity package.that will be helpful
     
    Tom_Veg likes this.
  20. Tom_Veg

    Tom_Veg

    Joined:
    Sep 1, 2016
    Posts:
    619
    Hi, all animations you see in the video are included in Unity pack as legacy animations. 11 of them, plus variants without props attached so you can add your props if you like. Here is the pack: https://www.assetstore.unity3d.com/en/#!/content/106799
     
    executer likes this.
  21. Tom_Veg

    Tom_Veg

    Joined:
    Sep 1, 2016
    Posts:
    619
    BrandyStarbrite likes this.
  22. BrandyStarbrite

    BrandyStarbrite

    Joined:
    Aug 4, 2013
    Posts:
    2,076
    I just watched the waitress vid. Cool!
    I noticed that when she pulled the tray and picked it up, the tray
    looked really light.

    So her hair are polys too. Good one.
    For characters, I always preferred hair made of polygons
    instead of hair, made of particles. It looks way nicer too.
     
    Tom_Veg likes this.
  23. Tom_Veg

    Tom_Veg

    Joined:
    Sep 1, 2016
    Posts:
    619
    Thank you, glad you like her... Well, polygon (clay) hair is matter of personal preference and style you are aiming at. Some people like it, some don't. It is impossible to make everyone happy, but hopefully enough people will like her :).
     
    BrandyStarbrite likes this.