Jump to content
The Dark Mod Forums

IK settings missing dir joint?


Ishtvan

Recommended Posts

Our ik settings are missing a "dir" joint.

 

 

The vector from the ik_knee joint to the ik_dir joint specifies the direction the walk IK will bend knee.

(From here: http://www.iddevnet.com/doom3/walkik.php)

 

These are our ik settings:

"ik_numLegs" "2"
"ik_minWaistAnkleDist" "16"
"ik_footSize" "4"
"ik_waist" "Hips"
"ik_hip1" "LeftUpLeg"
"ik_hip2" "RightUpLeg"
"ik_knee1" "LeftLeg"
"ik_knee2" "RightLeg"
"ik_ankle1" "LeftFoot"
"ik_ankle2" "RightFoot"
//"ik_dir1" "LeftFoot"
//"ik_dir2" "RightFoot"
"ik_foot1" "LeftToeBase"
"ik_foot2" "RightToeBase"

 

It looks like we have everything except for the "dir" one, which is commented out, maybe because we couldn't find the right joint for it? The Doom3 creatures have unique knee joints, for example:

"ik_dir1"		  "Lknee"
"ik_dir2"		  "Rknee"

 

Our skeleton doesn't have these knee joints. I don't know how critical this is. IK seems to work, but I'm not sure if we're seeing undefined behavior when we don't put in an ik_dir or what. Does our skeleton have anything resembling the knee joints on the D3 skeletons? If not, is it okay to be missing that joint, or do we have to add it? If so, we should add it now rather than later.

Link to comment
Share on other sites

It doesn't look like we've ever had them set, and I've never noticed any problems with the way the knee bends with our AI. Maybe it's only needed for AI that have knees that can bend in weird ways or something.

Link to comment
Share on other sites

Okay, I looked at the source, and if you don't input ik_dir, it does this:

 

// get the IK direction
if ( dirJoints[i] != INVALID_JOINT ) {
dirOrigin = joints[ dirJoints[ i ] ].ToVec3();
dir = dirOrigin - kneeOrigin;
} else {
dir.Set( 1.0f, 0.0f, 0.0f );
}

 

In other words, it assumes that the front of the knee is facing in the direction (1,0,0), which is straight forward. I guess that's okay for our purposes. If we make any backwards-bending kneed AI later (steambots, horses?), they'll need a dir joint to specify that.

Link to comment
Share on other sites

  • 3 weeks later...

I guess that makes sense since their knee would be facing out sideways instead of straight forward in the direction they're looking. Do you think we're okay in the current situation where humans don't have the knee joint and we just assume the knee hinges on an axis facing straight forward?

 

What if the upper leg is bent at the hip? Wouldn't that put the straight-legged knee at a different angle than straight ahead? In other words, imagine a person standing straight. Okay, their knee is facing straight forward. But now if they raise up one leg while keeping it straight, the knee angles up (facing up when the leg is held out all the way at 90 degrees). But our rig still thinks the knee is facing straight forward, because we have no knee joint that would rotate along with the upper leg and act as a reference. Couldn't that cause some inaccuracy in the walk IK? Is this having any effect on the current run cycle?

 

I don't know if this is a problem though, do the D3 knee joints rotate with the upper leg, or are they parented to the lower leg?

Link to comment
Share on other sites

The knees on our rig are joint1 (left) and joint2 (right). Unfortunately they need to be reexported because they are not included in the conversion. The internet connection I've been raiding is not reliable so if you need to experiment someone needs to exportmodels with joint1 and joint2 added in the def file (builder guard):

 

options -keep Hips LeftHips_Dummy LeftUpLeg LeftUpLegRoll LeftLeg joint1 LeftLegRoll LeftFoot LeftToeBase joint3 joint4 RightHips_Dummy RightUpLeg RightUpLegRoll RightLeg joint2 RightUpLegRoll RightLegRoll RightFoot RightToeBase joint5 joint6 Spine_Dummy Spine Spine1 Spine2 LeftShoulder_Dummy LeftShoulder LeftArm_Dummy LeftArm LeftArmRoll LeftForeArm LeftForeArmRoll LeftHand LeftHandIndex1 LeftHandIndex2 LeftHandIndex3 joint12 LeftHandRing1 LeftHandRing2 LeftHandRing3 LeftHandRing4 LeftHandThumb1 LeftHandThumb2 LeftHandThumb3 Neck Head RightShoulder_Dummy RightShoulder RightArm_Dummy RightArm RightArmRoll RightForeArm RightForeArmRoll RightHand RightHandIndex1 RightHandIndex2 RightHandIndex3 joint14 RightHandMiddle1 RightHandMiddle2 RightHandMiddle3 joint13 RightHandThumb1 RightHandThumb2 RightHandThumb3 leftpad rightpad joint7 sword -sourcedir models/model_src/builder_guard_mb -destdir models/md5/chars/builders/guard

 

According to maya the joints comes after the upper legs (LeftLeg joint1, RightLeg joint2). I commented the ik_dir out on my initial def files because I didn't understand how they worked at the time.

Link to comment
Share on other sites

Are you talking about the new rig, the old rig, or the really old original rig? ;)

 

