PDA

View Full Version : The GLA Challenge


Wudan
02-10-2003, 01:27 PM
New WIP theory about GLA merging is up at The Dark Side Compendium (http://users.sisna.com/tokyopop/) 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.

ASk
02-10-2003, 01:33 PM
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 :)

Wudan
02-10-2003, 07:28 PM
Looks like it's up to me ... ASk, what do the bones need to be weighted - do they all need *some* weight?

Psyk0Sith
02-10-2003, 07:32 PM
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).

ASk
02-11-2003, 01:17 AM
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 :/

Psyk0Sith
02-11-2003, 03:48 AM
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???

Wudan
02-11-2003, 11:10 AM
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.

Psyk0Sith
02-11-2003, 02:57 PM
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...

Wudan
02-11-2003, 05:42 PM
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.

razorace
02-11-2003, 05:55 PM
I don't think Model_root is a bone. It's shown as an animation in Modview.

Psyk0Sith
02-11-2003, 06:10 PM
-------- 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

razorace
02-11-2003, 06:32 PM
My mistake. Model_Root is shown as the parent bone in Modview. I was thinking of the animation called "Root".

Wudan
02-11-2003, 07:18 PM
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.

razorace
02-11-2003, 09:35 PM
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.

Wudan
02-12-2003, 11:32 AM
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.

Psyk0Sith
02-12-2003, 03:47 PM
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).

Wudan
02-14-2003, 04:42 AM
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.

CortoCG
02-14-2003, 11:52 AM
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.

razorace
02-15-2003, 01:46 AM
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.

Psyk0Sith
02-15-2003, 03:13 AM
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!.

Wudan
02-15-2003, 10:21 AM
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.

razorace
02-15-2003, 05:09 PM
So it's not even in the .gla format?

Wudan
02-15-2003, 06:03 PM
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.

razorace
02-15-2003, 08:48 PM
What about the SOF2 bone structure then?

ASk
02-16-2003, 01:18 AM
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...
//
mat[0][0] = 1.0f-(fTyy+fTzz);
mat[0][1] = fTxy-fTwz;
mat[0][2] = fTxz+fTwy;
mat[1][0] = fTxy+fTwz;
mat[1][1] = 1.0f-(fTxx+fTzz);
mat[1][2] = fTyz-fTwx;
mat[2][0] = fTxz-fTwy;
mat[2][1] = fTyz+fTwx;
mat[2][2] = 1.0f-(fTxx+fTyy);

// xlat...
//
f = *pwIn++;
f/=64;
f-=512;
mat[0][3] = f;

f = *pwIn++;
f/=64;
f-=512;
mat[1][3] = f;

f = *pwIn++;
f/=64;
f-=512;
mat[2][3] = f;
}


12 in all

Wudan
02-16-2003, 10:18 AM
Only the Bone Pool at EOF are compressed Quaternials, as far as I'm aware. The 104 byte chunks of basepose and inverted basepose in the skeleton definitions mimic the XSI format in some ways, first skeletal declaration, then frame declaration.

In the XSI, the basepose declaration has 3 rows of 3 numbers each, but I'll need to look in to this matter further to be sure.

Basically, I want to get enough data on our 72 bones that I can build an XSI skeleton that looks exactly like the one that was used to build the GLA.

Wudan
02-16-2003, 01:47 PM
Where's dat Corto at? Holler back, Corto, post your XSI that you used to make that new GLM and GLA so I can see what an XSI animation looks like. I think I might almost have maybe thought of kind of something to possibly solve our kind of problem.

We will solve this thing - THIS WEEK.

Psyk0Sith
02-16-2003, 03:49 PM
I just remembered that carcass writes a very detailed log file for the bones...with parent/child clearly listed. Dunno if you still need this or had it already:

http://www3.sympatico.ca/psykopat/tools/thing.txt

Could be useful. Go wudan! :)

Emon
02-18-2003, 09:23 PM
I submitted some feature requests for models to GtkRadiant's BugZilla, and Monroe posted some potentially valuable information about the GLA/GLM format (never looked into it myself, so I don't know how useful it is).

Here:
http://zerowing.idsoftware.com/bugzilla/show_bug.cgi?id=761

