Art Pipeline Tutorial

From Echoes Production Wiki
Jump to: navigation, search

Introduction

Welcome! Welcome to the Art Pipeline Tutorial, APT in short. This page should teach you how to make a R A 3 specific model, and subsequently, get it ready for Red Alert 3. This page won't cover anything fancy, only the bare essentials. But bare essentials are already enough to get a very basic model ready for coding. This tutorial will not help you code, as the writer of this page has no knowledge of code as of yet. This might come later. Bear with us for now.

Requirements

For this tutorial, you'll need the following programs:

Bare essentials:

  • AutoCAD: With AutoCAD i mean a 3d modelling program. in this tutorial, we will be using 3ds max 9 Service pack 2. It is heavily advised to use this program, as only 3ds max 8 and 9 are capable of exporting to R A 3. You could, however, use version 2013 and export it to a file-type the older versions recognize. But the actual exporting (and rigging) has to be done in version 8 or 9. 3ds max 9 will from now on be designated with the words "3ds", because i'm lazy.
  • Gimp/Photoshop: or any other image-manipulator. Paint won't really do however, so if you have Photoshop, use that. If not, get Gimp, it's a free image manipulator, and powerful enough.
  • Crazybump/ a normal map creating program: You'll need these to make normal maps. Any of the programs should do.
  • The Red alert 3 mod SDK: The Red Aert 3 mod SDK has the plugin 3ds needs to export from ".max", the natural file extension to ".w3x", Red alert 3's model designation.

Once you have acquired these programs, you're ready to skip the next part, and head straight on to Step 1: Modelling.

Optional:

  • C&C Asset extractor: a tool which will allow you to extract code, art and texture assets from R A 3 in .DDS and .asset format
  • Jonwil's tools: these should probably be findable by google, and contain a binviewer, and a .BIG extractor. you'll need those to get .manifest files, which you need to extract textures and stuff.
  • DXTBmp program: (google it, first hit) this can be used to extract .DDS's and transform them back into their natural state (.tga)
File:DxtBmpexample.PNG
Guess which texture this is
  • W3x Viewer: This is a program that comes with the MOD SDK that can be used to view w3x's, confirming that they're working as they should. it can also be used to view textures with R A 3's configuration apparently, but i'm not an expert there.
File:W3xviewersnip.PNG
What's this button do?

Step 1: Modelling

The first step to getting a model into R A 3, is getting a model. There's not much i can do to help you there, but i can give some pointers, and more helpful by far, some R A 3 specific pointers.

First things first: if you're using 3ds, a model is made of 5 different things, let's go over them in a simple order:

  • Vertices: the points in space that define a model. Simply put, the vertices are what makes your model, they define every point of the model, and everything between them is a surface to form the model
File:Verticesexample.PNG
Those blue dots there are the vertices on the main Colbert body (Click to zoom in!)
  • Edges: the lines stretching between vertices, defining the, well, edges of a model. some edges can be situated on a flat surface, so bear in mind that "edges" don't need to be actual edges, just edges the program uses.
  • Borders: A form of which i know almost nothing about, and subsequently, do not use.
  • Polygons: Bigger surfaces on a model. generally these are the big planes between edges, and these are the things that transform the model from a collection of lines into something textureable, since you can unwrap them.
  • Elements: A Subpart of a model, basically any one part made of polygons that's not connected to anything else, these become very handy once you stop texturing and start putting your model back together.

So without anything else, let's see what a finished model should look like in 3ds: Here you go!

That didn't do much for you now did it? However, it just goes to show there's more to it then just making a model and clicking a few buttons. The thing you're seeing is the Object-hitbox, a bone needed to determine where the unit collides with other units. This might not tell you much now, but we'll see about that in a few paragraphs. Without the object box, the pictured Colbert would look like this.

I'm going to assume you've got some basic modeling skills, and otherwise you can simply pick them up by mucking about with the program, just try things.

