Wudan Posted February 10, 2003 Share Posted February 10, 2003 New WIP theory about GLA merging is up at The Dark Side Compendium along with a spiffy-er homepage. (the spot you are looking for is on the left). This is 100% not tested, that's why it's a WIP, but, I'd like input from the community on how to accomplish certain steps in this process. Also, one important step is the GLAMerge program. Don't worry about it - if you can't make a 72 boned gla file with new animations, then you don't need GLAMerge. I guess you could say objective one is to make new working humanoid animations. Use the carcass -dump model.gla to check to see if you have enough bones. Link to comment Share on other sites More sharing options...
ASk Posted February 10, 2003 Share Posted February 10, 2003 well GLAMerge is not exactly out yet (publically at least) But my email is welcome to submissions ask@darklordsofsith.com Please submit the gla files (no complex anims, simple ones are enough), a description of what it should look like and the contact info Winner gets his name in GLAMerge credits as well as the JK2 history books Link to comment Share on other sites More sharing options...
Wudan Posted February 10, 2003 Author Share Posted February 10, 2003 Looks like it's up to me ... ASk, what do the bones need to be weighted - do they all need *some* weight? Link to comment Share on other sites More sharing options...
Psyk0Sith Posted February 10, 2003 Share Posted February 10, 2003 Depends on what you are doing, but not all bones need to be weighted. As long as they are included in the bones list so they can be found, then it should work. I base this on the fact that you can export a player with unweighted fingers (but still in the bones list). Link to comment Share on other sites More sharing options...
ASk Posted February 11, 2003 Share Posted February 11, 2003 http://www.darklordsofsith.com/ask/bone.log This is the dump from the gla This is how the second gla should look when dumped I honestly don't know anything more than that :/ Link to comment Share on other sites More sharing options...
Psyk0Sith Posted February 11, 2003 Share Posted February 11, 2003 So basically you want someone to animate the character (with 72 bones weighted...means facial bones are also weighted) in 3D max and write a .gla/cfg file from the .XSI??? I dunno much about coding but, but im guessing you want this to compare how the data is read/written in the GLA or something like that? Including facial anims, my Ki-Adi-Mundi model has 69 weighted bones...any chance some other objects might be considered as bones? like model root/mesh root and the third???stupid_triangle_off??? Link to comment Share on other sites More sharing options...
Wudan Posted February 11, 2003 Author Share Posted February 11, 2003 copy _humanoid.gla to the tools directory and run "carcass -dump _humanoid.gla" that will tell you how many bones there are and what their names are, and how many children each of them have. Of course, you could just try to read ASk's log, which tells you this stuff also. Link to comment Share on other sites More sharing options...
Psyk0Sith Posted February 11, 2003 Share Posted February 11, 2003 copy _humanoid.gla to the tools directory and run Carcass reports 71 bones with the original GLA. I just realised this: new animations and GLA files are possible and will most likely be recognized by the game without any coding. The only thing that is holding us back is the fact that no animator seems to be interested in this. I can move some bones around but i could never animate well enough to create an entire set of anims. Oh and we need to be able to extract/merge anims so we can re-use some from the original GLA, but you guys are already working on it . I'll animate something and dump the GLA info and see what happens... Link to comment Share on other sites More sharing options...
Wudan Posted February 11, 2003 Author Share Posted February 11, 2003 Model_root is a bone - ... hmmmm... ? Yeah, we kinda scared all the animators away when we couldn't do it. ASk's program which merges two proper-form GLA's is severely untested in battle, I know it will work, hence the Challenge. Link to comment Share on other sites More sharing options...
razorace Posted February 11, 2003 Share Posted February 11, 2003 I don't think Model_root is a bone. It's shown as an animation in Modview. Link to comment Share on other sites More sharing options...
Psyk0Sith Posted February 11, 2003 Share Posted February 11, 2003 -------- C:\base\models\players\test\Untitled.car -------- ( Build trigger: "c:\base\models\players\test\untitled.glm" missing ) entering c:\base\models\players\test\untitled.car (90 degree skewing OFF) ( Keeping "motion" bone ) Loading XSI models/players/_humanoid/root.xsi @ 0,101 frames .. (adding new bone - index 0 = model_root Bone 1 ("model_root") exists more than once in this file, bad skeleton! ( Press any Key ... ) Well i guess carcass does consider "model_root" and "motion" as bones I cant export or create from a .XSI, i did it once and now its not working anymore??. Works fine with the humanoid but i get the error message above with the .XSI. "model_root", "mesh root" and "motion" are the bones that are not included in the report. ->numBones: 72 Unique Bone Refs: 69 Default rendered Bone Refs: 69 Link to comment Share on other sites More sharing options...
razorace Posted February 11, 2003 Share Posted February 11, 2003 My mistake. Model_Root is shown as the parent bone in Modview. I was thinking of the animation called "Root". Link to comment Share on other sites More sharing options...
Wudan Posted February 11, 2003 Author Share Posted February 11, 2003 Oh well, I have next week off so I'll give it one really good try. I just wanted to put down how I think it might work so somebody could prove me wrong - the hardest part looks to be the part I thought would be the hardest - making a damn xsi we can play with. Link to comment Share on other sites More sharing options...
razorace Posted February 12, 2003 Share Posted February 12, 2003 yeah, then we can start worrying about animation merging and animation issues. Like the fact that we'll have trouble syncing the start/end points without the original ones to base off of. Link to comment Share on other sites More sharing options...
Wudan Posted February 12, 2003 Author Share Posted February 12, 2003 I see - so you want to be able to revert the GLA and a GLM back to XSI format? That would be cool. Anyway, I've thought of about a ZILLION technical problems that can arise from an improperly made skeletons, which lead to bad GLAs, even if they are 'weighted'. So, I've cheated, so I hope to have something to tell you guys soon. Link to comment Share on other sites More sharing options...
Psyk0Sith Posted February 12, 2003 Share Posted February 12, 2003 I would have something for u, but it seems i cant create a .gla or glm with custom anims anymore. Damn duplicate bone, Invalid skeleton my butt! Last night i noticed the "origin" option in assimilate, i tried to move the model up, doesnt change anything in modview...maybe in-game it will. That would solve my floor problem for scaled models, unless it works only with custom anims? (or doesnt work at all). Link to comment Share on other sites More sharing options...
Wudan Posted February 14, 2003 Author Share Posted February 14, 2003 Ok, kids, it's sharing time again. I've been enlightened a little bit (no thanks to Raven's lack of response) as to the true nature of our problem and the likelyhood that we can dev a program to convert an animation and a mesh file (GLA and GLM) back to XSI, in some semblance of the word. First things first, you ought to know that XSI is just a scripting language, in ASCII format. It is not optimized or anything, and contains full quaternial matrix info - this means that it gets compressed like hell when you use carcass to make it a GLA. It's pretty easy to see how 17k frames of animation turns in to 650 or so megabytes of info. However, first we must use the _humanoid gla to construct an XSI skeleton. I've been looking in to it, and it looks simple enough. Question for ASk, though - when you were decompressing the "BasePoseMat", you had an output of all 12 components of float mat[3][4], even though the decompression function only puts actual floats in 9 of those. For the char, I've been reading it at 52 bytes, assuming the inverse basepose is the same size as the basepose - I've been comparing my data against that found in some of the faulty XSI's and it seems coherent, but it doesn't match your data at all ... rhand: after the decompress: printf("%f, %f, %f\n", mat[0][0], mat[0][1], mat[0][2]); printf("%f, %f, %f\n", mat[1][0], mat[1][1], mat[1][2]); printf("%f, %f, %f\n", mat[2][0], mat[2][1], mat[2][2]); outputs the following: -1.000061, -0.690136, 0.490234 -0.033785, 0.492309, -0.831594 0.481597, -0.976927, 0.512482 Let me know what you think about it. Link to comment Share on other sites More sharing options...
CortoCG Posted February 14, 2003 Share Posted February 14, 2003 Hi, sorry for my absence in this matter. And let me tell you I won't resume my modelling/animating tasks until March, cause I have my brain fried with it =). Here's just a thought of mine about this 72 bones skeleton animation chanllenge: the main problem was the hierarchy if I remember well (If i'm wrong ignore this nonsense from now on). I think all anims. in JK2 were motion captured so the bones' rotation/position/scaling info is absolute and not parent relative, like the ones you produce when you hand animate things. That's why _humanoid.gla's bone hierarchy makes no sense at all but the bones still do what they are meant to. I already made a 72 bone skeletal animation even with the "face" bone (missing in the .XSI files distributed by raven) but, when I arranged the bone's hierarchy to match those of the _humanoid.gla's, the bones started spining around not following the parents I used when I first animated them =(. The real challenge should be making all the bone's animation info absoulte and independant of it's parents. So when you re-hierarchise them, they wont spread away like flies. This is just a thought, I could be wrong by far. Link to comment Share on other sites More sharing options...
razorace Posted February 15, 2003 Share Posted February 15, 2003 Here's a thought, is the SOF2 skeleton the same as the JK2 skeleton? If so, we could try using the SOF2 .gla for testing the merger program. Plus, there's probably some usable animations in the .gla file. Link to comment Share on other sites More sharing options...
Psyk0Sith Posted February 15, 2003 Share Posted February 15, 2003 Even if im not directly related to GLA merging/coding...i think razorace's got an excellent idea...let's hope the skeleton structure is as close as possible in SOF2. I could at some point make a Kaminoan model so i'd like to know if it's doomed from the start!. Link to comment Share on other sites More sharing options...
Wudan Posted February 15, 2003 Author Share Posted February 15, 2003 If I recall, it is not exactly similar to SOF2, but I am aware now that at least some people in the SOF2 community are aware of our pioneering efforts here. I guess we got the GLA format while SOF2 didn't ... Converting some animations isn't 100% out of the question - but it would be hard for me to do without knowing more. Link to comment Share on other sites More sharing options...
razorace Posted February 15, 2003 Share Posted February 15, 2003 So it's not even in the .gla format? Link to comment Share on other sites More sharing options...
Wudan Posted February 15, 2003 Author Share Posted February 15, 2003 No, it's in GLA. Our SDK had the info we needed, I don't think either of their SDK releases had anything about GLA format. Link to comment Share on other sites More sharing options...
razorace Posted February 16, 2003 Share Posted February 16, 2003 What about the SOF2 bone structure then? Link to comment Share on other sites More sharing options...
ASk Posted February 16, 2003 Share Posted February 16, 2003 void MC_UnCompressQuat(float mat[3][4],const unsigned char * comp) { float w,x,y,z,f; float fTx; float fTy; float fTz; float fTwx; float fTwy; float fTwz; float fTxx; float fTxy; float fTxz; float fTyy; float fTyz; float fTzz; const unsigned short *pwIn = (unsigned short *) comp; w = *pwIn++; w/=16383.0f; w-=2.0f; x = *pwIn++; x/=16383.0f; x-=2.0f; y = *pwIn++; y/=16383.0f; y-=2.0f; z = *pwIn++; z/=16383.0f; z-=2.0f; fTx = 2.0f*x; fTy = 2.0f*y; fTz = 2.0f*z; fTwx = fTx*w; fTwy = fTy*w; fTwz = fTz*w; fTxx = fTx*x; fTxy = fTy*x; fTxz = fTz*x; fTyy = fTy*y; fTyz = fTz*y; fTzz = fTz*z; // rot... // [b]mat[0][0][/b] = 1.0f-(fTyy+fTzz); [b]mat[0][1[/b]] = fTxy-fTwz; [b]mat[0][2][/b] = fTxz+fTwy; [b]mat[1][0][/b] = fTxy+fTwz; [b]mat[1][1][/b] = 1.0f-(fTxx+fTzz); [b]mat[1][2][/b] = fTyz-fTwx; [b]mat[2][0][/b] = fTxz-fTwy; [b]mat[2][1][/b] = fTyz+fTwx; [b]mat[2][2][/b] = 1.0f-(fTxx+fTyy); // xlat... // f = *pwIn++; f/=64; f-=512; [b]mat[0][3][/b] = f; f = *pwIn++; f/=64; f-=512; [b]mat[1][3][/b] = f; f = *pwIn++; f/=64; f-=512; [b]mat[2][3][/b] = f; } 12 in all Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.