Wednesday, August 24, 2011

Topic 4: Posing - Multiple Characters


[This is post is part of a series of tutorials.]


Topic 4: Posing - Multiple Characters


We know how to work with one character, and that's super awesome. However, the fun comes in having lots of characters, right? Right.

So, I wanted to go over how to do that. It's not difficult at all, but there's a certain way to do it so that you don't end up going insane.

So, for my example, I've just got my female Shepard open. Let's say I want to do a cool picture with my female Shepard and Jack, since those are the two models I've used in these tutorials so far.


How do I get two models into one file? Easy, just use the Merge functionality in 3ds Max.

Real quick, I just want to point out that Merge is for merging in the contents of one .max file with another. I have all of my characters saved off into their own .max files by themselves, already textured and good to go. If you don't already have that, you may want to do that now.

Before we even do a Merge though, we want to sort of get ready for the file first.

The first thing you want to do is to make sure you have a way to select the whole model that's already there. Ctrl-A won't do the trick anymore since we'll have two people. The way to do that is to create a Selection Set. These are very handy. It's basicallly like it sounds. It's a preset selection group that you can custom make so you can easily select items that normally would be quite tedious or difficult to do by hand each time you needed the group.

To make a selection set:
  • Ctrl-A to select the entirety of the model and its bones.
  • Up in the tool bar, find the text type-in box that says "Create Selection Set" (it has a curly bracket ABC icon next to it).
  • Type in whatever you want to name your selection set. I'll be naming mine FShep.

That's how you make a selection set. If you click on that ABC icon next to the box you just typed in, you can see all of your named selection sets. You should see the one you just made. If you click on the plus next to it, it'll expand so you can see exactly what's included in the selection set.

To use a selection set...
  • Click on the drop down arrow next to the selection set type-in box.
  • Click on the name of your selection set.
Then, bam, you have your entire model selected with very little effort.

So, now we have a way to select just the first model, which is great. The next thing we should do is move the model off to the side a bit, since our next model will be merged in at exactly the origin, which is (0,0,0).

To move it, just use the selection set to select the whole model. Then use the translate tool by pushing W.

Just move the model off to the side a bit so the other model has some room. It'll still work just fine if you don't move the model, but it just looks visually confusing, and the model needs to be moved anyway since I want to be able to see both models for the render.