Wudan
02-19-2003, 01:11 PM
Yes we are aware of the format. That's how the GLM to Milkshape converter came about, though I didn't really understand the relevance at the time.

Now, it seems, we are bumbling around in the dark - this has been frustrating.

Emon
02-21-2003, 11:08 PM
If Monroe isn't responding to e-mails, try Mike Gummelt. mgummelt@ravensoft.com, or however that name format works.

BoBo_Fett
03-02-2003, 12:44 PM
I wrote a program Im calling GLA Convertor. So far, all it does is it reads a .gla file and sends the basepose Skeleton to 3ds Max. Im posting a link to download the extracted skeleton in Max and dotXSI format here:

Skeleton (http://jedidreams.codealliance.ca/downloads/jo/gla_basepos1.zip)

If people find the skeleton is ok, I'll continue working to extract all the animation frames.

BoBo Fett
http://jedidreams.codealliance.ca/

Wudan
03-02-2003, 05:14 PM
Finally. That looks good, I hope it turns out to be the final peice of this godforsaken puzzle.

Now maybe I can find some peace.

razorace
03-02-2003, 06:24 PM
In your dreams. :) If this works, you'll have to mess with getting the animations to fit into the the current state based animation system.

Me, my problem is that my animator's computer won't run 3ds max. NNNNNOOOOoooo!!!

Psyk0Sith
03-02-2003, 06:29 PM
Max wont run?? is he running win 2k?? i've had a couple problems when i upgraded to win2k, computer would reboot when trying to load max.

Need any help?

Wudan
03-02-2003, 06:34 PM
Somebody help me here... what am I doing trying to mess with the animations?

razorace
03-02-2003, 06:48 PM
Don't look at me. I don't have the program yet.

Psyk0Sith
03-02-2003, 10:22 PM
Razor:
I got very bad results weighting bobo's skeleton...but it did export succesfully, it just looks awful!

Here's what i mean by awful:
http://www3.sympatico.ca/psykopat/tools/shot00.jpg
http://www3.sympatico.ca/psykopat/tools/shot01.jpg

I did a really quick weighting, but there's no way it would look screwed up like that on the regular skeleton. :(

Even when rigging in max, it wasnt too good, i mean the bones did not move like raven's and some bones were not in the right position (compared to the original).

razorace
03-02-2003, 10:28 PM
hmmm...that's not good. looks like the skeleton didn't export from the .gla like it should...weird.

ImmolatedYoda
03-03-2003, 12:21 AM
LMFAO that is the funniest thing ive ever seen psyk0!! ok, now that thats over with, could someone explain briefly and easily what GLA merging is? im just curious.

ASk
03-03-2003, 01:17 AM
This is useless.

And I have been telling you this for the past few weeks.

The hierarchy stored in GLA file is not suitable for proper animation. It's suitable for motion capture, because all the bones are moving together. So when you have 12 bones connected to the pelvis, you do not have the problem of them rotating around freely during motion capture.

We already tried creating a skeleton, using the bone dump from my merger and 3dsm. The result? Freely rotating bones and no option to animate at this state.

From several reasons, the original XSI skeleton does not have these problems. However my 2 emails were unanswered.

