Discussion in 'Assets and Asset Store' started by Partel-Lang, Jan 15, 2014.
Yeah I had to change my shorts!
Looks like the update is ready! 8)
Dont forget to backup your project before upgrading!
It seems like a small relic testing script named Button.cs has sneaked into the package, it is not namespaced so it might conflict if you already have a script with the same name. Just delete this script, it is not used.
I’m porting foot-placement to the Full body Ik system and placement works fine...
But when I align foot to the surface, really weird rotation artifacts happens unless I set effector rotation weight to zero. Do you have any idea why FBIK is doing that? Do I need to adjust something beyond ik rotation here?
FBBIK effector rotation works differently from BipedIK or Unity's IK rotations. The FBBIK rotations are dependent on the bone orientation. If you write ik.solver.leftFootEffector.rotation = ik.solver.leftFootEffector.bone.rotation, then your effector rotation will match the bone rotation and it will be maintained the same. That makes some things more difficult, but it also makes a ton of other things a lot easier. I'm considering to switch BipedIK to this approach as well.
If you want to align the foot to the ground normal, you would have to do it by using rotational offset, something like:
// Get the rotation from the default world up to the ground normal...
Quaternion groundNormalRotation = Quaternion.FromToRotation(Vector3.up, groundNormalFromRaycast);
// ...and rotate the foot by this rotation.
ik.solver.leftFootEffector.rotation = groundNormalRotation * ik.solver.leftFootEffector.bone.rotation;
Partel you are a genius
Thank you very much, I didn’t really notice the different behavior, it’s working like a charm now!
So, you need to update your tool.
Thanks to both of you.
Yes, I am just adding an ‘adaptive’ option to make easier to make foot-place not affect full-body behaviour (or affect if you want to);
Left foot has adaptive turned on, it moves solver only when has contact to floor, right is turned off (on image only);
It causes the hole body try to reach the contact point.
Thanks to FinalIK there’s no need to go on adjusting character controllers’ height anymore, we just turn on a bool and the character with FBIK will try its best to reach the IK goal
Do you have a guide on how to use FinalIK with your Mecanim Foot-Placement?
(I believe you might've mentioned somewhere, either on this thread, Partels original one or yours)
It is really simple to use, i.e this is the FBIK version:
It is all about curves, really. You simply adjust offsets and curves, checking if curves are doing a good job with your animation;
The offsets are a way to tell the IK what is the height of your foot’s mesh model, you adjust this to make the mesh to mimic real foot collisions.
Curves are used to let your animation playback correctly at the same time IKs are avoiding obstacles for the legs.
This simple curve will work for most animations, you adjust it or assign a new one when your animation changes to fit exactly ‘where leg can’t be a foothold anymore’:
Sometimes you may want to change how foot rotation reacts to the surface it is aligned to, so you could adjust ’sole curves’ as you want.
And it is that simple
So wait, otherwise all we do is add the FBFoot Placement script and it immediately recognizes FinalIK and/or its effectors?
Yes, just add the script to the character with FinaliK Component, uncomment the ‘//#FINALIK’ on line 1 and it works.
Also don’t forget to choose a layer to raycast with. Unity sets “Mask” to ‘nothing’ by default. Change to ‘everything’ or any other layer you want.
In my projects I leave on “Level” layer so characters have foot placed with anything scene related but nothing else.
At this moment I am having trouble to login back with Asset Store tools. I think it crashed or something and now I’m unable to send some more stuff... I hope it’s not just me.
Not that I mind editing the code, but IF I didn't ask you just now, it would've taken me longer to discover the comment...
...maybe make it an exposed boolean so you can just toggle it on/off from the script? Might be easier for others who will undoubtedly ask you this question again, hehe.
Anyway thanks Bruno!
I had to do that because some users do not have FinaliK and they always email about any compiler error;
If you don’t have FinaliK installed and import foot placement that way without compiler directives, Unity will scream red errors and that would make ppl mad haha
Ah of course, durr!
http://www.gamasutra.com/view/news/...g_AI_in_Assassins_Creed_III_XCOM_Warframe.php (starting at 30mn41)
It would be fun to see how long someone came out with a similar solution using FBBIK
I hope to be part of this as soon as I can
I have that bookmarked. Lost count of how many times I've watched it; doing that is 100% a goal of mine I just have a LOT to learn before doing it.
You'll need world class base mobcap data and a lot of it, but other than that, it all can be done with Final IK.
Hmmm so you have a new update, which requires Unity 4.3.4, and after all the updating I'm getting an error in your Playmaker implementation:
Assets/Plugins/RootMotion/FinalIK/3rdParty Support/Playmaker/FBBIKEffector.cs(44,35): error CS0426: The nested type `Mode' does not exist in the type `RootMotion.FinalIK.IKEffector'
The mocap can wait as long we have the basic system, even if it does not look that good!
Great Progress on this package. Congrats.
Since there are lots of new features, do you think that the system can now manage to Juggle or do circus acts?
Yea I was going to say, you only need the animation, however you create it and of whatever quality.
Looks like a horizontal tracking on top of an animation, it should be possible but you would need a policy for the "ball physics" (direction and force to send the ball after a grab).Maybe if you want to go fancy and entirely procedural a tracking of the distance that drive the animation weight (grab phase), but you may have problem of sync if things get out of hand, so maybe adding a release policy to keep sync. And a lot of tweaking to make it look natural.
How do you assign the spines of a Look At IK script via code? I was poking around in the api doc but didn't see how to reference it.
Is there any way to have a mecanim character's hands slide across any wall when near it? Like Naughty Dog games.
Something like this:
If so, would any scripting be required? To do this without any scripting would make this an easy buy.
Yes and yes.
Just bought this plugin today, have been playing around with it and getting some interesting results. The documentation and example scenes are much help
I do have one question/query thought. After applying a FBBIK to my character, it changes his idle animation quite heavily. During the idle anim, he scratches his left arm with his right arm. With FBBIK turned off this looks fine, but with it turned on, his arm goes through his body, I have no idea why this could be happening. This is with default settings, the bone references look correct as well.
has anyone else run into similar issues?
Also really excited to see what sort of foot IK solution will be available in the future. I have had a play around using Bruno's footIK solution, but its always nice to have a native solution
If I understand correctly, it is possible with the current version of FinalIK but it will be very difficult to make it look natural ?
Are there any examples or tutorials that show how to do this?
Hi, Steve, I have not updated the Playmaker Actions yet, I will do it today.
Its possible theoretically, yes, I'm not sure how realistic the end result would be though, with a lot of tweaking.. You could for example just animate the balls and use Mecanim curves to set hand effector weight.
lookAt.solver.SetChain (Transform spine, Transform head, Transform eyes, Transform root);
Yes it can be done, it needs a bit of scripting though, just raycast/spherecast from the neck towards the direction where you'd normally put the hand and set the hand effector to the RaycastHit.point.
Hi, thanks for the purchase!
You can try to adjust the initial pose of the character. In the scene view if you click on the FBBIK character you see the solver armature on top of it. The little arrows on the elbows and knees point to the direction the limbs will be bent to. You can try to rotate the elbow/knee bones slightly to change that direction.
See this video on how it should be done.
If that doesn't help, it might be that your elbows are not rigged as hinge joints in the animation software you are using.
FullBodyBipedIK considers all elbow and knee joints as hinge joints, meaning the forearm can not twist relative to the upper arm. With the most common rigs, like the 3ds Max Biped, it is not a problem, as the rig prevents this kind of animation from the start. There are rigs however that allow for that kind of twisting. It will not break the FBBIK solver, instead, FBBIK will force the elbow or knee to restrain to a hinge joint even if there are no effectors enabled. It will not change the end position of the limb, it might slightly change the bending direction of the limb and the twist rotation of the bones in the limb. You can try this:
ik.solver.GetBendConstraint(FullBodyBipedChain.LeftArm).bendBone = IKConstraintBend.BendBone.Second;
This will get the bending direction by the animated rotation of the second bone (forearm) instead of the first that is the default.
Sorry, I dont have a tutorial/demo scene about that yet.
Just uploaded the updated Playmaker actions.
FINAL IK - Effector Animator Concept--Just wondering if you'd be willing to share this as I was writing a version of this myself it would save me the headache! Even if it's "proof of concept", that'd be great...
Great product, all the best....
Yeah, why not..
Here you go
Just make sure to read the ReadMe in the package root folder.
Bought this package recently and am having problems applying FBBIK to the first character I've tried it on. Immediately on pressing Play, his right shoulder twists and both arm and hand suddenly face 180º from forwards. The character is available on the asset store, though I expect I can send it to you for testing purposes, Partel. It appears to use a standard 3dsmax biped skeleton, at least from bone naming, so I expected it to work.
On another note, I find myself unable to connect to www.root-motion.com . I dont know why, I've been trying for a week or so, and seem to need a web proxy to connect.
Looking forward to seeing this product working.
Hi Duencil, and thanks for the purchase!
It would be the quickest if you could send me a package with the character and the animation to email@example.com, I'll get it sorted out for you.
But I have no idea, why you can't access root-motion.com, there are a lot of people visiting that site from all over the world.
I bought your package! My headakes are magically gone !
I have a question thought... In the manual it is written :
FullBodyBipedIK does not have elbow/knee effectors. That might change in the future should there be a practical demand for them. Elbow and knee positions can still be modified though as bend goals are supported.
How can I set the bend goals positions like I do for the solver positions( ik.solver.leftHandEffector.position )?
After reviewing all the vids and docs, this system is very impressive! Before I purchase though, I want to ask if a couple of my ideas are possible with Final IK. I'm almost confident that it will achieve my requirements, but I wanted to run it by you.
I rather not create separate animations for un-holstering a side arm; placement can be either the thigh, hip, or under arm. Can I use this system to aid in the hand placement?
Also I saw a vid on the Motion Amplifier; can I use that to alter walk cycles without having to create unique animations, such as moving hip rotations to go from the default walk to something sexier?
Hi, and thanks a lot for the purchase!
The bend goals dont work like the effectors, they just change the bending direction of the limbs.
To use them, create a new gameobject and add the FBIKBendGoal script.
Yes, you can do the holstering.. You can just attach effector targets to the points where you want to holster the arm and then interpolate effector weight.
And yes, you can play around with the Amplifier to make the walk sexier, amplifying the horizontal motion of the thighs should do it I guess
Hi Partel, I'm using UMA in my game and I've added FBBIK and lookat, via script as in your tutorial. I notice that when I've added the FBBIK, without moving any effectors etc my walk animations are effected on the legs and it doesn't look correct.
Is there anything I can do about it?
Check the effectors on the knee's the UMA knee's are close to zero on the T-Pose so the FBBIK wont know which was they should bend.
Bring in the UMA race prefab into the scene and adjust the knee's a little bit on the T-Pose so the IK knows which way they should bend.
Thanks for the help, it helps a little but I'm still getting really bad issues on the female, no matter what positions I try I can't seem to stop it from doing this with the right leg....
I see there are a number of UMA devs having this problem it is difficult to solve this in play mode. But as all UMA skeletons use the same bone orientations, I bet I can come up with a script that solves it once and for all. Hold on...
Thanks Partel, looking forward to the fix.
OK, I'm done..
If you are in a hurry with this, download the patch and import to your project.
I made it possible to use pre-defined limb orientation definitions or even to make your own very easily so you won't have to worry about how your character is posed at the time of FBBIK initiation.
This is all you need to do for UMA:
// Call after FBBIK has initiated
I have made 2 pre-defined biped limb orientations, for UMA and for 3ds Max Biped (BipedLimbOrientations.MaxBiped) But you can also fill in your own custom definition in the editor...
public BipedLimbOrientations customLimbOrientations;
This is how the biped limb orientations definition looks like (this is the same as MaxBiped):
Imagine your character standing in I-pose (not T-pose) with legs together and hands on the sides...
The Upper Bone Forward Axis is the local axis of the thigh/upper arm bone that is facing towards character forward.
Lower Bone Forward Axis is the local axis of the calf/forearm bone that is facing towards character forward.
Last Bone Left Axis is the local axis of the foot/hand that is facing towards character left.
Thats it. I will add this to the next update so no need for patching again in the future.
Hi Partel, thanks for the patch, it's working almost perfectly but there's still some slight change in the legs. I've made a video:
Maybe that's as good as it's going to get?
No. Thing is that with the current version, the elbow/knee joints are forced to 1 DOF (degrees of freedom) hinge joints, to avoid the risk of the limbs getting flipped in some cases because of animation import/compression/blending/keyframe reduction artefacts. Some animating rigs however allow a bit of elbow/knee rotations around all axes, so that motion is currently lost, that's why it looks different for some characters.
But just today it seems like I have finally found a solution for having 3 DOF joints and all the characters and animations I have tested so far come across completely lossless, only limit is that the limbs can't be reversed (like broken from the knee/elbow). I mean with this you can have FBBIK on and the animation looks exactly the same. It still needs to go through all phases of testing before I add it to the package but so far so good.
If you (or anyone else) is interested in trying this out and helping to test it, I can make another early bird patch
Would love to try it out. Thanks again
Fixed the link