Before you begin with an actual model however, there are a few points to keep in mind:

  • 1: For some reason, R A 3 does not view the front of the 3ds scene as the front of your unit. The actual front is at the right of the scene. So, make sure that if you go to your right hand view port and rotate the view a bit, you see your model pointing towards you. Otherwise, you'll get very Funky but utterly useless results. The best way is to simply rotate your whole model after modelling.
  • 2: Keep your poly count, or, more importantly, your Triangle count low. if either of these becomes too big, your PC won't be capable of rendering these units in game without lagging tremendously. you can view your triangle count by right clicking the name of the view port, and then selecting "configure". You can then go to the "statistics" tab, and check the "Triangle Count" box. then, when you right click the view port name again, and click on "show statistics" (or check the box with "show statistics on active view" in the statistics tab), you should see the poly and the triangle count. If you can keep that number beneath 3000 triangles for a reasonably big tank you should be okay for now. you can go heavier if the unit isn't going to be build often, but there's a certain limit to how much a graphics card can take.
  • Try not to have too many discrepancies on your model. Holes in a model will certainly look very ugly in game, generally 3ds uses a black tone to show the inside of your model. this makes it hard to see sometimes, but most of the times it shows you the gap very well, you can create polygons to cover these up. There's one exception: propellers and such are generally made from one-sided polygons, and are simply copied, rotated 180 degrees, centered on the previous version again (alt+A, align center to center) and then attached to each other. They'll look like they're intersecting in 3ds, but they aren't, they'll just show the same thing on both sides of the flat surface.
  • Remember that certain units aren't only viewed from the top of the screen! Anything that's on ground level can be tossed around by a certain psychic, meaning your beautiful model might suddenly look horrendous as you didn't spend any time working on the underside! you don't need a work of art underneath the model, but some details either in the texture or model would be nice, so remember that. And you might want to do the same for any plane you make. otherwise you might never get a really fancy barrel roll, and that would be a shame now wouldn't it?
  • Some models might require parts that are generalized for R A 3. Ore refineries, for example, won't work with any ore-table, they need a specific one, common to all refineries. any infantry, (non-miner) tank or other unit will probably do fine however.
  • If the model in question is symmetrical, remember you only need to do half of it actively, the symmetry tool can make up for the rest. symmetry will come back with a vengeance during texturing though, it's handy for both, but poses some restrictions.
  • Remember that moving parts of a model should have some space of freedom to move, it is very annoying to try animating a cannon that is welded/connected to a fuselage. It will deteriorate the texture and model. The best way to plan around this in the modelling stage is to try and visualize how your model would behave in reality. A fixed cannon would be unable to move, so some sort of hinge connection would be required to turn it.
  • Never ever pose your model. It's fun and it looks good, but you're going to regret doing that when you're starting unwrapping. This is why the Qadir looks like it does in this render, the T-shape is easier to unwrap, a fighting pose would make it impossible. If you pose a model, you're probably going to rotate some parts of it in the process, this will mess up the unwrap modifier, who maps on either the XY,ZY or XZ planes. It has an option for "best align", but usually this is unstable unless the object is very very simple and non-rotated. If you truly want to pose it, copy it or make a separate file for it.

Unit-specific modelling

Though the basis behind modelling doesn't differ that much from model to model, it's handy to keep certain things in mind for the specific unit types R A 3 has.

Vehicles: Vehicles are the bog-standard of RTS, and in modelling, are relatively simple. There's nothing special about modelling vehicles, even transforming vehicles, which simply require more work, design and animations.

Planes: There's nothing special about planes, except planes with propellors. scroll down to Choppers to find out why. Keep in mind that planes have to take of vertically, and therefore require some sort of visual distinction as to how they do that. Most often (read: in all vanilla units), this is done with rotating engines.


Choppers: A simple helicopter body is easy to make, and will last a lifetime. The only real thing to think about is the rotor blades. R A 3's graphics engine cannot animate normal rotor blades! So this is plain wrong. The rotor can be animated at ludicrous speeds, but the results will look horrendous. There's a solution though. Notice how the Twinblade looks? The rotors are effectively a blur, this means you can also easily texture such a blur on a flat surface. simply make a flat plane in a cylinder shape (a cylinder with a height of 0), and then texture it into a rotor. After that you copy it, and fit the copies on each others backside. Here's an example of a correctly modeled rotor (ignore the see trough feature,it's to showcase the model).

Boats: The only thing you need to remember about boats is to lower them a bit trough the X/Y ("Ground") floor of .3ds, R A 3 seems to count that as the waterline, so depending on how submerged your ship is, you should lower it trough that plane. Amphibious vehicles generally have two models, one for their ground version and one for the swimming version. Take in mind to raise/lower these specific versions to the required depths. the Stingray is a good example of a such a vehicle. Hovercrafts stay on the same height on both land and water.

Buildings/Defenses: There's not much special about buildings, except that they might need a separate model to indicate severe structural damage, whereas most units do not need that. Buildings that transform, such as the MCV, will require a lot of planning to get right though.

