Jump to content

Home

I've done custom GLA animations


CortoCG

Recommended Posts

I've made some new animations and compiled them into a GLA file. The problem is I don't yet found out how to tell the engine how to use them. The GLM file knows wich GLA to use though. If someone knows the code section to tell the engine about the new GLA animations I would apprecite the information.

If anyone wants to know something about doing custom GLAs just use this thread, I'll reply all your questions.

 

Thanks.

Link to comment
Share on other sites

  • Replies 123
  • Created
  • Last Reply

This might very well be the first step towards better mods. My question would be.... tutorial? :D

 

Seriously, I'd be dying to learn how you did this but I'd have wayy too many questions. I'm sure a short description of the steps and programs used would be VERY in demand.

 

:)

Link to comment
Share on other sites

Because my hands are full, I'm not planning to write a tutorial. But I'll still asnwer as many questions as you need.

I used 3DS MAX 5 to make the models and animate THE SKELETON, not the mesh. If you weighted the model right it will follow the skeleton all the way

Make a new set of animations using as many frames as you need, just remeber to set the tangents between animation sequences to step. Then export the file to XSI selecting animations.

When you compile with carcass Add directly the XSI file, double click on the upper line and select "Makes it's own skeleton".

Then double click on the lower line to get the options menu. Just hit clear there. At the "File" menu is a "Write Config Data" option, select there the config filename for your new GLA animations file. After compiling you have to edit the .cfg and set the names and properties of all your sequences. If you don't do this, ModView cannot tell the difference between sequences.

At the "File" menu is a "Write Config Data" option, select there the config filename for your new GLA animations file.

Link to comment
Share on other sites

I tried this with 3D max 4.x, but i'm not crazy enough to make 17,000 frames of animations...(ok maybe less for MP, but still).

 

Isnt there a way to make carcass "write" the anims straight into the .glm?, i didnt create a .gla when i tried it and the anims worked in modview anyway.

 

I agree that a .gla would be better, but if it cant be used by the engine it's useless...or maybe replace the original .gla file?

 

Create the dir structure for your _humanoid file,

 

base/_humanoid/

 

zip that up and put it in your gamedata\base folder...i'm pretty sure the engine would use your file, unless there's some kind of code preventing that.

 

So it's basically like replacing a saber hilt, only this time it's the anim file!. I think you should try this and let us know what happens...that's the simplest solution i see for now.

Link to comment
Share on other sites

What I'm, saying is that the engine has no way to know what the heck in on my gla file, it just contains animation, but it doesn't know wich ones are for fighting, wich ones are for walking, and so on.

I assume you're not crazy enough to make 17,000 animation frames. But form single specific models 500 frames should be enough. I´m talking about dianogas and kells here.

Remember that _humanoid.gla has the animation frames for all the model in JO.

Link to comment
Share on other sites

Yeah i know you dont need to make 17k frames...

 

The engine would know if you would replace raven's anims by yours...that's why i said 17,000 frames, but that's a lot of work, well for me it would.

 

If gla files could be edited, we could extract the SP anims and re-use them, and make new anims for MP. I think that only softimage XSI can open the gla file and maybe create compatible anims?.

 

I guess it does not work like Q3?, there was a cfg file for every set of anim cuz the anims were written straight into the md3.

 

After compiling you have to edit the .cfg and set the names and properties of all your sequences. If you don't do this, ModView cannot tell the difference between sequences.

 

Isnt that what the game uses to tell which anims are needed? and to know what the hell is in the .gla file?

 

Sorry if i'm bothering you ;)

Link to comment
Share on other sites

i m sorry but there is no current way to use your gla....

 

the animation code, and especially the gla loading code is not accessible.

 

you can't do anything with your gla :(

 

the only way to use this gla is if you put all the existing anims in it.

(i mean the original jk2 anims)

 

then you can use it...

but since we don't have the raw anims files....

 

