Jump to content

Jedi Academy turned 20 this year! We celebrated in a ton of different ways: mod contest, server event, podcast, etc. Thank you to all who have been a part of this game for the last two decades. Check out the anniversary content!

Read more

Welcome to JKHub

This community is dedicated to the games Star Wars: Jedi Outcast (2002) and Jedi Academy (2003). We host over 3,000 mods created by passionate fans around the world, and thousands of threads of people showcasing their works in progress and asking for assistance. From mods to art to troubleshooting help, we probably have it. If we don't, request or contribute!

Get started

This game turned 20 years old this year, and it is still one of the greatest Star Wars games of all time. If you're new or returning from a long hiatus, here are the basics of getting started with Star Wars Jedi Knight Jedi Academy in 2023.

Read more

3ds Max GLM Tutorial for Jedi Academy - Characters, Creatures, Vehicles, Sabers and Weapons


Milamber

3ds Max GLM Tutorial

Characters, Creatures, Vehicles, Sabers and Weapons

 

This is a tutorial that covers how to use the GLM plugins made by Scooper for creating/editing GLM models for Jedi Academy. As an example I will be showing the process of EDITING existing models. But there's not a big difference in creating them from scratch.

Disclaimer:
This is not a modeling tutorial, that's something I might make later if people want it, but currently there are tons of tutorials on how to model in 3ds Max out there, so here I'm only focusing on the import and export process.

Chapter 1 - Characters
explains the process of Importing a Kyle model, editing it, and then exporting it in working condition.

Chapter 2 - Creatures and Vehicles
explains the differences when importing, editing and exporting creatures and vehicles.

Chapter 3 - Sabers and Weapons
explains the differences when importing, editing and exporting sabers and weapons.


Tools

Required:

  • Scooper's GLM importer/exporter.
  • 3ds Max (2010-2016).
  • Winrar/Pakscape (or others)

 

Recommended:

  • Modview

 

Chapter 1 - Characters

Importing

To import a character model into 3ds Max you first need to extract it from the assets files. For this tutorial we will be using Kyle as an example.

I recommend you follow my old skinning tutorial http://jkhub.org/tutorials/article/73-skinning-guide-with-team-supportmodviewicons-explained/ and extract kyle so that you have it ready as a new skin, not one that would overwrite kyle. I'll be assuming you have done that and named it wizard_kyle.

Now, once you have the wizard_kyle folder extracted somewhere and done the required edits, you will find the model.glm file located inside. This is the kyle model we want to edit. I suggest renaming it to kyle_model.glm and moving it to a location you want to use for importing .glm files to 3ds max later. This is just so that if you later have a lot of .glm files ready for import you won't be confused as to what is what. I will be assuming you moved it to a different folder and named it kyle_model.glm.

Df3xyKh.png




Once you have done that, you'll also need to extract the _humanoid.gla file from the _humanoid folder located in the assets1.pk3 models/players/ directory. I recommend moving it to the same folder as the kyle_model.glm

SleafYm.png

Once you have these two you're ready to open 3ds Max (remember to install the GLM Importer and Exporter before opening 3ds Max).

qMQ9nZS.png

In 3ds Max you want to go to file->import then select GLM (*.GLM) type from the 'Files of type' dropdown, and then navigate to the folder where you extracted the kyle_model.glm. Select the glm and click Open.

e5sJZ2Q.png

Once you have done this another dialogue will open asking you to locate the .gla file. Again navigate to your folder where you have extracted it, select the _humanoid.gla and click Open.

zv11Ngz.png

The plugin will ask you if you want to import LODs. The GLM Exporter doesn't currently support LODs, so there's no need to import them, click No here to only import the highest detail level.

CjTtdm0.png

This will then give you the kyle character fully imported into 3ds Max with the skeleton and the model already skinned(attached) to the bones. Now the model is ready for whatever edits we'd want to make to it.

This is also the point in the process we could start making a character model from scratch, all you'd have to do is delete all the model pieces, leaving all the bones and tags. The tags are marked with " * " in the hierarchy if you press H in 3ds Max