Walls: The only thing to keep in mind with walls is that they should be uniformly sized. most often the walls are a 1X1 square piece in game, and their models should also fit in such a uniform way (the length and width for all corner pieces should be uniform, and the very same width should be used for all wall-lines (their length doesn't matter). This is to ensure all the corners and walls line up evenly. bear in mind that it might be possible to do 2X2 walls, as some factions on this very wiki plan to do, but they still need to be uniformly modeled.

Infantry: It's hard to make infantry. The guy who made this was unable to make this without the help of some standard templates created by Paradox's leader, Open sketchbook. Luckily, he agreed to share those models, so i'll link to them from [here] on a later date. You can create clothes by extruding the relevant areas. try to mess around with the options such as "local", "group" and such to get a decent look. Any non-humanoid infantry is easy to model though, even if they need an awful lot of animations. Which might actually be fun to do!

Unclassified Objects: Anything else, such as projectiles and civilian buildings, follow the basic limitations for the other models, though projectiles tend to get a lower triangle count then most other objects, as they tend to fill the screen a lot.

Step 2: Texturing

So, once you've got a model up and ready for colors, you want to start texturing. Texturing is basically making 3 .tga files that will cover your model with a graphical picture to provide it a nice look. But first, you'll have to go trough the most time-consuming, boring and annoying part of this whole process. Ferriswheel made a excellent tutorial about texturing and unwrapping, but i'll recap some of the base points in here, and give some extra pointers for those less-invested into the process.

Unwrapping models

Congratulations on your nice model. I am now going to ask you to destroy it. Don't press delete though.

File:Readyforunwrapping.PNG
I was thinking of this kind of mess


As you can see on the left side of this, i was talking about making a (rudimentary) exploded view of your model. Select your entire model, and hold shift while moving it, this will create a perfect copy of your model. then, drag all the parts of this model up or downwards from the main part of the model (mech torso, tank chassis, cars chassis, boat hull, plane cockpit). Remember to only move them up or downwards so you can easily spot which part is which by using your reference (original) model. you might also want to create a separate save file to start unwrapping.Afterwards, turn everything into meshes, and attach them to each other to make 1 model from this pile of loose parts. you now have a model out of which every part is easily accessible, and easily viewed. This will make unwrapping and texturing that much easier.

So now we have the model completely ready, we select it again, and apply the "Unwrap UVW" modifier. Now, we can select polygons and map them, now the hard part is to determine what is mapped how, and how much space it should take. how much space is invested in each component is purely to the wishes of the texturer, as only he knows what he wants to depict on the actual texture. It's why the texturer should also be the one unwrapping, in my opinion. Even if it takes a hell of a time. Let's start talking about some of the specifics of unwrapping.

Look out for:

  • Symmetrical objects: Back when i touched on symmetry before, i mentioned it could save a lot of space. It certainly starts doing it here. If a model is symmetrical, you only need to unwrap half the model, the symmetry tool will mirror the texture on the other half. That's a lot of extra space to use. If you think about it though, the disadvantage will flow logically from the advantage itself. The texture is mirrored. This means that slogans placed on the left side of the model in ordinary English (read from left to right) will be in reverse on the other side. For example, "MAMMA" will become "AMMAM" on the other side of the model, and that's not even touching non-symmetrical letters such as the R. Now having mirrored letters might not seem much of a deal, but it goes for everything. This can be desirable (in arrows, nose art and such), but also undesirable (anything that looks ugly when mirrored such as slogans, graffiti or logo's)
  • Near Symmetry: What if your model is nearly completely symmetrical, except for some slight indention on one side? You won't be able to use symmetry, but you can simply unwrap every individual piece of a model that is symmetrical to a counterpart on the other side of the model, then unwrap those too, and horizontally flip (or vertically flip depending on it's orientation) those pieces. They'll now look exactly the same. Simply select them, and move one piece over the other. zoom in a bit to make sure the corners are (somewhat) properly aligned even in the largest zoom you can get. It'll be near exact on the unwrap, and there'll be no difference in the texture for those two parts. And even if the parts are not wholly identical, you can still overlap them if they need the same texture and share some general characteristics.


  • Wonky models: Sometimes, you just get the brunt of a modeler's field work. He might have scaled, re-scaled and messed with every individual part down to a level of editing you cannot fathom. Such unwraps tend to be wonky, showing ellipses instead of circles, for example. Your first resort should be the "X-Form reset" tool, which theoretically should reset the model's coordinates, removing all (hidden) modifiers. This should fix up the problems and make it unwrappable again. If not, however, you might have the wrong X-form reset-er (from the modifier tab). Go to the Utilities tab and select "Reset XForm". It worked for me, it might also work for you.
  • Cloned objects: If you have multiple objects in your model, but all of them are supposed to have the same texture, i'd advise to only texture one of them, and clone them again later.
  • Multiple unwraps in the same unit: It is possible to have multiple unwraps for pieces of the same unit, Tanks require it, and sometimes, pieces come from different models, and already have a unwrap and texture you can use. IF you want to do text on a symmetrical unit, it is possible to detach the polygons you wish to have text, and unwrap those two separate from the symmetrical body part (or from the whole unit if the slogan needs space). Just remember to put them back into place afterwards (don't attach them back though) another idea is to simply make two objects that can be fitted on the unit, and unwrap those separate from the unit.

Unit-specific Unwrapping

  • Infantry: Infantry unwrapping requires usage of a pelt map. Pelt mapping is essentially a tool that pulls the 3d polygons into a 2d map by stretching them. It's an ardent procedure. On general, make a normal planar map from the piece you want to pelt map, and make sure it's not a complete loop. So for example, only pelt map the front of the face, the sides, and the back of the head. The neck will have to be done in two parts. It is kind of hard to get a pelt map right, but it is possible, so keep trying stuff. I have never got one right as of yet, but that might change.
  • Tanks: Vehicles require nothing special, but tanks do. The treads should not be included in the main unwrap, these buggers get a separate unwrap (treads aren't animated and require special shaders). To unwrap treads, the best thing is to have a good look at the texture R A 3 uses for allied tank treads.
    File:AUTreads.png
    This is the texture the Guardian's treads use.
    Notice the "teeth" on the sides? These are supposed to be on the sides of your tread. Go to this picture, and click on the image to enlarge it. You'll be able to see the teeth positioned on the side of the treads, with nothing in between. Everything not filled out in the texture will be see trough. The only exception to that is infantry textures, i'll handle those later.
File:ColbertTreads.PNG
The Colbert uses the same texture for treads as the Guardian.
This leaves the question, how do you do these tank treads? The simple (but kind of semi-ugly when really zoomed in) way is to take all the surfaces on the inside and outside of the treads that are not on the sides, planar map them one after another, and then arrange them after each other (then do the same for the sides). then, there's a certain trick involved. the square in the editor is actually copied outside of it. in short words, imagine that the texture you put inside the square is copied to the left and right of it in an infinite loop. This means that putting those polygons next to each other and aiming them on the correct pieces of track texture will result in a pretty decent looking tread from the outside.
File:Colberttreadsunwrap.PNG
Notice how the unwrap only uses half the texture. Symmetry modifier in play here.
  • Planes: There's nothing special in an aircraft unwrap. Just leave some space for the propeller textures.


  • Choppers: Again, there's nothing special in an helicopter unwrap. Just leave some space for the propeller textures.


  • Buildings/Defenses: Buildings require less thought then most unwraps. They are often unsymmetrical, but are very boxy and simple, and as such are easier to unwrap and texture.
  • Sea craft: Sea craft are very mundane, there's nothing special in their unwrap.
  • Unclassified objects: Very often, projectiles make no use of the usual 512X512 standard Ferriswheel supplied in his tutorial. It is best to do those on the other setting he suggested (256x256). Unless the rocket you're planning to make is as big as the unit itself, in which case you could simply take it into the main unwrap of the unit. It is also possible to texture the projectile in the model's texture itself if it's prominently featured on the model, such as here. That could save space/textures. You do need to make a separate model for the projectile though, so it won't have a complete chopper following when it flies. Simply save the model, delete the rest of the model ,and save the projectile separately (perhaps you first need to move it into the middle of the scene).


  • Very big units: It is possible to unwrap on 1024X1024, as i have seen Sighnapse/Opulence do it once. I suppose it is handy to use on the bigger units, but i have never used it yet. It can't be that harmful if you're dealing with things like the Cataphract

Texturing

So, you should by now have a nice unwrap, and rendered it like Ferris said you should. Now is the time to load it up in gimp/Photoshop, and start texturing.

File:Mulediffuse.png
And the subsequent texture.

Now, you know texturing from Ferriswheel's tutorial, so you should know to keep thing layered. Yet there are a few comments i fell should be made about textures.


Viewing your texture:

3ds allows you to simply view your result by dragging the texture from the folder where your .tga texture is located onto your model. Bear in mind that the resultant view in the view port is not how it actually looks, for that, you have to render the model. (without any fancy options, otherwise you'll be busy for a long time.) simply go to "rendering" and click "render", then, render your model. Look around for slight discrepancies or weird texture edges.

Infantry Textures:

Infantry textures are different from other textures. they are not split in diffuse, specular and normal maps, but consist of only a special diffuse map. it's simply a diffuse map, but with everything that should be team color left unfilled/partly filled. in other words, translucence in an infantry texture is team color. For the rest, it's a simple diffuse map. Infantry are too small to apply for normal maps.

Diffuse Textures:

  • Remember to add wear and tear to your textures. No tank has no scratches (unless it's an Emirates tank, in which case they actually fake them), and every tank has some form of earth smudged on the underside. To add wear on the corners of a tank/model go over the corners in a separate layer with a 10% opacity white brush. This is applied on Paradox textures, so it can't hurt to try it on yours.
  • Remember to separate the parts where you want team color in layers. later on, you will be able to copy these layers and colorize them to easily sort out your specular map.
  • According to Paradox's Texturing page, semitransparent objects and rotors are handled with a different shader, the "simple.fx". Keep this in mind as you apply the materials!
  • I can't really wrap my head around it why Ferriswheel didn't mention it, but did show it in the picture of the warehouse diffuse texture. Regardless of it, remember that the color on the diffuse map will show trough the teamcolor. It's why he made the parts in team colour on the warehouse's diffuse map in shades of grey. Along that lines, anything that is colored neutral grey on a diffuse map, and blue on a specular map will be full team color in game.

Specular Textures:

  • When you Specular map something, remember that the black layer you added shouldn't be working on any shiny or teamcoloured patches. copy these layers,fill them in white and then paste them on the overlaying black to negate the effect.


Normal Textures:

  • Normal textures are irritating to do, they require a good setup and a decent grasp of the behavior of your normal mapping program. as i have neither my normal textures tend to be horrendous. The normal texture is actually view able in game in an easy way: it's what you see when you hold the left and right button while having a unit selected in game. You'll be able to see a green version of the model, with small additions that aren't part of the model itself. those small bumps are the visual effects caused by the normal map. As of now i have yet to produce a decent normal map for a unit. To substitute, i simply use a flat one i managed to make. I can always replace it later, and a normal texture is needed to get your unit in game. It might as well be a flat one.

Rendering

So, now you have a texture and a model, It's time to make a nice render. You won't have the chance to do it after you start rigging and apply shaders, since those shaders turn any render you make grey. So you've got to do it now. Don't worry, it's easy enough. To make a render such as the Hellcat's one, you just need to follow a few simple steps:

  • Step 1: make a giant plane all over the scene, then click on it and hit the M key on your keyboard. Next, click the button that says "Standard", then select "Raytrace". check the buttons for ambient, reflect, transparancy and luminosity, then set the diffuse color to the color you wish to have on your render's "floor", apply this to the plane.


  • Step 2: Go to the Lights tab in "create", and place a skylight anywhere in the scene, move it around a bit after seeing your first render to get the best effect


  • Step 3: Render your view using the normal render tool, this will take a bit of time, but it will look decent.
  • Step 4: Of course, now that you've rendered your model, you'll probably notice all the teamcolour is still grey. To solve this, save your texture seperatly, and select all the teamcolour areas. Change all the grey to the desired teamcolour, apply the texture again, and repeat the process. You'll now have a fully teamcoloured render.

Step 3: Rigging

What's rigging?

Rigging is a technical process which creates points in your model to move it with. Imagine your body, and now imagine it without joints, suddenly moving got very hard to do, didn't it? The rigging process consists out of creating singular spots or points in your model, called bones, and binding the cosmetic model to these bones, forming a structure called a skeleton. The bones in this skeleton can be moved, or animated, to displace the cosmetic exterior.

Of course, We can make these bones in any shape and size we want, as these bones will not determine our ingame-look. Bones are hidden ingame, and not visisble. This designation is done manually, and will be explained later.

Be aware that the cosmetic model you made actually also counts as a set of bones, just bones that are actually visible. Coders can hide and show select parts of your model depending on their wishes, which is very handy if you are doing heroic upgrades.

Before we move on to Animation, we will have to rig your model with a skeleton. Let's start.

Adding Bones

The first step is to add bones to your model. Select a sphere, and limit it's segments to 4. Give it any size you wish. You should now have a very ugly diamond thingy on your screen. Congratulations, you made a bone.

Bones can be any shape or size, and technically, you could simply copy parts of your model and resize them to make bones. This prism like bone, however, is easy to make, and easy to place. It loosely resembles a joint, which is enough for our purposes currently.

Of course on itself this thing won't do anything. We have to transform it into a bone ourselves. But first, we have to make more of these buggers. Now is the time to start thinking about the parts of your model that should move. How should they be able to move? and most importantly: where is the rotational center? The point where the part rotates around?

If you've identified thse places, you can align the bones to them. A handy tool here is the Align tool (CRTL+A). If you have an object (or group of objects) selected, you can use the align tool to place htem in the exact center or pivot of another part.
File:3dsBone.PNG
A (humongous) bone with it's pivot ready for manipulation.

I guess this is also where pivots come into play. You might have noticed as you were modeling that you can move your objects around by use of 3 arrows, connected to a singular point. If you wanted to rotate something, it would rotate around that point. Doesn't that sound familiar? It's the rotational center of a few lines back. The rotational center of an object in 3ds is designated as the "Pivot" of the part, and it can be manipulated to our tastes.

To the right of this picture, you'll see a bone (the simple diamond) i made. As you can see, i've gone into the "Hierarchy" tab, allowing me to select the pivot tab within that. The Blue colour of the "Affect Pivot Only" button indicates i clicked it, and am now manipulating the model's pivots instead of itself (exactly as it says on the tin).

We don't need to mess with the pivots of either our bones or our models yet though. The pivots of the bones should be neatly placed in the center of the bone, and 3ds does that by default. the pivots of the model should be placed in the respective bones, or in the center of the part in question.

File:Colbertbones.PNG
The Colbert's bones.

Before we move on, create bones and put them on every spot that has:

  • Fx's: All smoke, light and glows emanate from bones, so you should add them wherever you need a effect.
  • Joints: Turrets and barrels rotate around something, and wheels obviously turn. Place bones in the center of wheels and in the center of turrets, and place bones at the spot where a barrel joins the turret. (and obviously at the spot where the gun fires, as that's a FX)
  • Treads: Give every set of treads a bone in the middle of it, and don't forget to give bones to each wheel inside it too!
  • Hinges: Create bones at the spots where doors or hatches hinge, or at the base of antenna's that are supposed to bend in the wind. It should be possible to do waving flags, but this will require binding vertices to bones, which is beyond me as for now.

And once you've done that, don't forget:

The Object Hitbox: make a box over the entire model, covering it. This bone is necessary for hitbox detection. it should be treated as a normal bone, and should be linked to the main part of the model. The objecthitbox is fairly annoying to have in view while linking, so it's best to hide it for now. Don't forget to link it to the main body though!

Once you've added your bones, we move on to transforming them into a skeleton

Creating a skeleton

File:Hellcatbones.PNG
The Hellcat's bones.

Okay, we've got the bones, and put them in the right places. What next?

we now have to start by rotating all of the pivots of the model and bones in the right direction. Select the entire model and make sure you're affecting only the pivots, then, rotate the pivots so that the blue arrow points to the top of the scene, the red arrows to the front of the scene, and the green arrows to the front of the model (the right of the scene, remember?). To check whether all pivots point correctly, zoom out until you just see a giant pivot. you should be able to see if any of them point wrongly.

File:Linkingtools.PNG
The tools needed to link stuff.
File:Correctpivots.PNG
Correctly rotated pivots.


Now, you must link the bones together. To do this, you must use the link and unlink tool. Linking two objects allows you to move both of them by moving one. If you link a cube to a sphere, moving the sphere will move the cube along with it, but moving the cube will not affect the sphere. Mess around with it to see how it works. (to unlink stuff, select one of them and click the unlink button, this will delete all links connected to the selected part)

Once you know how to link and unlink, you can start linking your model to your bones.

Begin by linking all turrets or other big parts to their base joints (if they have them). After that, start linking barrels to their rotational center bones at the base of the barrel, link gunfire fx's that should move with the barrel to these joints. The barrel base bone should then be linked to the turret's joint bone. this will ensure that rotating the turret will also rotate the barrel and everything attached to it.

In general, make sure all objects rotate with the parts attached to them. if you have parts that don't require movement (no bones needed), but do need to stay attached to the turret model, link them to the turret bone or the turret model (which in itself should be linked to the bone).

Once you've linked all model parts to their bones, and bones that move around to the bones at their respective bases, you should link all of those bones to the main body (the chassis, torso, hull). This part should probably be unboned. To check whether the model is linked correctly, move this part around, and see if everything on the model gets left behind. Obviously, nothing should be left behind, as that would leave parts of the model at the spot of the unit's creation ingame.

Once everything is linked, and is moving as it should ingame, it is time to transform them into bones R A 3 can understand.

File:Linking bones to each other.PNG
A rough representation of how the colbert's bones are linked.

Westwood Space warps: the WW skin

If you have installed the plugin form the MODSDK correctly (read: dumped everything in the correct folders), you should be able to access the Westwood Space Warp, a tool that designates bones for R A 3.

File:WestwoodSpaceWarp.PNG
Here's where it should be in your toolbar.

Once you've found it, click on the tempting "WWSkin" button, and then click anywhere in your scene. A weird purple cross thingy should have apeared in your scene. This is the WEstwood Space Warp, and it transforms your bones into bones.

As you can see if you click the thing, it is treated as a object, and if you go to the "Modify" tab, it gives the big buttons "Add Bones" and "Remove Bones".

Should be obvious now, isn't it? Click the "Add Bones" button, and you will be presented with a list of every object in your scene. (if you haven't renamed all bones yet, this might be a good idea beforehand. Name them so you won't have to search between endless spheres and boxes for the bones you need)

File:WWSkin.PNG
Add Bones.

Once you've selected all bones (to select multiples at the same time, saving you a lot of adding, hold CTRL while clicking the bones. Remember that you do not need to add the WWSkin itself to the bones list), click "Ok". The selected bones should pop up in the "Bones" list underneath the button. (as do the numbers in the picture)

Now that the bones are recognized by the WWSkin, it is time to make sure R A 3 won't show them. select all the bones (easy way is to use the selection floater under tools), and then go to the "Utilities" tab, designated by the hammer icon. Under this, select the button "More...", and in the floater that pops up, scroll down to select "W3d Tools".

"W3d Export Settings" should now appear beneath the tab. You should see that it has two checkboxes, "Export Transform (Bone)" and "Export Geometry". These do exactly as they say. If "Export Geometry" is checked, the selected part will be visible ingame. if not, it won't. as we need our bones to be hidden, but still able to manipulate things, we de-check all the "Export Geometry" boxes on all the bones, and leave them checked on model parts. (both bones and model parts need "Export Transform (Bone)" checked)

(The WWSkin itself should have both boxes de-checked by default. Leave it that way.)

File:W3dTools.PNG
The W3d Toolkit.

Once we've done all that, we can check whether everything is according to plan by using the buttons "Select Bones" and "Select Geometry" under "W3d Tools". (scroll down a bit from the export settings).

If you click "Select Bones", every bone and model part should be selected, and if you click "Select Geometry", only the parts that should be visible ingame should be selected.

Step 4: Animating

Animation

So now you have a rigged model, it's time to animate it. first of, save your model in two separate files, call one the model file, and leave that one alone from now on. R A 3 needs one file for a unanimated reference object, so we'll use the extra file for that. Now, for each animation we'll make yet another separate file, this allows you to modify them later on, and allows us to make animations that follow each other up easier. Take one of your static model files, hide the objecthitbox so you can see your model, and we can begin animating.

Now, animating a model works a bit like animating a stop-motion movie, or a comic. essentially you "set" the position of the model in various times, and have the modelling program connect the dots, making the model move from one position to the other. Of course, the easiest way to manipulate different parts of the model simultaneously is by manipulating the bones. By animating, we will simply move or rotate the bones, and have the program remember the position of these bones.

What to animate?

R A 3 has a lot of different animations that each and every unit needs to have. the units requiring the most animations are obviously infantry units, but almost all units require one of the following:

  • a Idle animation: An animation that can be played while the unit isn't doing anything worthwhile. Usually you have a few different ones, and a predominant idle animation that has barely any animation at all. or just a idle stance.
  • a accelerating animation: All units (exempting some air units) need a animation that illustrates the vehicle starting movement. It would look very weird if your car suddenly stopped or accelerated without showing any reaction to it's own inertia. A good example of these kind of animations can be found on the Guardian tank. just move one back and forth a bit, you'll see.
  • a moving animation: Once a vehicle has started moving, it obviously needs a animation it can loop throughout the movement. Walking animations, wheel animations and such. even aircraft probably need a animation that shows them gently bobbing up and down.
  • a firing animation: Unless you're rocking energy weapons, you probably want to have some recoil in your barrel to make it look nice.

Unit-specific Animations

  • Infantry: Infantry are the unit type requiring the most animations, just take a look at the picture. That's a list of all the animations the conscript has. I'll add more info on infantry animations as i get to know them, which will take some time.
File:Conscript animationlist.PNG
Conscripts are complicated creatures in wants, needs and animations.
  • Tanks: The easiest to animate, vehicles require standard animations, and are often the easiest to do. turning wheels is easy, and since threads are handled by shaders, you don't even need to animate those!
  • Planes: Aircraft do not need turning animations or pitch animations, those are handled by the engine itself. Aircraft thus require the least amount of animations altogether.


  • Choppers: Choppers require acceleration and movement animations just like vehicles, and should always have their rotor turning obviously.


  • Buildings/Defenses: Most buildings have idle animations, or small details going on to make a base seem lively. unpack/pack up animations are something else entirely, and i haven't touched those yet.
  • Sea craft: Sea craft are very mundane, and are handled like vehicles. Most sea craft need no turning animation.

Making an animation

So how do we do it? we got our model primed and ready, and we want to go and have it move! What's left to do?

Well, nothing. we can now start animating. Let's begin with a simple example. say we got some form of naval yard, and we want it to rise up from the sea...


File:GDInavalyardexample.PNG
We want this to move upwards from a undefined position beneath it's current position.

First, we need to remind ourselves how the animation is supposed to work. The animation should end with the naval yard in it's standard position, but we want to have it rise upwards from a non-standard position. Since the naval yard doesn't exist before this, we don't need to worry about needing model files for the positions before this animation. Let's take a look at the next step. First, we look underneath our viewports, and we find a weird bar.

File:Animationtools.PNG
The bar in question. Everything in the red box is needed for animating.
This bar contains all the tools we need. First of all, with our model in the correct end position (the original position of the model reference file), we click the big button called "Auto Key". A red bar should appear on the screen to indicate you are currently animating Underneath it is a button called "Set Key", which can also be used to animate, the difference being that Auto Key sets any position difference you make at a different time automatically, and set key requires you to do it manually. both have advantages and disadvantages, you can look them up if you need to. With Auto Key on, move your mouse to the timebar, the big striped bar from 0 to 100, now, select all bones in your model (or, if you have no bones, the model itself, and look at the slider.
File:Slider.PNG
The Slider.
Drag the slider to the end of the bar (100). Now, click the big button with a key on it.
File:Key.PNG
The big button with a key on it.
You'll notice a weird marker appear on the time bar. This indicates the selected parts/models have had their position fixed at that time.
File:Fixed point.PNG
The weird marker, indicating positions have been set for what you currently have selected.
We just successfully made the end position of our animation. now we just need to set a starting point, and the program will automatically move the model between them. Slide the slider to 0, and move your object downwards. since you're using autokey, a new point will automatically be fixed for you. Since we just fixed two points in space, the animation is technically done. Let's see how it turned out. we can use the animation preview tools to view our animation just like we would view a movie. click play and see what happens.
File:Playingtools.PNG
Use these to view your masterpiece, maestro!
File:Buttonunindentified.PNG
Click this button.
File:Advancedanimationbar.PNG
The new animation toolbar.
File:Linesapear.PNG
Lines appear on the toolbar.
File:Set Tangents to Linear.PNG
"Set Tangents to Linear"

Obviously, you saw your model moving. you might also have noticed that the model seems to teleport back downwards once the animation ends. Since our animation is not intended to be repeated endlessly, this is no problem, but if it was an idle animation, it would look very iffy ingame. Checking to see whether something moves awkwardly at the end of a looping animation is a very good way to see if you accidentally made a mistake in the ending position. It is possible to simply set the initial position of such an animation and copy it towards the end by holding shift at the marker and dragging it, but the program remembers not only the positions, but their paths too, so if you were trying to make wheels rotate, they will rotate normally until right before their last marker, where they will rotate all the way back to the starting position. Experiment with the animation tool to learn the tricks of the trade.

Another important thing you might have noticed is that the model actually accelerated and accelerated, as if it had some inertia. This is something 3ds does by standard, and it can screw up your animations. If you make a animation with multiple set points, 3ds will make sure that each fixed point is at rest. this will make your animation flow very jerkily, as it accelerates/decelerates harshly between the fixed points. to fix this, we need to apply a trick.

On the very left of the animation toolbar rests a strange button. click it. Your animation toolbar should suddenly expand upwards. Select your bones/ entire model again, you should notice lines appearing on the bar. These lines indicate the selected parts moving and rotating in the three dimensions. you can't see it currently, but the lines don't go straight from point A to point B, they act more like a hill/wave. we want these lines to be linear. Drag-select all the lines in the box, and click the "Set Tangents to Linear" button. Now, we have erased the acceleration between the points, making the animation simpler and less iffy. If needed, we can always create acceleration by simply setting more points in-between the end positions anyways.

Now, our animation is done. Save the .max file separately under a new name as a animation.

Step 5: Exporting

And now the easy part: Exporting

File:Exportmenu3ds.PNG
3ds max's standard export menu.
File:W3XExportOptions.PNG
The special export options for the W3x Plugin.
File:Bogusandnonbogus.PNG
The upper file works, the lower one does not.

All that's left is to export your files. Assuming you've installed the Exporter correctly, this will be easy cake. Open your static model file, the one that's complete, but not animated, then go to the "File" menu, and click "Export". A menu should apear. By standard it exports to .3ds, but if you installed the plugin correctly, .W3X should also be an option from that tab. select it and give the new file a name. hit the "save" button.

A new menu should appear, the "W3X Export Options" Menu. It has a lot of options, but currently we only need a few. check either the "Hierarchical Model" or "Hierarchical Animated Model" checkbox, and hit "Okay".3ds will now export your model to a file format R A 3 can read. Go to the location of the new file, and see how big it is. if it's only 1/0 Kilobyte, something went wrong, and you might have forgotten to rotate some pivots or rig/shade some parts. if it has a reasonable file-size, it probably went well.

For animations, simply repeat this procedure with each animation file, but be sure to at least select "Hierarchical Animated Model" instead of "Hierarchical Model", for obvious reasons. Give the animations separate names to identify each and every one of them.

Now that you've made the files, we need to check them. Click one of your .w3x files, and click "open with". open the file using notepad. If you see any comma's (",") in the file, replace them with dots using the replace tool. once you're done with that, hit save. This is a common exporting error in my case. i have no idea why my program does it, but it's easily fixable. Just be sure to check your file for comma's.

Once you've done all this, your work is done, congratulations. Hand all the .w3x files and texture files (in .targa format) to the coders. it's in their hands from now on...

Template:Modding