Search Unity

FULL BODY IK, Mech Spiders and much more about to hit the Asset Store!

Discussion in 'Works In Progress - Archive' started by Partel-Lang, Dec 16, 2013.

Thread Status:
Not open for further replies.
  1. Partel-Lang

    Partel-Lang

    Joined:
    Jan 2, 2013
    Posts:
    2,556
    One more tutorial on FBBIK. This video will show you what to do when automagic fails ;)
     
  2. Whippets

    Whippets

    Joined:
    Feb 28, 2013
    Posts:
    1,775
    Outstanding Partel, a great tutorial with clear and simple instruction :)
     
  3. Quixotic7

    Quixotic7

    Joined:
    Jul 7, 2013
    Posts:
    10
  4. rcalt2vt

    rcalt2vt

    Joined:
    Jun 6, 2009
    Posts:
    36
    Awesome, purchased!
     
  5. kukamed

    kukamed

    Joined:
    Jan 23, 2013
    Posts:
    14
    Thank you Partel! Now I can include FBIK on my couple dancing game! Purchased!
     
  6. Partel-Lang

    Partel-Lang

    Joined:
    Jan 2, 2013
    Posts:
    2,556
    What!? is it? (just woke up) :D
     
  7. Partel-Lang

    Partel-Lang

    Joined:
    Jan 2, 2013
    Posts:
    2,556
    Thats great!!! Thank you all a lot! ...and remember, if you have any questions at all or are struggling with something, just ask me

    support@root-motion.com

    ...or just PM :)

    what a good day to wake up to :D

    Btw, do you find the price reasonable?

    EDIT: I made the Asset Store thread so now that it is released, we should take our stuff and move over there :D
     
    Last edited: Jan 15, 2014
  8. Quixotic7

    Quixotic7

    Joined:
    Jul 7, 2013
    Posts:
    10
    Bought your asset and it works fantastic! Exactly what I needed. Also good to see it does not interfere with Mecanim and basically straight up replaces Mecanim's non-configurable IK. It's very easy to use and configure. Love how many different Ik Options there are and the Rotation Limits work really nice! Thanks for this!

    Price feels slightly steep, though it's definitely worth the price. I didn't mind $90 as this is exactly what I was looking for, but if I were to price it, I'd say you'd get the most buyers around $50 or $60.

    I started playing around with the FullBodyBipedIk on the dummy model and making it work for climbing, and started to get something very nice. I made a quick video showing the result http://youtu.be/SWd1_wIiCGc

    I basically used 3 objects as effectors, one for the body, one for the left hand and one for the right hand. I then added rigidbodies to both hands and the body, and then two configurable joints to the body, one for each hand. Then made a script to easily tweak the parameters.
     
  9. Partel-Lang

    Partel-Lang

    Joined:
    Jan 2, 2013
    Posts:
    2,556
    Thank you, Quixotic7, for the purchase and I'm really glad you find it useful. :D

    Looks like you'll get him climbing in no time! I actually have also experimented a bit with procedural climbing in the testing process, so if you need any assistance, let me know. Maybe you can keep it generic enough to make a climber plugin for Final IK? Its fascinating to see what you guys will make with it! :D

    About the price, getting the "most buyers" is not my priority as I don't want to sacrifice the quality of support for quantity.

    Cheers,
    Pärtel
     
  10. Whippets

    Whippets

    Joined:
    Feb 28, 2013
    Posts:
    1,775
    Hey Partel, gratz on reaching the store :)

    I'm using UMA, which is only built at runtime from pieces... I've added the FullBodyBipedIK component which seems to find (almost) all of the references perfectly. Just had to change the root bone to 'global' (which is our root).

    I don't seem to be getting any of the effectors as shown in the videos, nor the cubes and lines showing FBIK links/heirarchy - is this because I'm working at runtime, not in the editor?
     
  11. Partel-Lang

    Partel-Lang

    Joined:
    Jan 2, 2013
    Posts:
    2,556
    Hi, Whippets,

    You don't see the FBBIK hierarchy (lines and spheres) in runtime, I didn't want to trash the character with that in play mode. You will see the effectors though once you weigh them in from the inspector. :)

    If not, make sure that you added the FBBIK component to the GameObject that has the Animator component.

    And you probably don't need to change the root reference, as long as you are not rotating it relative to the 'global' root of the character.

    Cheers,
    Pärtel
     
  12. 00christian00

    00christian00

    Joined:
    Jul 22, 2012
    Posts:
    1,035
    Awesome Partel! Is this the beta price or it's the final price that will stay for future versions?
     
  13. Whippets

    Whippets

    Joined:
    Feb 28, 2013
    Posts:
    1,775
    Cool thanks Partel, that's got it working ok. I'm trying to understand the rotation limits now to stop the arm from entering the body, when the hand effector is raised up to the face. I have FBBIK component - do I need one of the others to work with RotationLimitHinge?

    $Image1519.jpg
     
  14. goat

    goat

    Joined:
    Aug 24, 2009
    Posts:
    5,182
    I'm perfectly doing exactly nothing. LOL, yah, cheers, thanks a lot, as Patsy would say. I'll buy this asset soon though...
     
    Last edited: Jan 15, 2014
  15. Partel-Lang

    Partel-Lang

    Joined:
    Jan 2, 2013
    Posts:
    2,556
    The RotationLimits work on their own or with CCDIK, FABRIK or AimIK. FBBIK uses it's own dedicated constraints to make sure the limbs bend like human limbs, so RotationLimits cant be used with FBBIK just like that. If you want to keep the elbow from entering the body in this case, you should use a bend goal instead. Find the FBIKBendGoal script from the package and add it to a GameObject. Take a look at the driving demo to see how it works. :)

    Let me know if you have any more questions :)
     
  16. makoto_snkw

    makoto_snkw

    Joined:
    Aug 14, 2013
    Posts:
    340
    I hope the price is not pricey so it will become "industry standard" when many people start to use it. :)
     
  17. goat

    goat

    Joined:
    Aug 24, 2009
    Posts:
    5,182
    It's $90
     
  18. Whippets

    Whippets

    Joined:
    Feb 28, 2013
    Posts:
    1,775
    Hey Partel,

    I've built an FBIKBendGoal object, set all it's settings, and added the LateUpdate FBIKBendGoal code - but I'm not getting any attachment between the avatar and the BendGoal object. But, I'm getting the following error (obviously something I'm missing)

    NullReferenceException: Object reference not set to an instance of an object
    RootMotion.FinalIK.IKEffector.OnPreSolve () (at Assets/RootMotion/FinalIK/IK Solvers/IKEffector.cs:206)
    RootMotion.FinalIK.IKSolverFullBody.ReadPose () (at Assets/RootMotion/FinalIK/IK Solvers/IKSolverFullBody.cs:182)
    RootMotion.FinalIK.IKSolverFullBodyBiped.ReadPose () (at Assets/RootMotion/FinalIK/IK Solvers/IKSolverFullBodyBiped.cs:464)
    RootMotion.FinalIK.IKSolverFullBody.OnUpdate () (at Assets/RootMotion/FinalIK/IK Solvers/IKSolverFullBody.cs:161)
    RootMotion.FinalIK.IKSolver.Update () (at Assets/RootMotion/FinalIK/IK Solvers/IKSolver.cs:40)
    RootMotion.FinalIK.IK.UpdateSolver () (at Assets/RootMotion/FinalIK/IK Components/IK.cs:27)
    RootMotion.FinalIK.SolverManager.LateUpdate () (at Assets/RootMotion/FinalIK/IK Solvers/SolverManager.cs:115)
     
  19. Partel-Lang

    Partel-Lang

    Joined:
    Jan 2, 2013
    Posts:
    2,556
    Hi Whippets,

    Did you call FullBodyBipedIK.SetReferences() after adding the FBBIK component via script in runtime?
    Looks like the solver is uninitiated. Can you send me the code you get this problem with, so I can protect for this null reference in the future?

    Cheers,
    Pärtel
     
  20. blueangelslug

    blueangelslug

    Joined:
    Nov 26, 2013
    Posts:
    60
    Can you make animations using this, and if so how? This looks great. Hopefully, I can buy this this afternoon :D. Keep it up!
     
  21. EvilFox

    EvilFox

    Joined:
    Jul 23, 2013
    Posts:
    83
    Does that mean Final IK will be fully compatible with the PuppetMaster?
     
    Last edited: Jan 15, 2014
  22. SteveB

    SteveB

    Joined:
    Jan 17, 2009
    Posts:
    1,451
    I missed this post (thanks Evil):

    ...yea isn't it utterly laughable that anyone bothered with adding IK to Unity yet left out a terribly crucial element?!

    Methinks having an animator on staff might not be a bad idea huh? Thanks indeed is due to whomever... :D
     
  23. Whippets

    Whippets

    Joined:
    Feb 28, 2013
    Posts:
    1,775
    Ahhhh.... 10 hours solid incomprehension, and a moment of epiphany.
    Using FBBIK I can set an Effector, and slide the position from nothing (normal animation) to reaching for the Effector. Are there any script examples of altering a given Effector's transform, position, and rotation in Update/LateUpdate - or whenever is best suited?

    I think I've used the wrong naming... By Effector's transform - I mean the positional offset of the little blue ball/cube, not the transform of the bone that the Effector is connected with.
     
    Last edited: Jan 15, 2014
  24. Partel-Lang

    Partel-Lang

    Joined:
    Jan 2, 2013
    Posts:
    2,556
    Most of the FBBIK demos have script examples of altering effector positions and rotations.

    Let me just clarify this...
    if you have:
    Code (csharp):
    1.  
    2.  public FullBodyBipedIK ik;
    3.  
    then you can set the effector position by:
    Code (csharp):
    1.  
    2. ik.solver.leftHandEffector.position = x;
    3.  
    Changing the effector position has no effect unless you weigh in the effector's positionWeight. If positionWeight is 1 (ik.solver.leftHandEffector.positionWeight = 1), the hand will be pinned to the effector position.

    the effector rotation by:
    Code (csharp):
    1.  
    2. ik.solver.leftHandEffector.rotation = x;
    3.  
    Changing the effector rotation has no effect unless you weigh in the effector's rotationWeight (ik.solver.leftHandEffector.rotationWeight = x)

    and the effector position offset by:
    Code (csharp):
    1.  
    2. ik.solver.leftHandEffector.positionOffset = x;
    3.  
    positionOffset is will just offset the left hand from it's animation by the value.

    ik.solver.leftHandEffector.bone is just a reference to the bone that the effector is associated with so changing ik.solver.leftHandEffector.bone.position would just dislocate the hand.

    Don't be afraid to ask, no need to spend 10 hours in solid incomprehension ;)

    But hey, what happened to that null reference thing? I'd like to sort that out...

    Cheers,
    Pärtel
     
  25. Whippets

    Whippets

    Joined:
    Feb 28, 2013
    Posts:
    1,775
    Thanks for all that Partel... I'm going to go play with code now :)

    The NullRef appears only when I'm adding and removing stuff at Runtime (as my UMAs only exist at runtime - so I think I might be missing some useful info from the Editor). The code I was playing with seemed to interfere with the FBBIK script effectors - which gave the error. I believe it was down to bad coding from my poor guesswork XD

    Perhaps also worth noting that effector.position is a global position, not local to the avatar. I just found that out XD
     
    Last edited: Jan 15, 2014
  26. Partel-Lang

    Partel-Lang

    Joined:
    Jan 2, 2013
    Posts:
    2,556
    There's no poor guesswork, there's just incomplete documentation.. I'll add it to my immediate todo list to clarify these things, thanks :)
     
  27. Partel-Lang

    Partel-Lang

    Joined:
    Jan 2, 2013
    Posts:
    2,556
    Welcome, blueangelslug,

    The short answer is yes and no. The long answer is that it is designed for animation manipulation, not animation authoring. It requires for you to have an underlaying animation playing and it will enable you to retarget or reposition a specific body part(s) to whatever location you need. It is theoretically possible to record that manipulated animation (need to confirm that yet, it is still wild territory) and save it to an animation clip.
     
  28. Partel-Lang

    Partel-Lang

    Joined:
    Jan 2, 2013
    Posts:
    2,556
    PuppetMaster, whenever it sees daylight, will not just be compatible, but will incorporate Final IK.

    I haven't actually seen a lot of complaining about this, so I guess it works just fine in most cases though.. :)
    It is very important to keep things as simple as possible and with every function you add comes the overhead of maintenance, but
    I do wish that Unity would just open up the backdoor a bit for those who have something different in mind. It is not the only time I've had to completely rewrite a Unity component just because I can't access a single variable or method that I know is there, just not public...
     
  29. Quixotic7

    Quixotic7

    Joined:
    Jul 7, 2013
    Posts:
    10
    @Partel Lang When using fullBodyBipedIK if I set a hand effector to rotate the hand, it also rotates that way the arm is oriented. What I want is to be able to rotate the hand 1 to 1 so that the hand matches the effector exactly but only slightly rotate the rest of the arm. If I set the Hand Effector slider a little less than half way, it gives me the effect I want for the arm, but then only rotates the hand halfway. What's the best way to control this? Thanks
     
  30. Partel-Lang

    Partel-Lang

    Joined:
    Jan 2, 2013
    Posts:
    2,556
    You could use the FBIKBendGoal, but the simplest thing really if you don't want to change the bending direction is to simply rotate the hand bone after FBBIK has finished solving:

    Code (csharp):
    1.  
    2. void Awake() {
    3.    ik.solver.OnPostUpdate += OnPostUpdate;
    4. }
    5.  
    6. // This gets called by FBBIK every time it has finished updating
    7. void OnPostUpdate() {
    8.    ik.solver.leftHandEffector.bone.rotation = whateverYouNeed;
    9. }
    10.  
     
  31. Whippets

    Whippets

    Joined:
    Feb 28, 2013
    Posts:
    1,775
    I'm half way to a handshake, but as I increase the positionweight on the lefthand effector, the rightknee bends in the wrong direction. What's the best technique to stop that knee bending back?

    $Image1520.jpg
     
  32. Quixotic7

    Quixotic7

    Joined:
    Jul 7, 2013
    Posts:
    10
    @Partel Lang I can't figure out how to set the FBIKBendGoal. From the manual it looks like it should be ik.solver.SetBendGoalPosition(transform.position) but SetBendGoalPosition doesn't exist on the FullBodyBipedIk.solver. How would I set this?

    Setting the rotation after the fact using the delegate works pretty well though. I had actually tried doing the same thing using LateUpdate, but it didn't work as FIK does everything in late update, so was hoping there was a way to transform after the fact. Delegates for the win!
     
  33. Partel-Lang

    Partel-Lang

    Joined:
    Jan 2, 2013
    Posts:
    2,556
    SetBendGoalPosition is for LimbIK and TrigonometricIK. FBIKBendGoal is a script in the package. Add it to a GameObject and it will become the bend goal. To see how the FBIKBendGoal works, take a look at the driving rig demo, the small spheres around the driver are FBIKBendGoals ;)
     
  34. Partel-Lang

    Partel-Lang

    Joined:
    Jan 2, 2013
    Posts:
    2,556
    Make sure that at the moment that you add the FBBIK component and initiate it in runtime, the knee is not mathematically perfectly straight or bent backwards. At the moment of initiation, FBBIK samples the pose of the character to find out which way the limb should be bent. What happens if you weigh in the foot effector and move it around?

    Edit: if you pause the scene with EditorApplication.isPaused = true; (requires using UnityEditor; ) exactly at the moment you are initiating FBBIK in your script, you can take a look at the pose at that moment.
     
    Last edited: Jan 16, 2014
  35. Hamesh81

    Hamesh81

    Joined:
    Mar 9, 2012
    Posts:
    405
    I'm using the legacy animation system but I would like to be able to mirror my animations like in Mecanim without having the overhead of two animations for each movement. I have over 100 animations, and so it would make a big difference in extra file size having another 100 that were mirrored. If I could do the mirroring via script this would be a much more optimized approach. Could I do this with Final IK?
     
  36. Whippets

    Whippets

    Joined:
    Feb 28, 2013
    Posts:
    1,775
    As I always have to use FBBIK at runtime - I found that I couldn't get effector position/rotation - which is handy for later hard coding. So here's a little package (just 2 scripts) that shows all the effector information in the Inspector.

    https://db.tt/KT2FmdBA

    Add this script as a component, drop the GameObject with the FullBodyBipedIK component into place, along with the Root Object for your avatar. When you move an Effector, you'll be able to see it's positional/rotational information in either globalspace or localspace (to the root object).
     
    Last edited: Jan 16, 2014
  37. Partel-Lang

    Partel-Lang

    Joined:
    Jan 2, 2013
    Posts:
    2,556
    Hey Whippets,

    I tried your script, everything seems to be fine with it. See this video of me using your script. What did you mean by "couldn't get effector position/rotation"?

    Btw did you get that knee thing sorted out?

    I see you are having some trouble with this UMA integration, so I'm preparing a tutorial video about it.. Hold on, its almost done :)
     
  38. Whippets

    Whippets

    Joined:
    Feb 28, 2013
    Posts:
    1,775
    Hey Partel :) In the Inspector for FBBIK it lets you do a lot of handy things, for testing, but doesn't show Effector position/rotation. If like me, you're building emotes and other things with FBBIK, being able to copy Effector position/rotation and hard code it into your scripts is really handy - so I built this script. It's already making my life easier - so I hope others find it useful too.

    I'm not sure where the problem of the knee is, but I'm now using a set of 4 FBIKBendGoals on each avatar which, when needed, just help to remind FBBIK what direction I want elbows and knees to rotate in. Seems to solve everything, and has other little useful jobs too. Happy.

    Now if I can work out blending hand shapes and wrist rotation, I'll be even happier XD

    Thanks for putting some UMA stuff together - we've now got 5000 UMA users XD
     
    Last edited: Jan 16, 2014
  39. Partel-Lang

    Partel-Lang

    Joined:
    Jan 2, 2013
    Posts:
    2,556
    That would be just hammering a nail with a shovel. I don't think it would really work, it's not intended for that (nor is any other IK solution). What you will probably need to do is find a way to mirror Quaternions along a plane and do it for all the bones in the character from the ground up.

    Cheers,
    Pärtel
     
  40. Partel-Lang

    Partel-Lang

    Joined:
    Jan 2, 2013
    Posts:
    2,556
    Oh I see :), I thought it was a bug or something that you couldn't read the effectors. Ok then, thanks for posting the script! :)

    For blending hand shapes and wrist rotation, see the first tutorial:
     
  41. Partel-Lang

    Partel-Lang

    Joined:
    Jan 2, 2013
    Posts:
    2,556
  42. EvilFox

    EvilFox

    Joined:
    Jul 23, 2013
    Posts:
    83
    PuppetMaster will be include full Final IK?
    If yes, PuppetMaster will be available separately as an extension to the Final IK?

    I purchased Final IK, thanks for such a product :)
     
  43. Partel-Lang

    Partel-Lang

    Joined:
    Jan 2, 2013
    Posts:
    2,556
    Thanks EvilFox, for your purchase, and just let me know if I can help you with integrating it to your game. :)

    PuppetMaster would include Final IK, because I can't develop it without Final IK. I'd probably have to make it as an extension to Final IK.

    But you will not see PuppetMaster very soon, so don't get too exited about it just yet :)
     
  44. EvilFox

    EvilFox

    Joined:
    Jul 23, 2013
    Posts:
    83
    Thanks, I will keep in mind. :)

    I have enough patience ;)

    You mentioned genetic algorithms. How complex the system you want to do?
    Something like this?
     
  45. SteveB

    SteveB

    Joined:
    Jan 17, 2009
    Posts:
    1,451
    Hahaha that's literally the first time I was laughing (and out loud mind you) at a Siggraph demo...

    ...and of course they have outtakes so clearly the humor is there. Very cool stuff though, awesome...
     
  46. Griffo

    Griffo

    Joined:
    Jul 5, 2011
    Posts:
    700
    Hi, I've been following this thread and are very impressed with what I've read and seen, so it looks like you've got yourself another customer.

    What I'd like to ask is I have a humanoid model holding a club, child of the hand, and if you get to close he smashes the club into the floor, my problem is it's on a Unity terrain so some places the animation of the club hitting the terrain actually goes through the terrain, and some places it's just off the surface.

    So would it be easy enough to add a collider to the cub with Final IK to stop the club only when it collides with the terrain?

    Thanks.
     
  47. janpec

    janpec

    Joined:
    Jul 16, 2010
    Posts:
    3,520
    You know what i would like to see, is when character falls on ground how good it is to pick itself up, fully dynamically no animations no respawn scripts:D Now that would fun to watch.
     
  48. Whippets

    Whippets

    Joined:
    Feb 28, 2013
    Posts:
    1,775
    that's an awful lot of different things happening at the same time - picking yourself up from the ground
     
  49. Partel-Lang

    Partel-Lang

    Joined:
    Jan 2, 2013
    Posts:
    2,556
    I've seen this video, its alien technology! :)
    I have worries about the performance of this kind of a thing though for usability in games, seems to be a lot of muscles...


    Yes, but you might find it easier to just raycast to find the ground height offset at the hand's horizontal position and lift the hand with FBBIK to avoid hitting the terrain in the first place ;)

    Go find Sumotori Dreams on YouTube :D
     
  50. Piranha668

    Piranha668

    Joined:
    Feb 21, 2013
    Posts:
    3
    hello, awesome package... so far there is alot to play around with. will you be making more in depth tutorials of how to setup the different ik system?
     
Thread Status:
Not open for further replies.