Jump to content

Let's talk about tags


Recommended Posts

Posted

I'm kinda having some issues with tags and it's leading me to want to know more about how they actually work.

 

I want to know how the game uses the angles of the tags and the vertex order to determine how they behave. On my AT-ST there is an issue that I can't seem to fix. The feet roll in the opposite direction when on a slope rather than rolling 45° along the Z axis it tends to roll -45°Z. I'm wondering if the origins in any modeling software even matter or if it's solely done using it's angles which is how I thought they worked.

 

@@eezstreet

@@DT85

@@ensiform

@@mrwonko

@@Archangel35757

 

I'm kinda looking for someone who knows the game code and can answer exactly how the game handles tags. I'm also aware that tags in MD3 files axis are different than bolts in GLM files even though they're the same thing but named differently based on how the model is processed.

 

I'm also needing to know because I'm making a script in Softimage that will add bolt/tags to the Get>Primative>Polygon Mesh menu to quickly make tags and I want them drawn correctly.

Posted

I tried mirroring it with no success, I thought the *r_foot and *l_foot controlled how the feet interact with the maps terrain but maybe I'm wrong and only act as collision?

 

I could try rotating the bones around and re-weighing the feet, should be quick since none of the bones have any actual animation on them.

 

I still wanna know more about tags though since I want to be able to create them with confidence that they'll work every time without having to import a base model and deleting everything but the tags so that I can use them for my models. For a character model it's no big deal because my skeleton file has all the tags where they need to be and moving them only happens in rare instances when you have a odd model. I'm dealing with mostly custom stuff that has it's own skeleton and animation set. I can't just import tags and be done with it.

Posted

Sorry, I wouldn't be able to tell you much. It seems like you are wanting information that is mostly tool-dependent (unless I am missing something). The game treats tags like they are bones, if that helps.

 

Here's the section involving footstep for slope, there's a special part involving AT-STs and their footpad direction.

https://github.com/JACoders/OpenJK/blob/master/code/game/bg_pmove.cpp#L7187

 

More people: @@Xycaleth @@Raz0r

Posted

Well the thing that I was wondering is that does the game even take into account the local transforms of the tag in any 3d software to determine its axis? It doesn't seem as if the game uses the local transforms of the tag at all but rather use the vertex ordering, edge information and which way the normals face to determine its axis.

 

It's funny how the bone jitter that was talked about a while back is mentioned in the games code as a known problem.

 

 

Yh8hgyK.jpg

 

 

There's an image of exactly what I was talking about, doesn't seem to make sense but as far as I know it's a tag problem but I used the tags from the base AT-ST so I'm pretty confused. Looks like I'll have to release a version 2. *sigh*

Posted

No, the feet aren't behaving properly with the terrain, see the pic.

 

I want to know HOW XYZ are determined by both formats, it seems that the local transforms in Softimage don't really matter.

Posted

They don't, in essence. I believe the way this works is it takes the tag angle/origin, trace down, and then twist the bone to match the slope. But if your rig matches Raven's system of tags (ie there's no errors with the tag) then my next best guess is that the calculation is off.

Posted

Well the odd thing is that I'm using the base AT-ST tags and still have a problem. I've got another idea which has to do with the model needing it's origin adjusted before compile which MAY have something to do with the reversed behavior but we'll see.

Posted

Do you have negative scaling on any of your tags?

 

Edit: Is the triangle surface's Normal vector flipped?

 

I'm assuming your bolt matches what you posted here:

 

JnJQGxJ.png

 

try putting long edge on red axis and short on green.

Posted

do you have negative scaling on any of your tags?

 

I'm assuming your bolt matches what you posted here:

 

JnJQGxJ.png

 

try putting long edge on red axis and short on green.

No negative scaling. The transform gizmo in Softimage was only modified to represent what I was seeing in ModView and MD3View, like I keep saying, the transform values in Softimage or any software seem to not matter at all, it's like they get their info from the vertex ordering of the polygon itself as tags origins don't match between SI and ModView. I'm going to test this soon by exporting 2 tags in 1 scene that have different local values to see what their values are in GLM format.

 

@@AshuraDX

 

lKL9MOp.png

 

Posted

the bolts in Modview behave like bones... they use +Z up, +X right, and +Y into screen if IIRC. Basically a 90 degree rotation about the X axis in Softimage.

 

Is the face normal of the bolt triangle flipped the wrong way?

 

Based on your screenshot... I'd try rotating your bolt 180 degrees about Y axis.

Posted

Okay, double posting here on purpose to share what my experiemnts while working at the turntable taught me about tags:

a648d01b8243ea98dca25ac1a5d71ea3.png

The direction from vertex 2->0 equals +X direction, 2->1 equals +Y and normal direction equals -Z.
Angles withing the triangle are completely ignored, the only thing that matters are vertex indices and their relative positions to each other.

Depending on your software the indices might be different in your software. 3ds Max ,for example ,starts counting from 1 instead of 0 while softimage seems to have reversed vertex indices.

Posted

Vertex numbering doesn't count for anything, drew a new tag so that the numbering would match yours and it didn't change a thing.

 

I'm starting to feel like this is something that cannot be fixed. I mean, I could get rid of the "Motion" bone which seems to make the feet no longer react to the angle of the terrain but it's gonna mean a overhaul of some things.

 

Also, @@Archangel35757 the bone transforms don't matter either, I tried that already. Who knows why exactly JK2 and JA have super odd transforms for their bones, only the person who worked on the games animations would be able to answer that probably.

Posted

I did a quick search around and as far as I can tell there's no standard way of interpreting the tag triangle on an MD3 model. I thought at first that it takes the the vertex at the right angle of the triangle to be the origin, and then the orientation is based on the edges of the triangle, with the mid length edge being the X axis and the shortest edge being the Z axis (or something like that). However, it's completely up to the exporter to determine how it makes use of that triangle. If you have source code available for the MD3 exporter you're using, I can take a look to see what it's doing. Otherwise it's up to experimentation.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...