[HOWTO] Skinning

Discussions which are Out of Character.
Post Reply
User avatar
Alehk Thol
Lost One
Posts: 1270
Joined: Thu Mar 01, 2007 2:41 pm
Contact:

[HOWTO] Skinning

Post by Alehk Thol »

Skinning for Star Wars Jedi Knight: Jedi Academy
-
Part One: Pakscape
Image

What is Pakscape?

Pakscape is an incredibly user-friendly tool created by Peter Engstrom which allows users to create, open, modify and save .pk3 files.

What are .pk3 files?

.pk3 is the format which the SW Jedi Knight: Jedi Academy game assets are saved as. Think of them as a simple method of file compression, similar to .zip or .rar files.

The Pakscape Interface:

Image

As you can see, there is absolutely nothing scary here; everything is pretty self-explanatory. Hovering your mouse over each button will give you a description on its functionality as seen in the example above.

Where are my .pk3 files located?

Your .pk3 files are located in your Star Wars Jedi Knight: Jedi Academy game directory.

If you bought and downloaded the game through Steam, you'll find your .pk3 files here:
C:\Program Files (x86)\Steam\SteamApps\common\Jedi Academy\GameData\base

If you bought and installed the game using discs, your .pk3 files are likely to be here:
C:\Program Files (x86)\LucasArts\Star Wars Jedi Knight Jedi Academy\GameData\base

Opening a .pk3:

You can navigate to the above folders through Pakscape by clicking "Open" and then following the list of folders. However, don't you agree that it would be more convenient to simply double-click any .pk3 and have it open in Pakscape automatically? Definitely! Navigate to the "base" folder of whichever directory matches your method of installation, here's how to enable this:
  • Right-click any of the .pk3 files in the "base" folder, "assets1.pk3" for example.
  • Click "Properties"
  • Under the "General" tab is "Open with:", click "Change..."
  • When the new window pops up, click "Browse..."
  • Navigate the folders to wherever you saved Pakscape, then double-click it.
  • Click "Open" and then "OK" Done!
At this point I would encourage you to browse (but not edit or re-save) the assets#.pk3 files in your "base" folder. Just explore the directories. A little hint: All of the files relevant to skinning are in assets1.pk3!
Image
User avatar
Alehk Thol
Lost One
Posts: 1270
Joined: Thu Mar 01, 2007 2:41 pm
Contact:

Re: [HOWTO] Skinning

Post by Alehk Thol »

Skinning for Star Wars Jedi Knight: Jedi Academy
-
Part Two: ModView
Image

What is ModView?

ModView is an incredibly useful tool which allows users to view any of the models present in the game, all of their skins as well as their respective animations. The advantage of this is that you are able to load the model you are skinning quickly and view your changes without having to constantly open and close the game.

Setting up ModView:

