Project Perfect Mod Forums
:: Home :: Get Hosted :: PPM FAQ :: Forum FAQ :: Privacy Policy :: Search :: Memberlist :: Usergroups :: Register :: Profile :: Log in to check your private messages :: Log in ::


The time now is Fri Apr 19, 2024 5:48 pm
All times are UTC + 0
ArticulationBone
Moderators: Global Moderators
Post new topic   Reply to topic Page 1 of 1 [11 Posts] Mark the topic unread ::  View previous topic :: View next topic
Author Message
Golan
Flamethrower


Joined: 21 Nov 2007

PostPosted: Wed Sep 17, 2008 10:28 am    Post subject:  ArticulationBone Reply with quote  Mark this post and the followings unread

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. Very Happy


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.

Back to top
View user's profile Send private message
Dutchygamer
President


Joined: 18 Jun 2005
Location: Dordrecht, the Netherlands

PostPosted: Wed Sep 17, 2008 11:41 am    Post subject: Reply with quote  Mark this post and the followings unread

I doubt it's possible because the walker has a walking anim, and the feet are part of the anim. Shame though =/

Back to top
View user's profile Send private message Send e-mail Skype Account
Crimsonum
Seth


Joined: 14 Jul 2005
Location: Fineland

PostPosted: Wed Sep 17, 2008 2:01 pm    Post subject: Reply with quote  Mark this post and the followings unread

How does the Avatar's walking mechanism differ from this, then?

_________________


Back to top
View user's profile Send private message
Dutchygamer
President


Joined: 18 Jun 2005
Location: Dordrecht, the Netherlands

PostPosted: Wed Sep 17, 2008 3:43 pm    Post subject: Reply with quote  Mark this post and the followings unread

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 Confused

Back to top
View user's profile Send private message Send e-mail Skype Account
Chronosheep
Soldier


Joined: 02 Sep 2007
Location: My avatar pretty much gives it away...

PostPosted: Wed Sep 17, 2008 4:02 pm    Post subject: Reply with quote  Mark this post and the followings unread

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 Wink

_________________

Back to top
View user's profile Send private message
Golan
Flamethrower


Joined: 21 Nov 2007

PostPosted: Wed Sep 17, 2008 8:00 pm    Post subject: Reply with quote  Mark this post and the followings unread

Dutchygamer wrote:
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 Wink

You can count on it.

_________________
Off Duty.

Back to top
View user's profile Send private message
Chronosheep
Soldier


Joined: 02 Sep 2007
Location: My avatar pretty much gives it away...

PostPosted: Wed Sep 17, 2008 8:39 pm    Post subject: Reply with quote  Mark this post and the followings unread

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 Wink .

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.

_________________

Back to top
View user's profile Send private message
Golan
Flamethrower


Joined: 21 Nov 2007

PostPosted: Wed Sep 17, 2008 9:10 pm    Post subject: Reply with quote  Mark this post and the followings unread

Something inside of me just died...

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

Back to top
View user's profile Send private message
Mighty BOB!
AA Infantry


Joined: 05 Oct 2005
Location: USA

PostPosted: Fri Sep 19, 2008 7:41 am    Post subject: Reply with quote  Mark this post and the followings unread

Kick-ass dude! Now write a quick tutorial on how to set up the extra rigging. #Tongue

_________________
WOL nick: migtybob
Wesforce wrote:
We are living in a post-common sense society.

Back to top
View user's profile Send private message Visit poster's website
JJ_
Light Infantry


Joined: 12 Sep 2008

PostPosted: Fri Sep 19, 2008 8:24 am    Post subject: Reply with quote  Mark this post and the followings unread

Awesome. Very Happy

Glad you got it working.

Back to top
View user's profile Send private message
Golan
Flamethrower


Joined: 21 Nov 2007

PostPosted: Fri Sep 19, 2008 9:35 am    Post subject: Reply with quote  Mark this post and the followings unread

Mighty BOB! wrote:
Kick-ass dude! Now write a quick tutorial on how to set up the extra rigging. #Tongue


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.

Code:
         <TankDraw
            id="ModuleTag_Draw"
            ExtraPublicBone="WEAPONA01 WEAPONB01 SHOULDER TORSO R_TOE_TARGET L_TOE_TARGET L_SHANK_AB R_SHANK_AB L_SHANK_AB_Helper R_SHANK_AB_Helper"
            OkToChangeModelColor="true"
            [...]
            [...]
            [...]
            <ArticulationBone
               ArticulationBoneName="L_SHANK_AB"
               ArticulationHelperBoneName="L_SHANK_AB_Helper" />
            <ArticulationBone
               ArticulationBoneName="R_SHANK_AB"
               ArticulationHelperBoneName="R_SHANK_AB_Helper" />
         </TankDraw>

_________________
Off Duty.

Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic Page 1 of 1 [11 Posts] Mark the topic unread ::  View previous topic :: View next topic
 
Share on TwitterShare on FacebookShare on Google+Share on DiggShare on RedditShare on PInterestShare on Del.icio.usShare on Stumble Upon
Quick Reply
Username:


If you are visually impaired or cannot otherwise answer the challenges below please contact the Administrator for help.


Write only two of the following words separated by a sharp: Brotherhood, unity, peace! 

 
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


Powered by phpBB © phpBB Group

[ Time: 0.1655s ][ Queries: 11 (0.0089s) ][ Debug on ]