There have been a lot of changes to the AI over the past year or two. We don't even use models/model_src/builder_guard_mb anymore (though it's possible the same joints are present in the new rig).

Link to comment
Share on other sites

Are you talking about the new rig, the old rig, or the really old original rig? ;)

 

There have been a lot of changes to the AI over the past year or two. We don't even use models/model_src/builder_guard_mb anymore (though it's possible the same joints are present in the new rig).

 

I have no idea :blink: The same skeleton used in the different sized animations. The new builder guard I'm working on is using the medium animations without problem. I was using the new builder guard def as an example. BTW, what happened to the ik_dir decls in the def files?

Link to comment
Share on other sites

The same skeleton used in the different sized animations.

 

That's the "old" skeleton, which is based on the even older citywatch skeleton (which I believe is the one you worked on a while back). If models/model_src/builder_guard_mb uses the same joint names and basically the same positions, you might not notice any obvious problems. However, that skeleton is not being worked on anymore as we move animations and characters over to the new rig Squill has created.

Link to comment
Share on other sites

That's the "old" skeleton, which is based on the even older citywatch skeleton (which I believe is the one you worked on a while back). If models/model_src/builder_guard_mb uses the same joint names and basically the same positions, you might not notice any obvious problems. However, that skeleton is not being worked on anymore as we move animations and characters over to the new rig Squill has created.

Where's the new rig? I looked all over the forums to find more info but I found very little about it.

Link to comment
Share on other sites

This is the (lengthy) thread about it. http://forums.thedarkmod.com/index.php?showtopic=7263 There are still a few issues to be worked out before it is finalized.

Link to comment
Share on other sites

The new skeleton is being used by the proguard, currently, and I think the most recent version is in the models_src folder. However, there are still a few things that need to be modified...I think Squill is planning to add a couple new joints to the knees and perhaps rotate the head bone.

Link to comment
Share on other sites

The new skeleton is being used by the proguard, currently, and I think the most recent version is in the models_src folder. However, there are still a few things that need to be modified...I think Squill is planning to add a couple new joints to the knees and perhaps rotate the head bone.

The rig needs the joints that stick out of the thighs to animate the tunics and stuff (the lower part of the cloth touches the leg when stepping up instead of floating above the leg). oDD is the one that told me about their purpose & the proguard lacks those joints. I wish I was around during this debate just so we could avoid headaches like this. Besides, isn't it late in the game?

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

  • Recent Status Updates

    • The Black Arrow

      Hey @nbohr1morehow come the zombies in The Dark Mod don't have a "resurrection" mechanic to it, similar to how Thief has it?
      They're quite a weak creature as of right now, it's merely a walking corpse that slashes you, making attacking them to kill them an actual strategy.
      Would be better if they had some cool mechanism to it that truly makes them a danger, such as the resurrection idea itself.
      · 2 replies
    • Ansome

      Query: when was the last time a zombie in a video game was unnerving or scary to you? I'm chipping away at my anniversary submission and I've been trying to gather opinions on the subject. I'm perfectly capable of lighting them well, changing their sfx, and creating effective ambience, but I'm worried that zombies at their core are just too overdone to be an effective payoff to the tension I'm creating.
      · 4 replies
    • nbohr1more

      The Lieutenant 3 is out! Congrats Frost_Salamander! ( raising awareness )
      · 2 replies
    • OrbWeaver

      Has anyone had any luck with textures from Polyhaven? Their OpenEXR normal maps seem too washed out and give incorrect shading in the engine.
      · 5 replies
    • datiswous

      I tried to upscale the TDM logo video. First try:

      briefing_video.mp4 You can test it ingame by making a copy of the core tdm_gui.mtr and place it in your-tdm-root/materials/ , then edit line 249 of that file into the location where you placed the new briefing.mp4 file.
      What I did was I extracted all the image files, then used Upscayl to upscale the images using General photo (Real-Esrgan) upscale setting and then turn it back into a video.
      I might have to crop it a bit, the logo looks smaller on screen (or maybe it's actually better this way?). My video editor turned it into a 16:9 video, which I think overal looks better than 1:1 video of original.
      · 1 reply
×
×
  • Create New...