br9Vi4Q.png

To create a new model from scratch you'd want to delete everything linked to the stupidtriangle_off that isn't marked with a " * ". (don't delete stupidtraingle_off either. It's a required parent in the hierarchy).

IMPORTANT TIP!

 

 When creating a new model from scratch, it's important to get the hierarchy correct because of how dismemberment works in Jedi Academy. If you have, for example, the hand as a child object of the head, and the head gets dismembered, you would see the hand go flying along with the head in game, which wouldn't look very good.

Additionally, it's important to be careful with how you name the dismemberment parts. I have personally experienced problems when not using the proper names such as hips, torso, r_arm, l_arm, r_hand, l_hand, r_leg and l_leg for the parts to be dismembered. But all the other parts can have whatever name you want.



At this point we can start adding or removing stuff from the model. For this tutorial we'll be giving Kyle a wizard's hat.

4WdpHsT.png

Here is a quick wizard's hat I made for this tutorial. It has been added as an attachment to this tutorial if you want to use it.




To make new pieces work without bugs, there's a few things that has to be in order, and some that are recommended be in order.


Required

1. Object Origin
For these characters it's required that all the model pieces be located in the center point of the scene, (0,0,0). I suggest using the " Affect Pivot Only " functionality in 3ds Max to do this without moving your model piece.

0wwqir0.png

I suggest applying an " xForm modifier " afterwards, to make sure that everything is correct when it comes to position, scale and rotation, and then collapsing the modifier stack. (right click, collapse all on the modifier)


2. Correct Hierarchy
All model pieces have to be a part of the hierarchy, or else you'll receive error messages later. With the wizard hat the most sensible place to put it in the hierarchy would be as a child of the head piece.

9keatOh.png


3. Skinned/Weighted
All pieces must be attached to at least 1 bone in the skeleton. This is done by adding a " skin " modifier to the model piece, and then adding the relevant bones to the piece. Since this is a hat, we'll add it to the " cranium " bone.

F6cfjM2.png

You'll probably be interested in adding something that is supposed to deform with the animations, like a cape or a robe. The process is the same for such pieces, except you add more bones to the bones list. Once you have the bones you want it to attach to, you'll start editing the Envelopes, there are tutorials on how to do that easily available on google as well.

Tip:

 

with this GLM Importer it's possible to open exisiting models that have pieces similar to what you are creating and take a look at how they are weighted. It's also possible to just move those pieces over to your own model by saving those pieces, merging them to your current project and re-applying the skin modifiers by using the save and load envelope functions.

Remember to not steal pieces from other content creators without permission if you intend to release it.




Those are the 3 required actions.


Recommended

4. Naming

8eeXkQC.png

you'll have to add your new model piece to the .skin files of the wizard_kyle, (like the model_default.skin file). So it's recommended you change the name of the model piece beyond the default name given to it by 3ds Max. This makes your .skin files much easier to read.


5. Unwrap UVW and Texturing

You should unwrap your model for texturing. This is not required for the export to work, but it's an important step for getting a result that looks remotely decent. Again there are a lot of tutorials on how to do this out there.

This is something I recommend is done before attaching it to the skeleton with the skin modifier.

Once it is unwrapped you can paint your texture in whatever image editing software you've got available to you, give it a name, for example wizardhat_texture.jpg, and then apply it in the .skin file

Au9rZD1.png

And then your wizard_kyle will have a textured hat ingame and in modview.


6. Normals

aHovSTT.png

The normals decide how the model will be lighted/shaded by the game engine. There are 2 ways of taking control of which the Exporter supports.

  • Is to use the Edit Normals modifier (again this is something you can google for).
  • Is to use the Smoothing Groups (google) while creating the model piece.

You only have to do this for the new pieces you add, since the Importer manages to import the glm with proper normals already. You can fix bad edges on the imported model as well though if there are any.



Once this is done, your model is ready for export.




Export

To export, go to file->export and choose GLM (*.GLM) from the dropdown like before.

JFOq80G.png

the game requires the .glm files to be named model to work, so name it model. Clicking save will bring up the next dialogue