:(

Link to comment
Share on other sites

Tooch, he's not talking about for players, he means for things like Kell dragons or Dianogas where there is little animation and has a new skelaton anyways.

 

I think you'd have to set up an animation.cfg to match your GLA or something, then in the code tell it what animations to play at what time.

Link to comment
Share on other sites

I believe that creating a new gla file using the original anim files with new ones is useless because of the way carcass was written.

 

Working with Raven, a friend of mine had been trying to compile his own animations along with the originals into a gla file. Now we found out that animations not used in the release gla file could be compiled which would give you new animations, but I'm afraid that carcass didn't like custom new animations. I think it had something to do with the original scene file which SoftImage used to create the original animation which is now lost.

Link to comment
Share on other sites

There`s no way to put my custom anims into the original GLA, for the simple reason I'm talking about a 500 frames sequence of a non-humanoid skeleton. Completely different from those contained on Raven's GLA.

I'm talking about a real NPC, an animated animal, a Dianoga, If I can't make it thru GLA/GLM format (wich I'm used to), I'll do it with an animated MD3.

But if someone finds out how to teach the engine how to use my new set, pls send me a notification.

Link to comment
Share on other sites

Originally posted by Tchouky

i m sorry but there is no current way to use your gla....

 

the animation code, and especially the gla loading code is not accessible.

 

you can't do anything with your gla :(

 

the only way to use this gla is if you put all the existing anims in it.

(i mean the original jk2 anims)

 

then you can use it...

but since we don't have the raw anims files....

 

:(

 

Can we get confirmation/verification of this? Is there any way to get the engine to use a new .GLA file, or is Corto's work all for nought?

 

I have a vested interest in this discussion. ;)

Link to comment
Share on other sites

I found something on the code that looks like the Loading System for GLMs and GLAs, the engine is coded to load the GLA file from .../_humanoid/ folder and to read the animations.cfg as the default config file.

It checks the GLM is not an ATST, then it checks if it is a normal GLM model.

Then it looks for the GLA and it's CFG file.

If we can write a new routine that tells the engine to look for a Kell/Dianoga whatever, like it does for the ATST, we'll be going to another stage of moding. Remember I'm talking about non-humanoid NPCs models.

Link to comment
Share on other sites

Originally posted by CortoMaltes

I found that on cg_players.c on JK2cgame files. I think this is the start point. We should track up the code from there.

 

OK, I see it now inside CG_RegisterClientModelname() (which, ironically, is the routine Wudan referred me to offline).

 

In that routine, it calls trap_G2API_InitGhoul2Model() and loads the GLM for the ATST. Interesting. Maybe we can create traps for other types ".isDianoga" ".isKellDragon", etc., and load up the appropriate .glm for that model?

 

might be fun to try... :D

Link to comment
Share on other sites

I replaced the atst GLM and GLA with my own and the engine succesfully loaded mine's. So the good news is the engine is prepared to load another set of GLA animations. The bad news is that I don't know if a rutine for a new type of skeleton (like the atst's) can be written into the code.

The idea is to make the engine check the if the client ID corresponds to another Ghoul2 model besides the atst and the humanoids. Then add another non-humanoid, non-atst GLA and animations.cfg.

I believe also that the new GLA sequences must be written in anims.h, animstable.h, so BehavEd knows they exist.

This is still a theory, I need to do more testing before reaching any conclussion.

Link to comment
Share on other sites

I replaced the atst GLM and GLA with my own and the engine succesfully loaded mine's. So the good news is the engine is prepared to load another set of GLA animations. The bad news is that I don't know if a rutine for a new type of skeleton (like the atst's) can be written into the code.

 

This is awesome news, Corto. It's sounding like we just might be able to work this out after all! :D

 

The idea is to make the engine check the if the client ID corresponds to another Ghoul2 model besides the atst and the humanoids. Then add another non-humanoid, non-atst GLA and animations.cfg.

 

I agree, and I think this might be doable....

 

:D

Link to comment
Share on other sites

I found this interesting comment in the ClientCommand() function in g_cmds.c:

 

	//I broke the ATST when I restructured it to use a single global anim set for all client animation.
//You can fix it, but you'll have to implement unique animations (per character) again.

 

...underneath a call to G_PlayerBecomeATST() (found in g_misc.c). Has anyone explored this any further? The MP code checks the .usingATST all over the place.

 

Any ideas on how difficult it would be to reverse the breakage?

Link to comment
Share on other sites

Looks like the wisdom of Raven only reduces to humanoids. Cause the ATST, the Gonk, the Glider, the Howler, the Probe Droid they all have their own GLA file. Some of them are very simple, some of then not. What I found is that not every animation sequence name are listed on the anims.h or animstable.h wich gives me two ideas: either they are already coded into singleplayer's DLL or we can fool around with them a put whatever name we want. Since Icarus can determine wich animation the model will use for ceratain action I propose to use existing animatino sequences names. For ex. to walk we use BOTH_WALK1, but the engine won't look at _humanoid.GLA for it, it will look at the GLA the loaded GLM is needing. So we put in the animations.CFG file that BOTH_WALK1 is the normal walking/moving animation and wich frame range it uses, and the engine will use them.

I also made a new, most simple, skeleton to see if carcass takes it, and guess what... it did. So i'm making a dianoga skeleton now, with eight tentaces and a simple cervical/cranium bone system for the neck and eye.

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.


×
×
  • Create New...