Posted: Wed Sep 17, 2008 10:28 am Post subject:
ArticulationBone
Could need a little help here...
I´m currently trying to get walkers to automatically adjust their legs to the ground. To do so, I used the Mammoth Tank code that aligns their treads to the ground. As expected, it didn´t work at all.
I´ve assigned the lower leg bone as the ArticulationBone (AFAIK that´s the one rotating) and the foot bone as the HelperBone (AFAIK that´s the "target" that´ll stay ground aligned):
Code:
<ArticulationBone>
<ArticulationBone>
Any ideas on what I have to do differently? _________________ Off Duty. QUICK_EDIT
Joined: 18 Jun 2005 Location: Dordrecht, the Netherlands
Posted: Wed Sep 17, 2008 3:43 pm Post subject:
How do you mean? IIRC the Avatar has the same bug as the Juggernaught and the Tripod; feet disappearing in the ground when walking on slopes QUICK_EDIT
Joined: 02 Sep 2007 Location: My avatar pretty much gives it away...
Posted: Wed Sep 17, 2008 4:02 pm Post subject:
Hmm.. I am not 100% sure about this, but I guess the animation of the ArticulationBones overrides the movement that the "articulation" should give to those bones.
IIRC, the treads of the mammoth tank do not follow the ground during the crush animation, but only when not animated.
A possible solution could be using separate bones for "articulation" and animation. The geometry should be linked (using wwskin) to the "articulated" bones, and the "articulated" bones should in turn be linked to the animated bones, and not be animated themselves.
I have no idea if this will work, but if it does, you will also have the effect that the feet will follow the ground even when they're lifted up.
Remember to post your results _________________ QUICK_EDIT
I doubt it's possible because the walker has a walking anim, and the feet are part of the anim. Shame though =/
The walker also has an idle anim in which it turns the torso a bit but this doesn´t interfere with the IdleScan of the turret, the rotations are just added to one another. So I guess it should technically be possible with the ABs as well.
Crimsonum wrote:
How does the Avatar's walking mechanism differ from this, then?
It doesn´t.
Chronosheep wrote:
Hmm.. I am not 100% sure about this, but I guess the animation of the ArticulationBones overrides the movement that the "articulation" should give to those bones.
IIRC, the treads of the mammoth tank do not follow the ground during the crush animation, but only when not animated.
I always thought that they still follow the ground but only with the angle they´d have when being on the ground, thus the Articulation would simply be too minor in contrast to the animation to notice. Well, actually I hope it´s this way...
Chronosheep wrote:
A possible solution could be using separate bones for "articulation" and animation. The geometry should be linked (using wwskin) to the "articulated" bones, and the "articulated" bones should in turn be linked to the animated bones, and not be animated themselves.
I have no idea if this will work, but if it does, you will also have the effect that the feet will follow the ground even when they're lifted up.
Not sure if I´m motivated enough to link 1,7k vertices again. ^^ I´ll give it a try though if nothing else works.
Chronosheep wrote:
Remember to post your results
You can count on it. _________________ Off Duty. QUICK_EDIT
Joined: 02 Sep 2007 Location: My avatar pretty much gives it away...
Posted: Wed Sep 17, 2008 8:39 pm Post subject:
Quote:
I always thought that they still follow the ground but only with the angle they´d have when being on the ground, thus the Articulation would simply be too minor in contrast to the animation to notice. Well, actually I hope it´s this way...
Well, that might also be the case, but if a code based dierectly on the mammoth tank code doesen't work, this is the most reasonable explaination I could think of. ..Unless you have errors in the code, of course, but I trust that you have already checked everything twice .
As I said, I don't know this stuff very well, since I've never tried to rig a mech with ArticulationBones... I don't know if anyone has.
Since you can't notice any movement of the tracks caused by the terrain during the crush animation on the mammoth, this sounded like a possible explaination to me.
You could perhaps test it by giving the mammoth tank a hardly noticable animation (of the "articulated" bones) while moving. If the tracks no longer follow the terrain, the hypothesis was correct. _________________ QUICK_EDIT
After classifying the bones as ExtraPublicBones and manually adding a pair of new Helpers that aren´t part of the animation I noticed that it does work in fact - but not in the right direction. Instead of pitching the lower leg, it gets tilted to the side.
You can see it here, the legs are animated to pitch only on the y axis (i.e. stay straight to this POV):
Apparently, the orientation of the bone is ignored so the game confuses up/down with left/right as the bone is rotated even in the base pose. Anyone got an idea how to re-align an IK bone without having to redo all the animations?
€dit:
Wow, that was a heap of work...
Okay guys, it works now. After adding a second bone that isn´t rotated in the base position, the joint pitches to the correct direction. The effect isn´t all that drastic and not very precise but IMO it looks way better than having the feet always remain aligned to a horizontal plane.
_________________ Off Duty. Last edited by Golan on Thu Sep 18, 2008 12:32 pm; edited 1 time in total QUICK_EDIT
Kick-ass dude! Now write a quick tutorial on how to set up the extra rigging.
It´s really not that difficult to do, just as long as you know what there is to do. Basically, it´s what Chronosheep suggested, even though it´s needed for a different reason.
3DS:
First, make sure that the skeleton is positioned in the unit´s base pose, basically whatever pose is the closest to all resting animations. Set up a new Bone to take over the articulation job of the original, animated Bone. Place it at the same position and make sure that the pivot is aligned to world.
Now, link the articulation bone to the animated bone, then link the first bone of the hierarchy that was initially assigned to the animated bone to the articulation bone. If you´re relying heavily on IKs, make sure to double check if you have to re-assign some IK specific settings.
Place a new helper bone roughly at the position on the x-y plane where the animated bone points to in the base pose.
XML:
Change whatever draw module the unit initially had to a TankDraw. Specify all the helper bones and articulation bones as ExtraPublicBone.
At the end of the TankDraw, add as many ArticulationBone elements as needed and specify a pair of articulation bone and helper bone with each.
You can post new topics in this forum You can reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum You cannot attach files in this forum You can download files in this forum