GlaMerge (http://www.darklordsofsith.com/ask/glamerge.zip)

GlaMerge source code (http://www.darklordsofsith.com/ask/glamerge_src.zip)

razorace
03-03-2003, 01:17 AM
New....animations....GOOD!

Fire.....BAD!

That's my brief summary. :D

Seriously, the idea of .gla merging is an attempt at making it so we can add new animations to the game.

Drico
03-03-2003, 08:42 AM
That scripting languge.... What did you say it was agian? It looks like something I used to program in good ol C! Printf, void, float those are familliar. Wow cool to werid.

BoBo_Fett
03-03-2003, 10:07 AM
I thought the hierarchy in the root.XSI raven supplied is ok
and they just ran carcass in Hierarchy-flatten mode.

The skeketons I have up for download here, have the same hierachy as Ravens root.xsi

Wudan
03-03-2003, 12:19 PM
Originally posted by ASk
This is useless.

And I have been telling you this for the past few weeks.

The hierarchy stored in GLA file is not suitable for proper animation. It's suitable for motion capture, because all the bones are moving together. So when you have 12 bones connected to the pelvis, you do not have the problem of them rotating around freely during motion capture.

We already tried creating a skeleton, using the bone dump from my merger and 3dsm. The result? Freely rotating bones and no option to animate at this state.

From several reasons, the original XSI skeleton does not have these problems. However my 2 emails were unanswered.

GlaMerge (http://www.darklordsofsith.com/ask/glamerge.zip)

GlaMerge source code (http://www.darklordsofsith.com/ask/glamerge_src.zip)

Ah - the source code I was looking to ask you for. Gracias!

Now then, on to something else! The _humanoid.gla has beaten us soundly! I think it is probably because we are ignoring key peices to the puzzle, but I am tired of speculating!

Psyk0Sith
03-03-2003, 03:19 PM
Originally posted by BoBo_Fett
I thought the hierarchy in the root.XSI raven supplied is ok
and they just ran carcass in Hierarchy-flatten mode.

The skeketons I have up for download here, have the same hierachy as Ravens root.xsi

The hierarchy is fine, it's just that the bones object used in max dont seem to act the same way as the ones provided by raven.

When you move them around, the mesh moves like jello and some bones are not in the same spot (clavicles and femurs).

Wudan
03-03-2003, 03:49 PM
PsykoSith - I'd like you to teach me to model some stuff sometime soon - I've learned about the format, but learning how oil paint is made doesn't teach you how to paint, if you catch my drift.

I don't feel like we haven't been doing the right thing in trying to make new animations - I'm not a saber enthusiast, but new animations would make for a much grittier and electric mod.

I'm mostly tired of "Emotes" being touted as "new" when they are clear uses of currently existing animations.

We'll see, my friends, how this plot plays away.

Psyk0Sith
03-03-2003, 04:14 PM
You want me to teach you to model? sure! start with this:

http://www.3dtotal.com/ffa/tutorials/max/joanofarc/joanmenu.asp

(Ok i'm not teaching you myself, but that's the best i can do for now ;)).

That's how i learned, i read the original french version, the translation might not be perfect.

Not the best tutorial for Low polygon modelling but the technique is roughly the same. Carefully check the head tutorial.

I cannot promise amazing results right away, you'll have to work on it for a while, unless you have a natural talent like marz!.

Let me know if you need anything else.

P.S.:i think that animators are the key ingredients for custom anims. Sure we'll need to merge anims at some point, but in the end, NEW anims are what we want. Too bad razorace's friend cant run max on his machine. :(

Wudan
03-03-2003, 05:23 PM
Well, the more I learn about how the entire Ghoul2 system is set up, the closer I will be to being able to use this very strong system to my advantage.

So, I've started to learn about the GLM format as well, since I was in the neighborhood.

razorace
03-03-2003, 10:33 PM
P.S.:i think that animators are the key ingredients for custom anims. Sure we'll need to merge anims at some point, but in the end, NEW anims are what we want. Too bad razorace's friend cant run max on his machine. :( [/B]
I agree, it's like trying to mod without knowing how to code. :D Anyway, Ytmh is pissed by this. I'm thinking he might actually upgrade for this. *shock*


Well, the more I learn about how the entire Ghoul2 system is set up, the closer I will be to being able to use this very strong system to my advantage.No kidding. Technically it's powerful enough so you could have 100% on the fly animations if you knew what you were doing.

Drico
03-03-2003, 11:02 PM
I wish I had the chance to learn this stuff. Ohh your so awesome!

Hmm, I guess I'm banned to making skins, maps, and map models.

Sorry for disrailing your thread:jawa

Wudan
03-04-2003, 10:26 AM
Not too worry too much about derailling the thread - it almost feels like the whole concept of new animations has drifted far away from what it was intended to do - like what Corto got me looking for in the first place.

I'm not too shocked that making a humanoid GLA hasn't worked out - I'm certain that it is something we will move past when we devise a new way of thinking of it.

I've got a long list of interviews and blurbs about Ghoul2, it was touted as true skeletal animation, and blah blah blah ... BUT it also mentions that only SOME of the JK2 animations were motion capture, and all of the saber moves were keyed in. ALL of the models and animations were done in XSI.

I don't think you'll be able to make new animations for the humanoid skeleton in Max, as is, because you are looking at a lot of work moving data to and fro, and no guarantees that it will work.

When I was hex editing, and changing those values, everything made some sense. I've spent a lot of time going over and over the _humanoid.gla, and I'm now pretty certain what has to be done.

First things first, I have to do a much better write-up on the GLA format.

razorace
03-04-2003, 11:02 AM
You're correct about stuff being done on the fly. At least the following is done on the fly:

1. Transitions (interploted) from single frame animation to single frame animation (examples: idle positions) It also seems do interplotation into these positions but not out of these animations.

2. Movement leaning

3. Leg/Torso/Head animation merging

4. Head Tracking

It's very powerful. You could probably make everything on the fly if you knew what you were doing.

CortoCG
03-04-2003, 01:42 PM
Hey, I'm back from my two week vacations on the beach. Ready to resume my task as animations advisor =), or sort of. I've been reading all posts and I'm up to date now with the current status of the GLA project.
I'll be joining #JK2coding every night from today as I used to. So, see you all there tonight at 8:00 pm (GMT -3). I wanna catch up some more things to be usefull again.

Wudan
03-04-2003, 04:01 PM
You know, if the Ghoul2 API commands worked, you could program some really cool IK control based stuff...

CortoCG
03-04-2003, 04:36 PM
IK controls are a very powerful and complete way to animate bone systems. When it comes to biological things or creatures I used them a lot, cause they make my life much more easier =).

Now, what's that of Ghoul2 API?

Wudan
03-04-2003, 05:24 PM
API == Application Program Interface, JK2's Ghoul2 commands are mentioned by this name in code ...

G2_API commands listed in g_syscalls.c (http://users.sisna.com/tokyopop/jk2mp/g__syscalls_8c-source.html#l00812)
G2_API commands listed in cg_syscalls.c (http://users.sisna.com/tokyopop/jk2mp/cg__syscalls_8c-source.html#l00635)

Technically, if they worked, or one knew how to use them, you could specifiy springiness and mesh out some qboolean and CG_Trace magick to make custom IK-ish performance by the player models ... very very spiffy, but the trap_G2 commands don't seem to work very well.

razorace
03-04-2003, 06:21 PM
*raise hand* I know! I know! Well, at least partly. :D I know about bone setting, bolt setting, finding origin/orientation data, and surface toggling. Hell, I just fixed a minor animation bug with the roll animations.

While you've been hammering away at the .gla formats, I've been slowly but surely decripting the system as I go.

When you say "IK", do you mean the Icurus system? Bah! Recreating something like Icurus in MP would take forever and not be very useful.

Wudan
03-04-2003, 06:23 PM
IK == Inverse Kinematics (http://freespace.virgin.net/hugo.elias/models/m_ik.htm)

Using some creative algorythms, you'd be able to abuse the G2_setangle type commands for a hacked IK control system.

razorace
03-04-2003, 06:30 PM
oh, that's already in there. The primary bone setting functions use angles off the parent bone. Basically, the game moves bottom to top each frame adjusting the bones from the defualt animation angles to what you want.

No need to redo work that's already been done. :D

Come onto #jk2coding you bums.

razorace
03-04-2003, 06:34 PM
You're probably looking a little deep into the ghoul2 stuff. You gotta be able to pull out and see the higher level functions too. :)

Emon
03-04-2003, 09:49 PM
Would it be possible to make new animations for the existing skelaton in the XSI files we have, export it to some new model and skelaton, and just use them for cutscenes, play the anims in ICARUS?

razorace
03-05-2003, 12:58 AM
Yes, I think so. That's sort of unrelated to the current focus of research.

Talk to Corto for details; he's the one who has messed with the Icarus stuff.

Wudan
03-05-2003, 10:36 AM
You *might* be able to do that. You'd have to make a separate model that looks exactly the same as your in-game model, if you wanted to have that character have new animations, because the animation file a character uses is in the model file, but it could be possible.

Emon
03-06-2003, 07:04 AM
That's no problem, wudan.

Wudan
03-08-2003, 12:20 PM
As ASk says, 'this is useless.' - as in, trying to dump the GLA to XSI is useless.

At least, I don't have any vested interest in dumping the GLA to XSI, because I don't know how to use XSI, or the formatting, etc.

However, because I understand what the various parts of the GLA (except for the first skeleton array - if BoBo_Fett would enlighten me as to how the basepose for the skeleton is calculated, I think I pretty much understand the rest.

So, a good programmer could probably whip up a way of showing the skeleton, with each 'joint' as little dots, with hierarchy and everything drawn correctly within a week. He might have some little slider bars to adjust the skeleton's angles and positions within 2. Some shiny features, et cetera, we'd be looking at new (non-borked) animations within a month or two. Very optimistic outlook.

However, I will not be able to write such a program so quickly. I'm going to school, I work, and I try to keep my wife and kid in line, which takes up a lot of my time.

So, if someone is interested in such a project, let me know, I can try to help you in any way possible.

I'll be revising and re-writing my un-official GLA documentation, since I've yet to formally write everything I know down.

razorace
03-08-2003, 04:18 PM
You'd have to be a badass coder to have a working/bug free app working in a month or two. Model rendering is complicated.

Wudan
03-08-2003, 05:58 PM
mdxm (.glm) format is based on MD3. There are tons of free MD3 loaders out there.

Plus, we don't really need to render the .glm, just lines and dots for joints and bones. Little knobs to rotate this and that and move this and that. Very simple. Very powerful.

Wudan
03-08-2003, 06:06 PM
I do agree that it will not be a 'peice of cake' though - i've been tinkering with it, but I do know that I'm getting closer with every byte I change.

Wudan
03-11-2003, 11:40 PM
Frame ( 0): 0x 3300
QuatIndex( 1) Address: 0x39255e
Quat: fd bf fe 7f fe 7f fe 7f 0 80 0 80 0 7a
W: 1.000000
X: 0.000000
Y: 0.000000
Z: 0.000000
XLAT: 0.000000
YLAT: 0.000000
ZLAT: -24.000000


I wrote a little program to show the values held in the 14 bytes. Next Step - more functionality!

razorace
03-12-2003, 12:24 AM
In Quat form?! EVIL!

Wudan
03-12-2003, 11:29 AM
Yes. Quaternion Form.

You'll notice that Raven's Code also includes 'xlat', which used to be thought was 6 bytes. I've interpretted it as 3 separate 2 byte sections(xlat, ylat, zlat), each of them 'lateral joint position changes from the basepose', which means when I reversed the positioning and told quat index 0 (which is like 1, only the zlat is 0 instead of -24, -24 puts the feet on the ground, btw) to have a +20 zlat, i got the expected Mr Fantastic effect, all the bones refering to quat index 0 stretched upwards about 20 units or so.

Unilaterally, the Quaternion is a better way to describe Rotations which contain more than one angular velocity. Most of this is heavy flashbacks to high-school physics, but I'm taking my time and learning all about it.

When I'm done with JK2 coding (which I might be, once I have put the last nail in this coffin), I'd like to go to Tenebrae 2 and make it Quaternion based (if Charles H hasn't done this already) - it's what makes games like Unreal2 so dynamic. If you think about it, the players viewpoint in Quake3 only ever rotates on 2 axii, when it should be able to rotate on 3. Doom3/Quake4 will have Quaternions, no doubt.

razorace
03-12-2003, 03:57 PM
I'm pretty sure the Q3 viewpoint works on 3 axii unless JK2 is TOTALLY different. (YAW, PITCH, ROLL) It's just in Eular's format.

Wudan
03-12-2003, 04:33 PM
JK2 is the same as Quake3, euler (yay!), but it can be hard to visualize what I'm talking about. Basically, stick out your right hand. Make your index finger point forward, your middle finger point left and your thumb stick up. Your pointer finger is the Y Axis. While rotations occur on the X (look up and down) and Z (look left and right) axii, they don't on the Y axis (tilt head from left to right). I think they could, but that's not what I'm after. I'm close to busting the Quaternion, I can see the values, I can change the values, now I just have to measure the behavior, document and test it.

Then we'll go from there.

razorace
03-12-2003, 05:09 PM
No, there's roll (Y axis) rotation. It's used for when the cam shakes, and stuff. True View uses it a lot. The only problem with the Eular system is that it's a pain in the butt to mess with.

Wudan
03-12-2003, 05:41 PM
Cool. Then Quats should be able to fix that up ...

razorace
03-12-2003, 09:45 PM
Converting the system to Quats would be slightly useful but I don't think it's worth the effort if you're not creating a new engine.

Wudan
03-14-2003, 11:51 AM
On the contrary, I'd say - it allows for the 'on-the-fly' rotations necessary to a realistic 3-d environment.

Wudan
03-14-2003, 01:18 PM
New Feature to my little unnamed program - now it 'rips' the "Quat" info for a given frame and writes it to a file, essentially un-optimizing it, so now you can edit per bone. When you've altered your frame, you can use ASk's program to merge it back in, and it'll be re-optimized.

Now to make it so you can actually edit the frame :)

razorace
03-14-2003, 06:45 PM
You can do 'on-the-fly' rotations with the Eular's system. It's just more complicated and has a slight problem with uhhh...equilivent rotational sets. (IE multiple sets of data can represent the same thing.)

Sounds like you're making good progress on the program. I'm busy working on a way to make weapons fully hitable. The current problem is that you need a normal trace for the ghoul2 trace to work and the player bounding box doesn't extend all the way around the weapon. And, yes, I've already coded in linking all the weapons to the ghoul2 model (they aren't normally). I got an idea on how to fix the issue with a linked entity for the weapons (like the saber) but I haven't implimented it.

Wudan
03-16-2003, 10:17 AM
Eular == Bad

Quaternions == Math of the Gods.

At least, that's what I've learned so far. All anybody has said really, is that the Quaternion is really complex and it's really good for your 3d engine.

There's other technical stuff and math, and long lists of equations. Basically, because we don't live in the world of the 19th century, and we have a better understanding of General Relativity, it turns out all the Geometry they taught us in High School was just Planar BS, that doesn't apply to real space, and real time.

Apparently, if you try to fly a plane on a Eular System, you might as well jump off a bridge, because you'll get to your destination a whole lot quicker. (Although I distinctly remember hearing something about planes using Bernoli's curve to stay afloat, and not 3d mathematics...)

Of course, I'm mostly joking, but only because I grow weary of the quaternion. It haunts my dreams.

razorace
03-16-2003, 11:51 AM
bah, classic physics is backed from with tons of solid evidence. All this fancy quantuam physics crap isn't proveable and not to be trusted.

You gotta go with what works, not what's the newest child on the block.

Anyway, I understand Eular's. I don't understand this Quaternions stuff. Q3 already uses Quaternions. Unless there's a uber benifit to converting, I wouldn't go to the effort unless you're doing a total rewrite anyway.

Wudan
03-16-2003, 04:35 PM
Ok, so we drifted off topic.

I'm talking about ANIMATIONS. They use Quats (actually, they use an different kind of struct, made up of one vec3_t and one vec4_t, for the quat and the xlat

Wudan
03-16-2003, 04:36 PM
And no, as it turns out, your 'classic' physics is garbage.

Didn't you study Relativity?

razorace
03-16-2003, 07:10 PM
Bah, all that fancy realitivity/quantum physics are only for extreme situations. If I'm only worried about real world appliable physics, classic will get 99% of the job done.

Wudan
03-17-2003, 06:19 PM
Lol. "Classic" ...

Back to animations.

Commodus
04-05-2003, 11:42 AM
Originally posted by razorace
You'd have to be a badass coder to have a working/bug free app working in a month or two. Model rendering is complicated.

glBegin(GL_POINTS);
glVertex3f(0, 1, 2);
glEnd();

If I'm not mistaken... that draws a a point at (0, 1, 2). When you do glBegin and glEnd, it parses the list of vertices in between and then depending on the mode in glBegin() (I used GL_POINTS, but you could have GL_TRIANGLES, GL_QUADS, GL_LINES, etc.) it will draw the appropriate thing (points, quadrilaterals, lines, or plain old triangles).

Look at this (http://www.quakesrc.org/?Page=tutorials&What=./tutorials/engine/gfx/q2mdl.txt) tutorial at QSG. Scroll down to the bit which starts 'While (1) {..." - it shows you how the thingy works.

There's an explanation of GL stuff at http://www.cs.tulane.edu/www/graphics/doc/OpenGL-Man-Pages/ .