ModView insists that it loads from a specific directory. Here, you'll have two choices. You can either create the directory with all of your game assets inside your genuine "base" folder... Or, you create your own "base" folder on your desktop and keep the files you're working on separate. So, create a new folder named "base" on your desktop or navigate to your existing "base" folder in your JK:JA directory. Now, let's get started:
  • In the "base" folder, create a new directory called "models"
  • Open "models" and create another new directory. Call this one "players"
  • Navigate back to "base"
  • Open "assets1.pk3" in Pakscape.
  • In Pakscape/assets1.pk3, right-click and then copy the "shaders" folder into your "base" folder. Keep "assets1.pk3" open in Pakscape.
  • In your base folder, create a new directory named "textures"
  • Open the newly created "textures" folder and create another directory within and name it "common"
  • Return to Pakscape, open the textures/common folder.
  • Copy "caps.jpg" from the .pk3 and paste it into the "textures/common" folder you made.
  • Back in "assets1.pk3" again, open "models/players" and then copy the "_humanoid" folder (it's the first one.)
  • Return to "base" again and open "models/player" then paste "_humanoid"
  • In a similar fashion, return to "assets1.pk3/models/players" and copy the following folders: stormtrooper, kyle, jedi, jedi_hm as well.
Okay, long-winded but we should be good to go! Start ModView. Providing I've not forgotten anything, you should load the programme successfully with no error messages. If you encounter one, the chances are that it will just want you to pinch something else from the assets. If necessary, just keep going until it's appeased.

Viewing a model:

Now then! We have ModView open and we're staring at a lot of buttons. All you have to do, is click the folder icon (or click "File" then "Open".) This will open a new window. Navigate to your "base/models/players/kyle" folder and open the model.glm file.

This is what you should be seeing:

Image
Click to enlarge.

If not, backtrack and re-follow the earlier steps!

Expand "==> model.glm <==" you'll see five additional options. When skinning, you only want to be thinking about two or three of these.

Surfaces: Displays all of the parts of the model, its bones and such as a list. After expanding all of the options, clicking each part will highlight it on the model. By right-clicking and selecting "Set status: OFF" you will turn off that part of the model.

Skins available: Expanding this will display the list of skins the model currently has. In the next tutorial we will add an additional option. Double-click each option to view the model in each skin.

Sequences: Expanding this option will display a list of all of the animations in the _humanoid folder. Double-click each one to preview it. Using the play, pause, next frame (etc) keys, you can view the animations in motion.

Getting a good look at the model:
  • Hold the right mouse button in the grey area and drag the mouse backwards and forwards to zoom in and out on the model.
  • Hold down the "Alt" key and then use the left mouse button in a click and drag fashion to move the model up and down.
  • Simply holding down the left mouse button on its own while moving the mouse will allow you to rotate the model in any direction.
Models & Skins:

If one thing has been made clear to me over the years, it's that the distinction between a model and a skin is unclear to many people. The model.glm file that you opened in ModView earlier, is a model. The model is the physical shape. The skin is whatever is painted on the model.

Often, conversations like this happen:
Innocent Soul: Hi, how're you?
Skinner: ...What do you want? >_>
Innocent Soul: I was hoping you could make me a skin!
Skinner: Sure! Though that depends on what you want and whether it's within my skill range.
Innocent Soul: Well, I was hoping you could give Kyle a hooded jedi cloak.
In this instance, a jedi cloak is not a part of the Kyle model. Adding a jedi cloak onto Kyle involves a different skill, modelling. This is considerably more difficult than skinning, but tutorials do exist if you are willing to learn.

When a model is made, the 3D shape is "unwrapped" and made flat, kind of like this:

Image

These surfaces are then textured. The act of applying the texture detail onto those unwrapped segments is skinning.

I'll explain a little more about this in part three, where we'll actually get around to making a custom skin!
Image
User avatar
Alehk Thol
Lost One
Posts: 1270
Joined: Thu Mar 01, 2007 2:41 pm
Contact:

Re: [HOWTO] Skinning

Post by Alehk Thol »

Skinning for Star Wars Jedi Knight: Jedi Academy
-
Part Three: .skin Files
Image

What are .skin files?

If you look inside "base/models/players/kyle" you'll find the following:

Image
Click to enlarge.

model_blue, model_red, model_default and model_menu are your .skin files.

Open model_default.skin in Notepad. It should look like this:

Image

What we're seeing is a list of all of the model's pieces, then a file directory leading to an image. Notice how there's a few lines from a stormtrooper folder? The "caps" image, is what you see when you chop off a limb in game. Rather than put a caps image in every skin folder, most of the models draw their caps from the stormtrooper. What this shows us, is that skin textures don't necessarily have to be in the same folder as the model.glm and the .skin files.

We're going to make a new skin variant for Kyle by doing this now, this is why we copied over jedi_hm and jedi over along with kyle, we're going to mix their outfits a little.

Making a new skin variant:

Here's the catch, you can only mix skin textures that have a matching texture layout. If you recall, at the end of the last tutorial I mentioned that when a model is made, it is "unwrapped" and laid flat before texture work is applied to it. Well, many of the base Jedi Academy models share identical layouts for their textures, making them inter-compatible. For example, here're some torso textures with matching layouts: chiss, bespin_cop, jedi.

Now, let's get started! Copy and paste the model_default.skin and rename it to model_custom.skin. Open model_custom.skin in Notepad.

Jaden has a really nice pair of boots and I think they'd look better on Kyle. The boots in particular are part of a texture image named pants03, in the jedi_hm folder. Notice how Kyle's legs and this particular set of Jaden's legs have an identical layout as mentioned earlier. Because of this, we know the textures will match up properly on the model and it's safe to mix.

All we're going to do, is edit these two lines:

Image

How do I know which lines to edit? That's simple. ModView!

Image
Click to enlarge.

Change:
"l_leg,models/players/kyle/kyle_legs.tga"
"r_leg,models/players/kyle/kyle_legs.tga"

To:
"l_leg,models/players/jedi_hm/pants03.tga"
"r_leg,models/players/jedi_hm/pants03.tga"

Time to view the difference! Every time you modify or add another .skin file, you'll have to reload ModView. Do so now.

Image
Click to enlarge.

Notice how under "+ Skins available" in ModView there's now a "custom" line? That's your model_custom.skin! You can make as many more as you like, so long as it adheres to the naming convention model_whateveryoulike.skin.

Now, for the next part! We're going to remove Kyle's collar and his shoulder pad. Go back into your model_custom.skin and do the following:

Image

The danger to this is that not all models were designed to have parts that could be taken off, meaning that doing so would leave a very obvious hole in the model!

Now, repeat the earlier process you used to replace Kyle's boots. This time, replace his shirt and trousers (hands too, if you like) with whichever combination takes your fancy from the jedi folder as practise. Here's mine:

Image
Click to enlarge.

Here's a comparison between the original model_default.skin we used as a base, and our edited copy we renamed to model_custom.skin:

Image

Putting it into the game:

Because our skin is not model_default, model_red or model_blue, we won't be able to select it from the menu. In game, we would access the skin by typing into the game console: "/model kyle/custom"

If you made another skin variant, let's say: "model_example.skin", you would type "/model kyle/example" to load your skin. If the skin is not in the menu, an icon isn't necessary. If you want one anyway, simply make a 128x128px image and name it icon_custom.jpg (or, icon_whateveryourskinnameis.jpg for other variants.)

An added note if you're using GIMP: When saving, ensure "Optimize" and "Progressive" are unticked like so, otherwise it won't work in game.

Now, let's put it in game!
  • Open Pakscape, and create a new document.
  • Create a directory named "models"
  • Inside "models" create a directory named "players"
  • Inside "players" create a directory named "kyle"
  • Copy your model_custom.skin (and icon if you made one) into the "kyle" folder.
  • (My example)
  • Save the file with a name of your choosing, ensuring it is saved in .pk3 format.
  • Close Pakscape and move the newly created .pk3 file to your game's base folder.
  • Load the game, open the console and enter "/devmap mp/duel6" or any other map.
  • Open the console when you've spawned into the level and enter "/model kyle/custom"
Done!

Notice we did not include any other files in the pk3 than what we made ourselves. In this example, all of the files this skin uses apart from the ones we made ourselves are a part of the game already. Including them in our pk3 would be a waste of space.

That's it for part three! I hope someone out there has found this useful. :)
Image
User avatar
Alehk Thol
Lost One
Posts: 1270
Joined: Thu Mar 01, 2007 2:41 pm
Contact:

Re: [HOWTO] Skinning

Post by Alehk Thol »

Skinning for Star Wars Jedi Knight: Jedi Academy
-
Part Four: Basic Recolouring (GIMP Edition)
Image

Can you make me some new robes?

Quite often, what people are after are their own Jedi garments in a different colour. I'm going to show you how to do that. I'm assuming that because you're on part four, you already know what you're doing with ModView, .skin files and such. Go ahead and prepare your workspace to the point that you can open the model you want to work on in ModView!

We're going to work on the torso first. Here's what the image I'm starting with looks like:

Image
Click to enlarge.

Now, open GIMP!

Along the left, you'll find your toolbox. I want you to use the Free Select Tool, it looks like this:

Image

What this tool does is allow you to select multiple points around an image. When you click, it leaves marker. When you move your cursor away from the marker, a line follows. Click again and you'll set another point. You can keep doing this until you isolate a particular area that you want to work on.

We're going to work from the inside-out. So that under-tunic (brown in my image) close the centre, is what we're going to draw around with the Free Select Tool, like so: (Note, you can zoom in and out by using the + and - keys.)

ImageClick to enlarge.

Being neat does tend to pay, but if you find it difficult, I'd encourage you to go slightly around the object you want to isolate, because you can always go over with it with an eraser after the recolour.

Now, to make it easier to edit this section again later, we're going to place it on a new layer. To do this, select "Edit", "Paste as" and then "New Layer"

Image
Click to enlarge.

In the layers tab, usually on the right, you'll now see a layer on top of your .jpg. If you double-click the layer name, you can rename it. Here's mine:

Image

Clicking the eye icon of the layer makes it invisible, so you can see the layer underneath. As layers stack up, this tool can be useful. Now, the fun part: Colouring it in!

Make sure that you have the Under Shirt layer selected and not the original image on the bottom. Along the top row, select "Colors" and then "Colorize"

Image

This will bring up the following window:

Image

Moving the slider bars left and right will alter the colour of your selection. Try it! Find a colour that you like. The + icon allows you to save your settings before committing them, so you can easily find them again. If you click the drop-down menu, you'll see the settings you've saved and your history of colourisations.

Every so often, it's good to save. If you save your image as a .xcf, you'll keep your layers intact so you can return to your image and continue editing. It's always a good thing to keep .xcfs of all of your skin images for future editing. Think about it, once you've isolated all of the parts of the torso, you can recolour it again at your leisure in the future!

Repeat the select, paste and recolour process until you're happy. Here's what I did:

Image
Click to enlarge.

Now then, are you happy with what you have? If so, great! If not, keep tinkering. Let's move onto exporting...
Here's the one I made:

Image
Click to enlarge.

That's it for part four! I hope someone out there has found this useful. :)
Image
User avatar
Ragnar Lofgren
Posts: 14
Joined: Thu Jan 07, 2016 6:16 am

Re: [HOWTO] Skinning

Post by Ragnar Lofgren »

These are the kind of guides we need to continue to see, detailed, descriptive and accompanied with pictures!

I may sit down one evening and work my way slowly through this guide.

Image

User avatar
Wrennin Vae
Lost One
Posts: 1300
Joined: Thu Sep 04, 2014 11:03 am
Location: Rannon
Contact:

Re: [HOWTO] Skinning

Post by Wrennin Vae »

Part Five: Creating your own textures
Starring Wren's big fat head

Let’s recap

So! You now know how to use Pakscape, organize your skin files and do a simple recolor of a premade texture. But what if you want something unique for your skin? It’s time to make your own texture!

Isn’t that really difficult?

It’s actually a very simple technique, but it does require three things: time, patience and more time! Creating your own texture requires a lot of fiddling with small details, lining up and testing in Modview, so don’t be discouraged if it feels like you aren’t progressing. Keep at it and you’ll have your very own special skin.

Disclaimer

I am by no means the best skinner, nor will I ever be! Take this advice with a pinch of salt and make it your own. Warning: tutorial contains way too many pictures of obnoxious Togruta head.

Setting up your texture

Where do I start?

The first step to creating your own texture is knowing what you want to achieve. Find a few reference pictures for some inspiration. The result won’t be exactly the same, but it will help you to understand how pieces of clothing sit on the body.

Blocking out the basics

Next, you need to understand your model. Use a stock texture from your skin as a base and block out the basics of what you want to make. Use bright colors to draw the basic layout of your plans, using different colors for left and right sides. The more colors the better! Useful features to block out might be: sleeves, seams, belts and fastenings such as zips.

Image

Click on each image to see it full size.

Once you’re finished blocking out the areas, it might help to take screenshots of your model for your own reference.

Image

Creating the basic texture

Creating the fabric

Now it’s time to start experimenting. Think about what sort of clothing you want to create and search for the appropriate material texture on Google. For a smooth look, search for leather, cotton or even silk images. For a rougher look, try coarse cotton, mesh or canvas. For looser clothing, try draped. Whichever type you end up going for, try to find an image that is white, light gray or cream in color.

Place the image over the entire section, ideally one version on the front of the model and a second layer on the back. Set the layer style to multiply via the drop-down box and play with the opacity for a more or less obvious grain.

Image

Recoloring the fabric

Time to use what you’ve learnt from previous tutorials. Each different colored section of your outfit needs its own layer. Outline with the lasso tool (Free Select Tool in GIMP) and copy from your stock image into a new layer. Recolor using the overlay function.

Image

Whoops, I made a Batman!


Now is the main time to experiment with the look of the outfit. Take extra care to match up the front and back sides of the model, as well as the shoulder and sleeve areas (model permitting).

You can layer up the different types of material and levels of fabric for a more interesting effect.

Image

Here is how it's looking so far:

Image

Adapting the texture to your character

As you're all aware, the vast majority of models have human stock skin textures. Now is a good time to make it look more like you before getting into detailing your outfit, as you might need to adapt what you've currently made to fit your character.

Image

Making your texture realistic

Making your fabric realistic: Shadows 1

Great start so far, but it looks a little bland and square on the model. To make your texture really pop out and give your character some shape, you need to add shadows on top of your fabric. Depending on your character’s gender, species or body build, these shadows will be different locations and intensity. You will need to experiment for your own look, so here is a general guide for a generic human body.

First off, create your shadow. Draw a long, thin rectangular box and fill with a black to transparent gradient. Duplicate this image and flip over, placing the darkest section alongside each other. Add a Multiply effect, drop the opacity and you have yourself a nice shadow.

Using your reference blocks to help you place the shadow in the following locations:

Image
  • Red: Down the spine, between the shoulders.
  • Green: Down the sides of the torso. More often than not this will require three sets of shadows.
  • Orange: Underneath the arms. This is the most difficult to place, for most models.
  • Blue: The lower abdomen. This one will change most depending on your gender/species/body type and will require the most adjustments to get right. As a general rule, females will have a stronger shadow on the lower back compared to the stomach, whilst males are the opposite.
If you are an alien or have other extras such as long hair, add shadows in the appropriate locations, such as under headtails.

Making your fabric realistic: Shadows 2

Looking good, but your outfit needs more depth. Take each level of your outfit and duplicate the layer. Select the layer underneath and overlay with a darker version of the color below. For example, creating a shadow on top of yellow will need to be overlayed with a dark yellow.

Image

Next, create a Gaussian blur. Using the arrow keys, subtly nudge the layer so that you can see a small amount of the shadow blur.

Repeat this technique for all of the different levels of your outfit where a shadow would occur.

Image

Making your fabric realistic: Seams

Now that your outfit is coming together, you need to spruce it up a bit. This is where your reference pictures come back into play. Search for a dotted line (or a fancier version if you’re inclined). Cut the image as close to the seam as possible and multiply the layer.

Image

Cut and copy the seams to follow the edge.

Image

Adding patterns

Looking pretty neat! Now is the time to really make your texture unique with some block patterns.

You can make your own patterns or find one online. I make my own patterns in Adobe Illustrator, but you can use something as simple as Paint, or if you have lots of patience Photoshop or Gimp directly.

Depending on the colors involved, how you place the pattern might change. Black and white patterns are usually fine with a Multiply. Colored patterns on the other hand might require a simple opacity change, or sometimes a Soft or Hard Light.

Image

For extra effect, add a different fabric effect over specifically the pattern. With the pattern layer selected, use the Select tool on anywhere other than the pattern. With that area still selected, swap to the fabric layer and delete. Multiply and reduce opacity to taste.

Image

Finishing up

You're almost done! Now you need to have a good look at your model and tweak these areas: shadows (on top and underneath), seams and patterns.
Here's the final image:

Image

On the model:

Image
Image

Thanks for reading! Hope it helped!

Image

User avatar
Rhuacca
Lost One
Posts: 520
Joined: Tue Jun 07, 2016 12:16 pm
Location: Jedi Temple on Rannon

Re: [HOWTO] Skinning

Post by Rhuacca »

Very helpful and amazing descriptions and explanations, thank you the both of you! Though, I actually would like to know more about Skins which are customizable (Like the Wookiee Jedi Skin pack I am currently using.). About how to turn that Skin Customization Pack into a normal ''sole'' skin. Or otherwise.

Thank you both and everyone else helping me so far in advance!
Name: Rhuacca
Birthday: 340.03 ABY
Initiation: 351.13 ABY
Apprenticed: 352.11 ABY, 372.17 ABY
Knighted: 381.24
Last seen 430.?? - 434.??
Gender: Male
Languages: Shyriiwook, Xaczik and Basic (Understands) Thykarann and Huttese
Former Rank: Jedi Knight
Mentor(s): Jao Ryn, Zechs Demming
Padawan(s):Aranna Vaan, Serbithar Muunen, Minoda Darkrider

Image
Aslyn Denethorn
Lost One
Posts: 2538
Joined: Thu May 08, 2008 12:07 am
Location: One with the Force

Re: [HOWTO] Skinning

Post by Aslyn Denethorn »

Rhuacca,

Most of that is done via editing the .skin files - if you set Wordpad to open those by default, and remember to save as .skin instead of .txt/.rtf, it's really simple. All you need to do is take the images and the .skin file that you want (along with model.glm and any other files - holster, sound.cfg etc) and place them into a new folder, with the format models/players/yourname.

When you open up your .skin file (which basically tells JA which image files point to a particular spot on the model), you simply edit each line to point to your new directory. So, for example:

models/players/jedicustomisation/torso_1

would become:

models/players/rhuacca/torso_1

The nice part about .skins is that they're really easy to read (because each part of the model is indicated in the code line), and if you're using the same model but with multiple skins (note: you need a separate .skin file with a unique name for every file you create), you can copy the original and just change a few names (so, your default .skin might have blacktorso, but the new .skin might have whitetorso).

Oh, quick tip: if you're making changes to the .skin, these won't appear in Modview unless you close Modview and reopen it - you can change image files and have the changes show up with a quick refresh, but .skin changes don't appear until you've reloaded the whole model.

Once I'm back on the 30th, I can sit down and take you through the process, if you like, but it's not at all difficult - just remember, every image that the .skin points to MUST be in the new folder, or the model will throw off errors when loading.

Hope that helps!
User avatar
Alehk Thol
Lost One
Posts: 1270
Joined: Thu Mar 01, 2007 2:41 pm
Contact:

Re: [HOWTO] Skinning

Post by Alehk Thol »

Skinning for Star Wars Jedi Knight: Jedi Academy
-
Part Six: Species (SP) Menu*
Image

Breaking up .skin files:

For this tutorial, we're going to use Kyle Katarn. Open assets1.pk3 and extract the kyle folder from models/players. Select the model_default.skin after this and duplicate it twice. When this done, rename all three files like so:

model_default.skin -> head_a1.skin
model_default - Copy.skin -> torso_a1.skin
model_default - Copy (2).skin -> lower_a1.skin

As you may be able to guess from the file names, these .skin files should contain only the relevant model pieces for each area of the body. This naming convention is important and must be adhered to. So long as it starts head_, torso_ and lower_, you should be okay. That being said, it's best to keep a track of variants by doing something like this:

head_a1 (Outfit #1 Head)
head_a2 (Outfit #1 Head w/Goggles)
head_b1 (Outfit #2 Head)
head_c1 (Outfit #3 Head)

You would then give the torso_ and lower_.skin files matching names so you know which .skin file corresponds with which outfit.

So, start by opening head_a1.skin. Remove everything that is not a part of the head. I kept only the following entries:

Image

Next, remove everything not relevant to the torso in the torso_a1.skin. Mine contains:

Image

Finally, do the same for lower_a1.skin:

Image

Now Kyle's default outfit has been split into 3 separate .skin files, we need to make icons for them. For the purpose of this tutorial, I am simply duplicating the icon_default.jpg twice and renaming them as follows:

Image

That's the tedious bit done!

Playerchoice.txt:

This is an important file for telling the game what colour customisation options your skin should have available (think the female twi'lek's skin tone from the original game.) We may cover this in more depth in a later tutorial because that involves some shader work!

Regardless of whether you want colour options or not, the file is essential. Create a .txt in your models/players/kyle folder and name it playerchoice.txt. What that is done, open it and copy and paste the following text, then save the file:

*white
{
setcvar ui_char_color_red 255
setcvar ui_char_color_green 255
setcvar ui_char_color_blue 255
}

Name your species or character:

Open your assets0.pk3, navigate through the strings folder and then open English. Inside should be a MENUS.str file. Extract this to your desktop and open it in Notepad.

Right at the top, you should spot this:

REFERENCE JEDI_HF
NOTES "For character menu"
LANG_ENGLISH "Human Female"

Copy and paste it within the file and let's start making changes to the bit we copied!

"Reference" refers to the name of your skin folder, in this case, kyle. (The name of the folder with your .skin files!)

After "Lang_English" is the text that will display as the header for your species in game. I would put your character's name here. In this case, I'm putting "Kyle Katarn".

That's it!

Create yourself a new .pk3, insert a models/players directory, a strings/English directory and a shaders directory and place all of your files in the relevant places!

Important note: Jaden's Hoth gear is torso_g1 and lower_e1. What you'd like to wear during that level has to have those names!

*Special thanks to Rothel for inspiring this tutorial!
Image
User avatar
Alehk Thol
Lost One
Posts: 1270
Joined: Thu Mar 01, 2007 2:41 pm
Contact:

Re: [HOWTO] Skinning

Post by Alehk Thol »

Skinning for Star Wars Jedi Knight: Jedi Academy
-
Part Seven: Extracting From Skin Packs
Image

Getting started:

First, download Spanki's Jedi Customization Pack! I've chosen this file because it's the most commonly poked and prodded .pk3 for this sort of thing. If you're unfamiliar with it, the file contains dozens of skin combinations for a male humanoid in prequel-era Jedi garments.

Once you've saved the .pk3 to your desktop, open it in Pakscape. At this point in the tutorial series, you should be pretty familiar with the folder structure of a typical skin .pk3. Extract everything in the models/players directory so that you can view the contents in ModView.

Next, you need to choose a combination of .skins to extract. For the purpose of this tutorial, I have selected head_a1.skin, torso_a1.skin and lower_a1.skin from the jedi_spanki folder.

Image

Isolate the files you need:

Once you've chosen what you'd like to extract, navigate to your models/players directory and create a new directory to house what you're about to extract. I've named mine "myskin". Now open both your new skin folder and the folder containing your skin choices. In my case: models/players/jedi_spanki

You've probably guessed the next part! Locate the .skin files (head_a1.skin, torso_a1.skin and lower_a1.skin in my case) and copy them from jedi_spanki to your new skin folder. When you've done that, also copy over the model.glm, the sounds.cfg and finally the relevant icon_head_?#.jpg files. Like so:

Image

Rename your icon_head_?#.jpg to icon_default.jpg

Now comes the really tedious part! Open your head_a1.skin file in Notepad.


Image

You should remember from the previous tutorial that each model part with a file path is pointing to an image in a matching directory. You need to navigate through your folders and extract each relevent image file. So for my example above, I need to copy over head_face_a.jpg, mouth_eyes.jpg and caps.jpg from models/players/jedi_spanki to my myskin folder.

When this done, I need to replicate the process for torso_a1.skin and lower_a1.skin

Image

Putting it together:

Open head_a1.skin, torso_a1.skin and lower_a1.skin in Notepad at the same time. Copy the entire contents of torso_a1.skin and lower_a1.skin into head_a1.skin. Save your head_a1.skin file and then delete torso_a1.skin and lower_a1.skin when you're done.

Next, tap Ctrl + H to bring up the Replace function in Notepad. Replace all instances of jedi_spanki with myskin, or whatever you've called your skin folder and then click "Replace All".


Image


Save your head_a1.skin and rename it model_default.skin.

At this point, you have the a complete outfit extracted from a skin pack. You can now load it in ModView!

Shaders:

Open the original Spanki's Jedi Customization Pack .pk3 and this time open the shaders folder. Fortunately, Spanki kept his pretty tidy.

Open Notepad and immediately save the file as myskin.shader (by selecting all types instead of .txt when selecting Save As.) Open Spanki's shader files and copy and paste the shaders that are relevent to your skin choices from Spanki's shader file to your new one.

For instance, I will need to extract:

models/players/jedi_spanki/torso
{
{
map models/players/jedi_spanki/torso
rgbGen lightingDiffuse
//alphaFunc GE128
}
{
map models/players/jedi_spanki/torso-spec
blendFunc GL_SRC_ALPHA GL_ONE
alphaGen lightingSpecular
detail
}
}

Take a look at this example. The shader above refers to two images, torso.jpg and torso-spec.jpg. The latter is imposed like an overlay on former. This means that I'll need to go back to the models/players/jedi_spanki folder and extract torso-spec.jpg as well and any other ____-spec.jpg that our shaders refer to. For me, this meant extracting the following into my custom skin folder in addition to the previous images:
  • torso-spec.jpg
  • caps_glow.jpg
  • head_face_a-spec.jpg
  • boots-spec.jpg
Once you've copied over all of your shader images and shader text, repeat the Ctrl + H process we used in the model_default.skin to change the filepaths appropriately to match your custom skin folder and then save your shader file.

Package your .pk3:

Create a new .pk3 with Pakscape and create a shaders directory and a models/players directory. Place your myskin.shader file in the appropriate directory, along with your custom skin folder.

Finally, copy the sound folder and its contents from the original skin pack .pk3 to your brand new .pk3. Because the skin pack only has one set of sounds, there is no danger in wasting file space with unused files. If another skin pack you happen to be extracting a skin from does have multiple sound folders, you can open your sounds.cfg file (in your custom skin folder) in Notepad to find the correct folder for you.

That's it!

May the fourth be with you! :)
Image
Post Reply