minilogoguy18 Posted July 31, 2016 Posted July 31, 2016 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.
Archangel35757 Posted July 31, 2016 Posted July 31, 2016 good discussion topic... (MD3 = tag_* and GLM = bolt_* ). Could your bolt be mirrored? I'm driving from Vegas to Palm Desert, CA. will post as soon as I can.
minilogoguy18 Posted August 1, 2016 Author Posted August 1, 2016 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.
eezstreet Posted August 1, 2016 Posted August 1, 2016 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
minilogoguy18 Posted August 1, 2016 Author Posted August 1, 2016 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. 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*
Archangel35757 Posted August 1, 2016 Posted August 1, 2016 Does the base AT-ST have this same problem? The bone jitter was an issue with Carcass-- which is now resolved.
Archangel35757 Posted August 1, 2016 Posted August 1, 2016 You can read about MD3 tags in the file format description here: https://linux.ucla.edu/~phaethon/q3/formats/md3format.html The red axis of the tag is forward, the blue axis of the tag is up, and the green axis of the tag is left. For example you want the red side of that tag to face front for tag_weapon. This corellates to the right-hand rule: zOrg likes this
minilogoguy18 Posted August 1, 2016 Author Posted August 1, 2016 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.
eezstreet Posted August 1, 2016 Posted August 1, 2016 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.
minilogoguy18 Posted August 1, 2016 Author Posted August 1, 2016 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.
Archangel35757 Posted August 1, 2016 Posted August 1, 2016 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: try putting long edge on red axis and short on green.
AshuraDX Posted August 1, 2016 Posted August 1, 2016 @@minilogoguy18 show a screenshot of the tag + the at-st foot, I have a theory Archangel35757 likes this
minilogoguy18 Posted August 1, 2016 Author Posted August 1, 2016 do you have negative scaling on any of your tags? I'm assuming your bolt matches what you posted here: 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
mrwonko Posted August 1, 2016 Posted August 1, 2016 Tags are based solely on the vectors between the first 3 vertices of the tag surface. No idea how vehicle feet use them.
Archangel35757 Posted August 1, 2016 Posted August 1, 2016 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.
AshuraDX Posted August 1, 2016 Posted August 1, 2016 @@minilogoguy18 can I get a plain front view and a side view? a orthogonal shot is not much help
Archangel35757 Posted August 1, 2016 Posted August 1, 2016 Compare the axes of the foot/ankle bone to the bolt axes.
AshuraDX Posted August 1, 2016 Posted August 1, 2016 Okay, double posting here on purpose to share what my experiemnts while working at the turntable taught me about tags: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.
Archangel35757 Posted August 1, 2016 Posted August 1, 2016 @@AshuraDX... maxscript starts at 1... but internally 3dsMax uses 0,1,2.
AshuraDX Posted August 1, 2016 Posted August 1, 2016 @@Archangel35757 - that might be, I went by the indices max displayed for my Editable Poly object.
minilogoguy18 Posted August 2, 2016 Author Posted August 2, 2016 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.
Archangel35757 Posted August 2, 2016 Posted August 2, 2016 Did you try rotating the tag 180 degrees about it's Y axis, as I suggested?
minilogoguy18 Posted August 2, 2016 Author Posted August 2, 2016 I did that before I even started this thread, didn't do a thing. The axis for both my AT-ST and the base one are identical in ModView.
Xycaleth Posted August 2, 2016 Posted August 2, 2016 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.
Archangel35757 Posted August 2, 2016 Posted August 2, 2016 well he asked about MD3 tags and GLM bolts. The AT-ST problem he's having is with bolts. @@minilogoguy18 -- would you try flipping the face normal and see what that does?
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now