Sl6gd3F.png

The first line asks you to find the _humanoid.gla file. Click browse and find the one you used for importing the model at the start of the tutorial.

The second line tells the model where it will locate it's .gla file. The default models/players/_humanoid/_humanoid.gla that is already written there is correct and you can click export. The only times you want to write something different there is for models that don't use the normal player animations, or you're exporting a weapon, see Chapter 2 and 3 for that.

Once you've clicked export you will find the model.GLM saved to the directory you chose. Add the model.GLM you exported to your wizard_kyle, replacing the default one that's left there (unless it's already gone because you named it kyle_model.glm and moved it). Make sure it's the only .glm file in the folder.

After having modified the .skin files to include the new wizardhat model piece, and added a texture to the folder. You can go ingame and take a look at your result, or open it in modview and see how it looks.

o4wOQN9.png

The skinning tutorial mentioned at the start of the tutorial explains how to view the result in modview.





Chapter 2 - Creatures and Vehicles

For this second chapter I'll be addressing the differences when it comes to using the Importer/Exporter with creatures and vehicles.

Disclaimer: This does not cover the process of making fully working npcs or fully working vehicles. I'll make full tutorials on that if I get a lot of requests for it, this just shows how to import and export new glm's ready for being used in completely new creatures/vehicles.

Import

The difference with creatures/vehicles and character models is mainly which skeleton and animations they use. Unlike with characters, their .gla files are not located in the _humanoid folder.


Using the wampa as an example, you'll find that the wampa's files are located in the assets1.pk3 file under the models/players/wampa directory. Inside this folder there's also a wampa.gla file besides the model.glm which we are going to import. These are the files you want to use when importing a creature or a vehicle. So instead of using the _humanoid.gla from the models/players/_humanoid directory, we want to select the wampa.gla when importing the model.glm for the wampa when prompted by the importer plugin.

OWfmnaN.png

You'll again be asked if you want to import LODs, but like before, we just want to click no here.

Once you've reached this far the process is pretty much identical to the character models.

Gigp2V8.png

From the left:

  • Make sure the added piece is added into the hierarchy logically
  • make sure the center point of the added piece is in (0,0,0)
  • give it a name and add the skin modifier attaching it to the cranium bone.

 

So pretty straight forward, the same as with the character.


Export

When exporting you want to do the same as with the characters, you export it as model.glm, but when prompted to find the ghoul2 anim file, you select the wampa.gla instead.

jjkkp60.png

Also now the " Gla folder path " needs to be changed. This path becomes important because this is how the model.glm for the new wampa finds the .gla file it uses.

Since we're not modifying the wampa animations we can point it towards the wampa.gla located in the wampa folder and it should work just fine.

Click export and your new wizard hat wampa model.glm is ready.

nTmHkVS.png

For vehicles the main difference is that they don't have an extensive skeleton. For example with the Tie-fighter there's only one bone called ship which you'd weight the hat to, and the gla is tie_fighter.gla

YFOhjGG.png


Feel free to PM me if you have any additional questions about creatures and vehicles.



Chapter 3 - Sabers and Weapons

For sabers and weapons you don't have to worry about any .gla's at all since they don't use any. You can locate sabers and weapons in the assets1.pk3 file under the models/weapons2/ directory.

Disclaimer: This does not cover the process of making fully working new sabers or fully working new weapons. I'll make full tutorials on that if I get a lot of requests for it, this just shows how to import and export new glm's ready for being used in completely new sabers/weapons, Also please note that first person view of weapons are md3 files, not glm files and therefore not supported by this tutorial or the plugins made by Scooper.

New weapons aren't supported by basejka and the support would have to be modded into your game. I don't know if OpenJK has made this possible or not. But you can modify existing ones with this easily.


Import

When importing a saber/weapon you select the .glm file, note that with sabers these names are no longer required to be called model.glm, the ext_data/sabers folder in assets1.pk3 contains the .sab files that are used for creating new sabers, and using notepad you can see how you can name your saber .glm pretty much whatever you want.

When importing the saber or weapon click cancel when asked for a .gla file, and you'll again be prompted about LODs, as before you want to click no.

9k6SjHx.png

Here is where some of the major differences from characters, creatures and vehicles come into view.

Like before you want to 1. give the model piece a name, and add it to the hierarchy. You don't need to worry about a skin modifier anymore, but you need to have the model piece at (0,0,0) still.

If you use the eyedrop tool 2. on the Material Editor (shortcut M) and click the imported model pieces, you'll see that they have materials applied. The texture paths for sabers and weapons in Jedi Academy are stored directly inside the .glm files, and the Importer makes this accessible by applying those paths as materials to the model pieces. on 3. you can see the name of the material, this is the texture path of the model piece this texture is applied to.

This means that if you want to give the handle in this image a new path to a new texture, you need to change the path name to your new intended texture location. for me in this tutorial that's here: " models/weapons2/wiz_saber/saber.tga ". Originally the kyle saber would say " models/weapons2/saber/saber.tga " when you import it and use the eyedrop tool.

When applying new pieces to a saber, you also need to give it a material with a proper name so that the exporter can apply the texture path. so if you have multiple textures for different model pieces, apply them as separate materials to the model.

My top left material is named " models/weapons2/wiz_saber/wizardhat_texture " and is applied to the hat, while the 2nd material is the one previously mentioned and applied to the 2 default kyle saber pieces.


Once all the pieces have been given a material, and are correctly placed in the hierarchy etc. We're ready to export.


Export

When exporting we'll name the .glm whatever we want, and when the exporter dialogue shows up

9tNpy78.png

We want to clear the path for the Anim file, since there is no .gla used for sabers and weapons. and in the gla folder path we write *default. Click export and the saber or weapon is ready to be used.

4fI1w4n.png


Feel free to PM if you have any questions about exporting sabers or weapons.




I hope you have enjoyed this tutorial and that it has been helpful, and thank you Scooper for making these plugins.


User Feedback

Recommended Comments

Thanks for the helpful tutorial. I frequently have the problem of models not displaying a blade on their lightsaber when I load them in game. I know this has something to do with assigning left hand and right hand but I'm not really sure where to go to do this. Sorry for the noob question, but if you have any advice that would be great.

Link to comment
10 hours ago, Kiindaal said:

Thanks for the helpful tutorial. I frequently have the problem of models not displaying a blade on their lightsaber when I load them in game. I know this has something to do with assigning left hand and right hand but I'm not really sure where to go to do this. Sorry for the noob question, but if you have any advice that would be great.

Make sure the *r_hand and *l_hand tags exist and are in the correct positions.

Link to comment

Thanks for the super helpful guide! I have a much better understanding of how to work with lightsabers in 3ds max. I was just curious if you knew how to export a saber as a .3ds file? This is probably super basic, but it's my first foray into modding and I'm trying to convert a saber hilt mod from JKA to KOTOR. Thanks!

Link to comment
On 4/8/2020 at 5:54 PM, kane001 said:

Thanks for the super helpful guide! I have a much better understanding of how to work with lightsabers in 3ds max. I was just curious if you knew how to export a saber as a .3ds file? This is probably super basic, but it's my first foray into modding and I'm trying to convert a saber hilt mod from JKA to KOTOR. Thanks!

Simply open 3ds Max and your scene and then do:  File -> Export and choose .3ds as the format

 

Link to comment

Hi I have a question I'm using 3ds Max 2020, when I import the GLM file it imports fine, and the script ask me to import the GLA file too, but once imported I cannot see the animations in the timeline, do you know how should I import the animations please? 

THank you. 

Link to comment
On 7/15/2022 at 12:46 AM, v1k1ng0 said:

Hi I have a question I'm using 3ds Max 2020, when I import the GLM file it imports fine, and the script ask me to import the GLA file too, but once imported I cannot see the animations in the timeline, do you know how should I import the animations please? 

THank you. 

Unfortunately this plugin is only a glm importer/exporter. They neither im- or export animations. The Gla is only needed for the exact bone position and orientation as well as the bone indices I would guess.

Link to comment


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...