Okay, so now that there's a space for the second model, we're ready to Merge. To do this...
  • Click on the Max icon in the top left corner.
  • Click the arrow by Import.
  • Click on Merge.
  • Navigate to the .max file that you want to merge in. In my case, it's just Jack.max.
  • Click Open.
  • You'll see a new dialog pop up. It's asking what contents of this Max file you'd like to merge in. You'll want to say All (assuming it's just the character by him or herself). If you have lights in the scene or cameras that you don't want merged in, you can uncheck those boxes on the side, and they won't be included when you hit all. Don't forget to click the All button before saying OK. If you don't, nothing will get merged in.
  • Another new dialog box should pop up asking about duplicate names. This is because the rigging's pretty much the same. What you want to do here is check Apply to All Duplicates, then hit Auto-Rename. Max will auto-append numbers to the bones so that all of the second model's duplicately named objects will be like jawBone01, and your main model will have jawBone. This helps decrease the insanity when you use your object lister to find specific things. You'll know by the numbers whose objects are whose.
  • You may get another dialog box asking about duplicate names for materials. (That's if you neglected to name your materials, which I occasionally do from time to time.) Just say auto-rename here too.
Then, you should see your second model pop in right in the center.

Before you click off of your model, be sure to make a selection set while you still have it selected.

Just type in the name up at the top, like we did for the first one. I'm calling mine Jack, since that's who I Merged in.

From there, it's all the same process as before with regards to posing and whatnot. There's just two copies of everything now. Twice the work but twice the fun!

If you want more models in, just use the same process and be sure to use Auto-Rename to keep the headaches away from everything being named exactly the same.


Okay, that's all I can think of for Merging and using multiple models! Now we'll move onto lighting!



Topic 4: Posing - Importing and Using Animations


[This is post is part of a series of tutorials.]


Topic 4: Posing - Importing and Using Animations


Okay, so one thing you can do to get some basic poses is to import in animations.

All of the animations found in game (running, walking, crouching, holding different kinds of guns, etc.) are in the folders somewhere. Each type of alien has specific animations because they have specific rigging. If you try to give a Turian a Krogan's animations, you'll end up with a really effed up looking Turian. (It's actually quite hilarious in a horrifying way, but still, it's not what we're looking for.)

These animations can be imported in the same way you can import in .psk model files. It uses the same script actually, so yeah, let's do this thing! I'll be using my comic female Shepard again, but feel free to use whatever humanoid you'd like.

  • Click on MAXScript up on the top menu.
  • Click on Run Script...
  • Open up ActorXImporter.ms from wherever you keep it on your computer.
  • Click on Import PSA...
  • If you're using female Shepard like I am or any other female model, navigate to PTY_EX_HumanFemale.psa, which can be found in multiple places, but BioH_Convict_00 has it in its AnimSet folder. (If you're using a different model, its animations will most likely be in their BioH folders, and you'll be looking for PTY_EX_[NameOfSpecies].psa.)

Once you've opened up the PTY_EX_[NameOfSpecies].psa file, you should see a list of animations, AM_PistolTwitch01 [###] (the number in the brackes denotes how many frames it has, BasicPose, and two others. AM_PistolTwitch is in pretty much all the PTY_EX_[NameOfSpecies] animation sets. It's a basic idle/waiting kind of stance.

To do that, either...

  • Double click on AM_PistolTwitch01 [180]
  • OR click once on AM_PistolTwitch01 [180] and click on Load track.
  • (Either works just fine. Just don't click on Load all. That's not what we want.)

So, you should see your model go into the first frame of its pose, most likely just standing.

If you press Ctrl-A (to select the whole thing), you'll see a bunch of crazy black hair lookin' things down in the timeline at the bottom of the screen with red, green, and blue in them (which stand for position, rotation, and scale respectively). Those are frames. Each object has a frame. So, like, an elbow bone needs a frame, a toe bone needs a frame, a neck bone, an eye bone, everything. (That is, if you want it do something.) Also, for each object, there's a frame for position, one for rotation, and one for scale.

If you right click on one of those frames and just highlight over Configure Keys, for example, you'll see that there's a position, rotation, and scale listed for a lot of bones. Parts that have frames at the currently selected time will have white boxes around them.

Anyway, I won't go too much into animation right now, just as much as you need to know. So, if you want to see the animation play, just click the play button that's down at the bottom right. There's a rewind button, a go-back-one-frame button, then the play button right after it.

Click it, and you'll see the animation loop around.

Whenever you import in an animation, the timeline usually automatically adjusts to exactly how many frames it needs in order to loop smoothly. In the case of the human female's PistolTwitch, it's 180 frames (starting at frame 0, so it goes to 179 frames).

You can click on the little scrolly frame counter bar just above the timeline and move it back and forth. That also plays the animation as it goes, and allows you to get to a specific frame if you need.

This is helpful if you're wanting to do some kind of pose with the animation and you want it to be at a specific frame within that animation. For example, if you want female Shepard to stand with her hand on her hip lookin' like some kind of badass, you could just move the little scrolly awesome bar to, oh, maybe frame 100 or so. (The little arrows on the sides of the bar move one frame, which is kinda helpful at times.)

If you move, rotate or scale something, you'll essentially break the animation. It'll still animate, but the thing that you moved won't animate properly anymore. This isn't a huge deal if you're just making a pose and do not need the animation except as a base pose from which to start.

So, also, you can only load in one animation at a time (as far as I know). I've never needed multiple animations for one character anyway. I mean, since it's just basic posing that you only need one frame of, I don't see why you'd need that anyway.

It's a good idea to save before loading in an animation, just in case it goofs up your model. You can just revert back to the save, since I don't think you can just undo an import.

Some other tidbits:

  • To scroll through the timeline itself (past the specified numbers): Ctrl + Alt + Middle Mouse Click on the timeline and move left and right while holding all of that
  • To "scale" the timeline (aka zooming in and out basically): Ctrl + Alt + Right Mouse Click on the timeline and move left and right while holding all of that
One thing I do is delete all the frames once I've gotten the base pose picked out that I want. To do that:
  • Click once on the timeline (it should highlight with light blue) 
  • Hold Shift and drag to select all the frames.
  • Push the Delete key. 
  • Shepard will still retain the pose even though you deleted all the frames.
  • If you play or move the scrolly thing to a different spot at the timeline, Shepard will still retain the same pose (unless you forgot to delete some frames, in which case, hit ctrl-A again, and make sure you've deleted them all).
Deleting the frames isn't a necessary step. It's just something I do to make my work a little easier, just so I don't accidentally move the slider and change the animation on myself. (Also, the white boxes go away, which makes it easier to see things while working.)


So that's the basics of importing and using animations! They're good for getting basic poses fairly quickly, like for standing or something. 

The next topic will cover using multiple characters! Woo!



Topic 4: Posing - General Overview


[This is post is part of a series of tutorials.]


Topic 4: Posing - General Overview



For my tutorial sample, I'm going to use the Shepard from my comics, as she's my favorite model to work with. However, feel free to use whatever model you want. They all have *roughly* the same structure. (Well, as far as the humanoid creatures are concerned. Things like Varren or Hanar naturally have different structures.)

In case you're curious, for female Shepard, you can look into:
BIOG_HMF_ARM_CTH_R <-- Casual clothes.
BIOG_HMF_ARM_SHP_R <-- Shepard's armor.
BIOG_HMF_HED_PROMorph_R <-- Female human heads.
BIOG_HMF_HIR_PRO <-- Hair styles.

(Male Shepard would be the same, except HMM instead of HMF.)

To start off with, let me talk a bit about how I keep my screens.

There are four viewports. I use the two on the right side (the top right and top bottom).
The top one I make a Perspective view by clicking into that viewport and pushing P.
The top should be Wireframe by default, which is what I use. If it's not, F3 toggles shading/texturing/fill and F4 toggles the wireframes. (When I say wireframes, I mean the crazy colorful grid-like lines on the body.)

The reason I do this is because some bones can be seen in the normal view (with the shading on), but there are some that are inside of the body that can't normally be seen. You don't *have* to have your screens like this, but it's how I work; I just thought it would be helpful to share. Anyway, I just said "bones." Let me explain that.

To do the posing, you'll be manipulating the bones. (The bones can also be collectively referred to as rigging.) These are the bits that sort of control how the outside model moves. They make animation possible. The bones are the whitish/greyish lines that jut out from the model at all different angles. You can see them all over models' faces and everything. It's important that you do not delete any of these bones. If you do, you could break the rigging system. They are built upon hierarchies (dependencies), and if you get rid of a parent bone, then its children won't cooperate properly with the rest of the body.

For example, the arm bone controls and wrist and fingers. Then, the shoulder bone controls the arm, which controls the wrist and fingers. If you deleted the arm and then tried to move the shoulder, the wrist and fingers wouldn't move since the hierarchy system was broken.

So, actually doing the posing is really fairly simple and straightforward process. It just takes time and a lot of tweaking to get the right result.

So, just to dig right in...

  • Click on the big spearlike bone jutting out of the model's shoulder. (Regardless of which model you're working with, as long as it's a humanoid character, it will have a shoulder bone. It may be kind of hard to find due to bulkiness of the model, in which case, you'll want to use the wireframe view to find it.)
  • When you click on it, you should see the name of the bone in the side bar. In my case, it's "LeftShoulder." (It may be "RightShoulder" if that's what you grabbed.)
  • Hit the E key to switch over to the rotate tool.
  • You should see your tool switch over to a bunch of overlapping circles. Those circles are just the different axises (or axes, I'm not sure, hah) on which you can rotate.
  • So, if you click an axis and pull, the arm moves.

It's that simple. Seriously.

That's the whole name of the game, just rotating bones.

You can also just grab anywhere in the sphere to move things around freely without an axis.

There's a helpful thing I use when blocking out base posing. It's the Angle Snap feature. Just hit A for angle snap, and it'll snap at exact five degree increments. (I'm sure you can change this amount somewhere in the preferences, but honestly, I've never needed to.)

I usually use that to make sure the arms are even or legs, if they're sitting or something. Then, once I have them basically where they need to be, then I turn off angle snap and move things around to make things more organic.

People don't usually sit or stand evenly, and when they do, it's really noticeable since humans are accustomed to noticing symmetry. When a person's standing up straight and tall, it gets our attention because we associate it with having purpose, intent, and even looking for attention, like a drill sergeant or something would. So, it's important to get in those little asymmetrical details, like someone leaning back on a foot, if they're just standing talking. If someone's sitting, maybe they have one leg wider than the other, and their feet are pointed in slightly different directions.

That brings me to another point--the eyes. Your pose will look soulless and fake right away if your eyes are not right. It's important to take the eyes out of their default positions any time that you do a pose. (Unless you're going for a soulless or scared kind of look.) You want to adjust the eyes up or down or to the sides based on where the character should be looking. Also, lowering the eyelids helps to decrease this effect. Most people don't walk around with their eyelids wide open.

I'll show you a technique I use for getting to the eyes quickly, as it can be tricky to find them within the messy head wireframes.

  • Tap the H key on your keyboard.
  • Wait a second or two, as this takes a moment.
  • A list should pop up with all the bones and parts that are currently in the scene. (If you have lights, cameras, etc. then those are listed as well.) This is the object lister (at least that's what I call it).
  • If you click on the Name section header, it'll sort the things alphabetically by name. Just scroll down to Eyes. There's an Eye_Left and an Eye_Right. You have to rotate these independently. You can't just cheat and be lazy and rotate them both at the same time, since rotating multiple objects doesn't work like you think it would because the pivot points are different.
  • To select one of the eyes, just click on one of them and click OK.
  • OR you can double click on the name, that also works.
  • Then you can use the rotate tool to move one of the eyes to wherever you need it to be looking. (Yeah, it'll always look derpy at first with one eye rotated and the other not. I can't help but giggle myself.)
Once you've rotated that eye, then just do the same thing with the other eye.

Be sure to check it from all angles. Sometimes, the eyes will look like they're pointing in the same direction from one angle, but another angle will show that one may be off a bit, and if that happens, the expression won't look quite right. People pick up on eyes very quickly, which is why it's crucial to get them right.

Okay, now for eyelids. With eyelids, I go through the object lister and select both at the same time. But wait, I just said not to do that, right? Well, I don't rotate the eyelids. I actually just translate them down. So, let's do that.

  • Hit H.
  • Click on eyeBlink_Left.
  • Then, hold ctrl and click on eyeBlink_Right. (If you don't already know, holding ctrl while clicking things allows you to select multiple things. Also, if you click on something, then hold shift and click something else, it'll select all the things from the first thing to the second clicked thing.)
  • Click OK.
  • Hit the W key to switch to the move tool. (I call it translate tool because I'm a programmer, so I kinda think in terms of math sometimes.)
  • Then, you can just click the up arrow and drag to move the lids up or down depending on where you need them.


If you want to open or close the mouth, the jawBone bone is the one you want to rotate. I usually find this through the object lister.

Making the character smile or frown can be done through the LipCorner_Left and LipCorner_Right bones. They can be both/either rotated and/or translated, depending on what sort of look you're going for.

There are usually multiple neck bones with the character. The lower ones move the whole neck base, and the upper ones are more of a head pivot. I usually use the upper ones more so than the lower ones.

That's about all I can really think to say about posing. It's all about just moving things and seeing what they do. Some bones don't appear to do anything at all because they have different reasons for being there (like the Prop bone, which is sometimes an annoyance as it occasionally fools me into thinking that it's the elbow bone upon first glance).

Shepard doesn't like Mondays...although, in space it's hard to tell which day it is, so everyday feels like Monday.

The next topic for posing will cover how to import animations, as they can be useful for posing. See you there!



Thursday, August 18, 2011

Topic 3: Texturing - Clothing & Masking


[This is post is part of a series of tutorials.]


Topic 3: Texturing - Clothing & Masking


This tutorial covers texturing the Turian clothing model, as it uses tinted diffuse maps and masks, which requires a specific setup in 3ds Max.

Naturally, the first thing you'll want to do is fire up the Max and load in your model. The Turian clothing model can be found in a number of places, such as the Citadel files and some of Garrus' files.

Perhaps the easiest place to find it is in the Garrus romance package: BioD_EndGm1_110ROMGarrus.


After you've extracted the assets, import the TUR_ARM_CTHc_MDL.psk into Max, and you'll see that it is indeed Garrus' lovely outfit. There's only one texture for this Turian clothing model, and many other Turians (like random NPC Turians and just background type Turians in the Citadel and whatnot) use this model, but it'd be boring if they all had just the same exact outfit on.

To solve this, there's a masking technique implemented allowing the graphics engine to simply change the colors of specific spots on a diffuse map through the use of a mask. Instead of wasting memory space making like forty different maps that only differ in color, the game can just use one main map and just dynamically change the colors in-game as needed. I'll show you how to do that in Max, so let's do this thing!

Open up the material editor with M and pick a blank spot.
  • Name it "Garrus_Clothes" or something super great like that.
  • Click on the large grey box next to Diffuse up near the top and make it completely black. (If you don't do this, your texture will look faded.)
  • Then scroll down and expand the Maps section by clicking on it.
Okay, I'm only going to talk about how the diffuse map needs to be set up as it's the only one that requires anything special. The normal map and whatnot follows the same sort of thing that we've done before, and you're a pro by now, right? Right.
  • Click on the None next to Diffuse and double click on Mask.
  • In the second box labeled Mask, click on the None
  • Double click Bitmap, find the file TUR_ARM_CTHc_Tnt_Diff.tga, and open it, make sure the Alpha Source is None. (If you look at the map, you'll see it's an unattractive pink/purple color.)
Then, go back up to the parent Mask menu.
  • Click the None by Map and choose Mix.
  • You'll get a new menu with three maps. Click on the first spot and choose RGB Tint.
  • In that new window, click the None, find TUR_ARM_CTHc_Tnt_Mask.tga, open, and make sure the Alpha Source is None.
Go back up to the parent Mix menu, and then you can just copy that RGB Tint that you just made to the two spots below it. (Copy, not Instance or Swap.) To copy, just click the RGB Tint slot you just made and drag it to the next slot.

Then, you can go ahead and assign the texture to the material, if you haven't already, and make sure it's shown in the viewport.

You'll see that the clothes are just Red, Blue, and Green. Yup, that's what's supposed to happen. In order to change the colors, you just change the values of the first two RGB Tints of the Mix.

Also, there's an additional bit of detail that needs to be added in if you're interested in fully recreating Garrus' ensemble, since there's some additional coloration in places.
  • Go into the second RGB Tint slot.
  • Change the map to use TUR_ARM_CTHc_Tnt_Strp.tga instead.
From, there you just need to tinker with the colors until you get just about the right thing. Or do something completely different and give ol' Garrus a fashion makeover! Whatever you want! The power is now yours.

Don't forget to go back up to the main, very top parent menu and add in Bump mapping.

Garrus Vakarian's Outfit

Lorik Qui'in's Outfit

There are other textures, like the Salarians' and Krogans' civilian clothes, that require the use of the same procedure. The steps are the same, so you can totally do it! The coloration just depends on whatever you need it to be, and that just takes some playing around with to get used to what does what exactly.

So, that about wraps up things for texturing. (As far as I know, for now.) The next thing I'll be covering is just some basics on how to go about posing!



Wednesday, August 17, 2011

Topic 3: Texturing - Head


[This is post is part of a series of tutorials.]


Topic 3: Texturing - Head


Okay, so right now we've got Subject Zero with a nicely textured body, but now we need to texture her head!


Texturing heads is slightly different as it requires the use of a multi/sub-object texture. It's not hard. Don't worry! It's basically just having multiple textures within a single texture slot. The model itself has different ID's, and the textures are applied to the correct areas.

For example, if you were making a basic diffuse texture for a soda can, maybe you'd want to have a silver color for the top and bottom, so those could be ID 1. Then, you could make the sides ID 2, as that would be the colored part of the can with the name of the soda on it.

Heads are a little more complicated than soda cans, but it'll all make sense as we do it.

First thing's first, hit M to bring up the Material Editor. Go to a new slot, and name it something like, "Jack_Head" or something awesome and helpful.

  • Then, right next to where you changed the name, click on the box that says Standard.
  • A new dialog box opens up with a list of different types of materials.
  • Double click on Multi/Sub-Object.
  • You should see the texture list change to show about 10 ID's with blank materials.

The first thing we need to do is figure out exactly how many parts there are. The way I do this I make an additional multi/sub-object material as a test material and just apply basic diffuse colors. Then I apply that map to the model so I can see which parts are where. I do this with any new model I'm working with because occasionally things that may not seem like they'd need multi/sub-object textures actually do.

So, you can actually use the material we're working with to do this. Just click the grey box next to where it says "Material ### ( Standard )" and give it a color. Do this for ID's 1-6.
What I do is assign it in rainbow order because it helps me know what order things are in. If you have a different way of interpreting colors or ordering things, feel free to use that instead!

When you're done assigning basic diffuse colors, then go ahead and apply the texture and click show in viewport. Then you'll be able to see what's where.

ID 1 = Eyelashes
ID 2 = Scalp (& Neck)
ID 3 = Face
ID 4 = Eyes
ID 5 = Earpiece (unique to Jack)

Note that not all heads are mapped the same. Some have different ID's. The only way to know what goes where is to use a test material and see.

Woo! Now that we know all of her headparts, we can start a-texturin' like the mad fools we are.

I'll start off at the top with the eyelashes at ID 1.

Click on the Material ### ( Standard ) to go to that texture slot.
Rename it to "Eyelashes" or something helpful. (Believe me, naming is very helpful with multi/sub-object textures.)

The way I do eyelashes is I just give it a diffuse color then I apply the opacity map, and that's all. It does well enough for me. Eyelashes can barely be seen anyway.

So, the first thing I do is change the diffuse color from the test color to a very dark brown color. (I usually don't make it full black, but if that's what looks good for you, go ahead!)

  • Then, click on Maps to expand it.
  • Click on the None next to Opacity.
  • Choose Bitmap.
  • Navigate to the file "HMF_HED_PROMiranda_Lashes.tga" in BioH_Convict_00 texture folder.
  • Make sure Alpha Source is on None.
  • Click the Go To Parent to go to the main Eyelash menu. Click Show in Viewport. You'll see her lovely lady lashes! Yay!

(Quick Note: Yes, I know I said to use the Miranda map. Sometimes assets are shared between models.)

Then hit Go To Parent again to go to the main multi/sub-object menu.

We'll go to her Scalp texture next at ID 2. Name it, and add in...

  • Diffuse: HMF_HED_PROJack_Scalp_Diff.tga
  • Specular: HMF_HED_PROJack_Scalp_Spec.tga
  • Normal (Bump): HMF_HED_PROJack_Scalp_Norm.tga

Then, do the same thing with the Face texture in ID 3. Name it, and add in...

  • Diffuse: HMF_HED_PROJack_Face_Diff.tga
  • Specular: HMF_HED_PROJack_Face_Spec.tga
  • Normal (Bump): HMF_HED_PROJack_Face_Norm.tga
  • > Additional Bump: HMF_HED_PRO_WKL_Norm_Jack.tga

Next, we'll apply the eyes' texture in ID 4. The texture for the eyes I just share between the male and female models. There's a process for just tinting the color, but I'm not sure how it's done in 3ds Max as of yet, so I just make custom-colored textures in Photoshop. I can go over that more later, but for now, we can just get the basic map in.

From BIOG_HMM_HED_PROMorph, after naming the texture, add in...

  • Diffuse: EYE_Diff.tga
  • Specular: EYE_Spec.tga
  • Normal (Bump): EYE_Lens_Norm.tga
  • > Additional Bump: EYE_Iris_Norm.tga

The last thing to do is the ear piece. This step is unique to Jack. I haven't seen any other characters with anything like this. (Garrus' eye piece is also unique, but it's very different.) Anyway, the texture for the ear piece is actually a part of the scalp texture, so to get it textured. All you have to do is repeat the exact same steps for texturing the Scalp. Then, voila!

You have a beautifully textured Jack's head, completing your work on assembling her model. Great job!


Again, the same basic process applies to pretty much all heads. Not all heads have the same ID's for things, so I always recommend applying a test material to the head just to see where everything should go.

Sometimes you can see edges of where one map begins and another ends, like with the face and scalp. I haven't found the best fixes for that yet. I stick to Photoshopping it out in post (with the smudge tool) or just tweaking the spec map levels. Either helps to diminish the severity of those lines. Also, different lighting setups have different effects. Either way, they're not a huge issue.

Well, that covers how to get a model extracted and textured! The rest of the tutorials will cover some of the finer points in doing this kind of work. See ya there!