An expansion/overhaul mod of epic proportions, with entirely rebalanced gameplay, expanded factions, new gametypes, graphical overhauls, and five new factions; stealth-based Confederate Revolutionaries, tower defense-inspired Atomic Kingdom of China, economy-focused Mediterranean Syndicate, DotA-esque Order of the Talon and spammy Electrical Protectorate.

Report article RSS Feed Textures in Red Alert 3

The skinny on unwrapping 3d objects in 3DS Max, plus background on Diffuse, Specular and Normal Maps.

Posted by ferriswheel42 on Sep 18th, 2009
Intermediate Textures.

Foreword

Hey guys, I figured that since certain non-specific mods have yet to release textured models, it would be beneficial to the Red Alert 3 Modding Community to put up a texturing tutorial. Please note that there are a ton of different ways to do this, and my method describes what I think is the easiest way to go about texturing. If you have anything to add, or you see something that is incorrect, please send me a PM as soon as you can. Thanks, and enjoy!

Overview

The goal of this tutorial is to educate people on how to unwrap and texture in 3DS Max and other 3rd party programs. By the end of this, you'll be able to fully texture a model that can be used in Red Alert 3 mods.

Before we get started, please take a look at this tutorial by Koroshiya_Ichi: Moddb.com , which covers the basics of 3D textures in general, and will be useful to keep in mind while going through this tutorial.

What You Need

3DS Max 9 or higher
A Photo Editing Program (See Below)
Red Alert 3 (1.12 Patch) and the Mod SDK (Portal.commandandconquer.com)
CrazyBump, or a similar program that creates Normals from a height map.

Note:
While Photoshop is an excellent tool, it can be a bit pricey (especially after buying 3DS Max 9). Here are some cheaper alternatives that can get the job done just as well:

GIMP - Gimp.org
Paint.Net - Getpaint.net
Artweaver - Artweaver.de

Part 1: The UV Unwrap


Here's the situation: You have a beautiful model that you just finished making in 3DS Max. You've done a bunch of renders of it and sent them off to the interweb for critique, found out that people there love it almost as much as you do. Wonderful! So... Now what?

First things first. Before you even think about closing up 3DS Max, you should first unwrap the UV coordinates of your model. What are UV Coordinates, you ask?

Wikipedia.org wrote:To put it simply, UV texturing permits polygons that make up a 3D object to be painted with color from an image. The image is called a UV texture map, but it's just an ordinary image. The UV mapping process involves assigning pixels in the image to surface mappings on the polygon, usually done by "programmatically" copying a triangle shaped piece of the image map and pasting it onto a triangle on the object.

Now that we know what we're dealing with, let's get to work. First, with the model selected, go to the "Modifiers" menu, then go down to "UV Coordinates", then select "Unwrap UVW". This will bring up the Modifiers Tab on the right-hand side of the screen, as well as automatically add the "Unwrap UVW" modifier to the list. Below this, you'll find three boxes: "Selection Parameters", "Parameters", and "Map Parameters". Under "Parameters", click on the "Edit..." button. This will bring up the UVW Editor.

Chances are that you'll be greeted by a mess of green and white lines on a blue-white grid. Before you panic, take a deep breath, and try to get comfortable. The best way to go about this is to start planar mapping all large, flat surfaces. Don't go straight for the cylinders or more complex shapes just yet, or you'll get some very wonky results. To planar map a surface, start by selecting the polygons that compose it.


Once you have a whole side selected, click on the "Quick Planar Map" button under "Map Parameters" (make sure that "Averaged Normals" is selected). What you'll see in the UVW Editor is a 2D representation of that face, or side. Drag it off to the side of the UV map for now, once we have it mapped, we move on to the next few sides.

After all the larger surfaces have been mapped to 2D planes, it's time to get to work on the cylinders and more complex shapes. To map a cylinder, select all the side faces (Not the top and bottom. Those should be mapped separately), then look under the "Map Parameters" section again. Click on "Cylindrical", then click on "Best Align" once it is selectable. If you have problems, make sure all the faces are selected. If you have accidentally forgotten to select a face, click on "Cylindrical" again (this will allow you to select faces again) and then use CTRL+Left Click to select the missing faces. You'll have to click on "Cylindrical" yet again to re-map the UVs. Once you're satisfied, deselect "Cylindrical" for the final time. Again, drag the cylinder UVs (which should actually look like a square with parallel vertical lines through it) to the side of the UV map, where it won't get in your way.

If you have a complex shape that needs to be mapped, select all the faces, then in the UVW Editor, click on the "Mapping" menu, then go down to "Normal Mapping". A little dialogue box shows up. Where it says "Back/Front Mapping ", change it to "Box Mapping", keeping all the values the same. This should break your complex shape into a bunch of separated parts which will be easier to map. Note that if the shape being referred to here is a wheel, or something else that is "circular", it would be easier to use the above method. Again, drag the mapped UVs to the side.

Once you have all the major objects mapped, check your UVW Editor. If there are any green lines left over (on more complicated models there likely will be), select them in the editor, and look back to the main viewport to see where they match up to on the model. It is very possible that you will have missed a few faces, or even objects. Once those have all been dealt with, it's time to save your UVWs (in the UVW Editor, go to File>Save - any filename will do for now).

Now it's time to scale the mapped parts and rearrange them on the UV map (which is indicated by thick, dark blue lines). You'll find the UV editing tools underneath the menu bar in the UVW editor. It's best to play around with these first to get a feel for the tools.

The key to good mapping is preserving space. The biggest parts of the model should take up the most space on the UV map, and should be scaled only slightly. The smaller parts should take up less space, and any part of the model that is unseen should be scaled as small as possible, or kept at the side of the map.

Any symmetrical face or object should have its UVs flipped over. To do this, select only half of the face, then click the "Break Selected Vertices" button. Then you can either go to the "Tools" menu, or simply click the "Flip Horizontal"/"Flip vertical" Button below the menus.

Once you've fitted all the appropriate pieces of the model into the UVW map, you can begin editing. Below is an example of a moderately decent UVW map (with grids removed).


To export to an image file, go to the "Tools" menu and select "Render UVW Template". A dialogue box should appear. Change the width and height dimensions to 512x512 (or 256x256 if it's a smaller model), then click the render button. If you're happy with the way it looks, click the little "Save" icon, and save it to a folder on your computer (preferably the same folder where your model resides. If that happens to be "My Documents", make a new folder, move your .max file there, then save your image to the same location). It's best if you save your image file as a 32-bit Targa (TGA), which is the file format used in Red Alert 3.


Part 2: Diffuse Maps

Now it's time to open up your newly created TGA file in the photo editor of your choice (MS Paint is not recommended, as it cannot open or save TGA files).

First off, copy the background, change the background to a solid colour (instead of transparent), then paste the background onto a new layer. Change this new layer's blend mode to "additive" so you can see the only the white/green lines. Now, you get to paint!

Like painting a regular picture, texture mapping is roughly the same. The "Diffuse Map" is a fancy way of saying "Colour". This means that the basic colours (without shadows, highlights, or teamcolour applied) of the model are determined by this TGA file.

Start with a basic colour of your choice (for me it's usually grey), and fill in all the basic shapes on the image with it (layer 1). On a new layer (layer 2), add lines, pipes, paneling, rivets, the list goes on. Add another layer (layer 3) to denote teamcolour (just use a bright blue or red for now), then when you are finished, hide this layer (layer 3). The topmost layer (layer 4) should be reserved for grime, weathering, and other fine details that make the texture look more realistic. You don't really *have* to have the layers organized like this, but if it's your first time texturing, it's best to stick to something simple. Now, save your file in a format that supports layers (in case you need to edit it in the future). Format examples are PSD, or the native file format to your program.


Once you're happy, save this file in the following naming convention: (First letter of the faction)(First letter of the object type)UnitName.tga
i.e. AUCryocopter.tga <-- (Allied)(Unit)Cryocopter
or CBWarehouse.tga <-- (Confederate)(Building)Warehouse.tga

Specular Maps

Specular maps are a channel-based image that controls the "shiny-ness" and reflectivity of the model. It also controls the teamcolour.

Specular map channels can be described as such:

  • The Red channel in the image controls the brightness of the material (i.e. 255 Red will make the texture very “shiny”).
  • The Blue channel controls Team Colour/Player Colour.
  • Green channel controls how reflective a surface is (i.e. mirrors, windows, etc.).

So... Purple = Shiny and has teamcolours; Yellow = Shiny and Reflective; Cyan = Reflective and has teamcolours.

The brightness of the channel determines the quantity of shininess/teamcolour/reflectivity.

The best way to start making a Specular Map is to flatten, or merge all the layers except the one with the team colours. Then, remove all the colour from the image except red (you may have to consult a tutorial for your program on how to do this). Then, create a layer of pure black, set it to "multiply", and bring its opacity/transparency to 50%. Remember, bright red means that the unit will be practically "glowing" with sunlight in-game, so you don't want it to be too strong. In some areas, you can use a white brush on your black layer to negate the "multiply" effect, and make certain sections brighter.

Next, un-hide the team colour layer, and colour all the sections blue. Depending on the effect you want, you might bring the team colour layer above the black layer. If there is any reflectiveness you want to add, make green/yellow sections on yet another new layer. in the end, you'll end up with something like what is shown below. Before moving on, save your file in a format that supports layers again, but label it as the Specular map.


Now, save the image as a TGA, using the same naming convention as the Diffuse map, but adding "_SPM" to the end.
i.e. CBWarehouse_SPM.tga

Normal Maps

I'll refer you back to the tutorial I suggest you to read earlier (Moddb.com) because it describes a different technique for creating a normal map. He also describes them a lot better:

Koroshiya_Ichi wrote: No it's not the opposite of an abnormal map (seriously I am so dam funny). Normal Maps are used to give the appearance of indentations, subtle geometry and imperfections upon a surface which would be totally inpractical to build in actual 3D geometry. Particularly when used in Dynamic light settings they can produce fantastic results.

Now, if our model was a concrete wall, or a rock of some kind, we'd want our Normal Map to be very bumpy and full of cracks, etc. But since you're more likely texturing a sleek-looking tank, or a brick building in my case, you might just want to stick to a flat, simple Normal Map that only has lines, pipes, paneling, etc. Hey, didn't we have a layer in our Diffuse Map that contained that stuff? Hopefully you have the original file of that saved, or else you'd have to re-make it again from scratch.

Basically, colour everything but your lines, etc. layer 50% gray. Anything you want to appear indented should be re-coloured white, anything extruding be made black.

Save the file again, in a format that supports layers, as well as a TGA with the suffix "_NRM" (see Specular Map for equivalent naming convention). Now, open up Crazy bump, import your newly-created file and fiddle around with the settings until you get a decent, crisp normal map.


Save this file again, overwriting your previous file.

And now you're done making the files!

You should have:
A Diffuse Map: CBWarehouse.tga
A Specular Map: CBWarehouse_SPM.tga
And a Normal Map: CBWarhouse_NRM.tga

Applying the Textures

Now you can get those textures onto your model. Go back to 3DS Max and hit the "M" button on your keyboard to bring up the Material editor. Click the button that says "Standard", then select DirectX Shader. Select "Discard Old Material", then look below under the collapsible box that says "DirectX Shader". Click on the button beside "Reload". Now, navigate to where you saved your Red Alert 3 Shaders.

If your model is a building, choose a building shader. If it's a unit, choose an "object" shader. Since I created a building, I'm going to select the "BuildingsAllied.fx" shader. Now, you'll see that the menus below have changed. Click on the topmost button that says "None", and select your Diffuse Map texture. Do this for the other "None" boxes, replacing them with the Normal and Specular Maps.

If you're making a building, you'll notice there is a fourth texture - Damaged. This texture only displays when the building is severely damaged. Usually it looks the same as the diffuse texture, but with bullet holes and broken glass. If you want, you can use the Diffuse Map, or you can create a new damaged texture with the naming suffix "_DMG".

Select your model, then click the "Assign Material to Selection" button, and now your model should appear completely textured. If you have issues seeing the texture properly, try changing the "Technique" in the Material Editor - the default is set to high graphics quality. If you want to preview the team colour, check the box labeled "Preview House Colour Enable".


The End

Congratulations! You've finished the tutorial! Now you're set to send the .Max file, plus your three texture files (or four, including the damaged texture) to either your animator, or to the modeler so they can prepare the rest of the model for importing into the game.

If you have any comments or (more likely) questions about this tutorial, you can PM me on ModDB, or send an email to ferriswheel_@hotmail.com. If you don't get an answer right away, you can usually find useful answers at the Command & Conquer Forums, under the "Red Alert Maps and Modding" section.

Thanks for reading the tutorial! Happy modding!
~ the_ferriswheel_man

Post comment Comments
TotalSnappy Creator
TotalSnappy Sep 18 2009, 2:24am says:

you're a life saver!

+6 votes   reply to comment
DarkyPwnz
DarkyPwnz Sep 18 2009, 2:51am buried:

(buried)

I just torrented 3ds Max 9 for free -.-.Also,could you post a modding tutorial too >.<

-28 votes     reply to comment
kinesis916
kinesis916 Sep 18 2009, 10:43am replied:

Way to tell everyone you idiot.

+1 vote     reply to comment
Michael_sama
Michael_sama Sep 19 2009, 4:57am replied:

I concur. If only the village idiot could stay in the village. Anyhow, humor aside, a good way to get it legally is if you are in college. Student discounts are so handy. I'm not sure about 3D Max, but I know you can get lots of stuff cheaper when signing up for certain computer courses. Like a Microsoft OS (XP, Vista...why would you want it though, and even the new 7) for less than thirty bucks for a professional version and not the horrid home version. Though this is based from personal experience. I don't know if all college computer classes work the same.

+2 votes     reply to comment
blackmodeler
blackmodeler Sep 18 2009, 1:11pm replied:

wow! just wow!

+2 votes     reply to comment
Pimmetjuh
Pimmetjuh Sep 19 2009, 2:42am replied:

You are also going to tell us you are going to torrent or that you torrented PS won't you?

+1 vote     reply to comment
feillyne Staff
feillyne Oct 15 2009, 5:05pm replied:

Yup, student discounts are very useful. :-D You can save a good deal of money.

+2 votes   reply to comment
Lazy6pyro
Lazy6pyro Sep 18 2009, 7:36am says:

For the normal maps, I'd recommend using nVidia's Normal Map plugin for Photoshop. You get crisper results and it is the same process the RA3 devs used. Also, with normal maps, you can increase the depth by simply duplicating the layer and setting it to overlay. FYI it's backwards in some places as the normal map is popping out things that should be recessed. I would not recommend just converting your diffuse texture to normals, as per the example, the detail is very muttled and muted.

Another thing I would recommend is using Textporter plugin for 3DS Max (it's free), as it gives you the options to export out your UVs any size you want them, and produces better results.

Another good trick I have picked up is using a combo of the Smart Sharpen and Sharpen filters in PS to make the details stand out a bit more when you are ingame (they don't look great in the viewer, but make a really difference ingame).

Overall, it's a great guide for those who are new.

+2 votes     reply to comment
ferriswheel42 Author
ferriswheel42 Sep 18 2009, 8:05am replied:

I'll check out the plug-in, a lot of people have been suggesting it. We were actually directed to CrazyBump by another modder, and I've found it gives a little more control over the details.
Also, in the tutorial, I did not say to convert the diffuse map to a normal map directly. The normal map looks the way it is because of the bricks, which is a detail we want to preserve. And yes, stuff is backwards... ...
Textporter is fine and good (Open_Sketch uses it), but I find that it's really just another thing to download. If you don't know how to export UVs to an image file without it, then its usefulness decreases substantially. (PS Smart sharpen on the Normal maps? Or on everything?)

Anyway, thanks for the critique, I'll probably be editing the tutorial shortly.

+1 vote   reply to comment
Lazy6pyro
Lazy6pyro Sep 18 2009, 8:47am replied:

Use the Smart sharpen on the diffuse and spec maps. For the normals, use that overlay trick I mentioned earlier, and then combine it with a faded smart sharpen (too high of a sharpen and you will distort the colors used for the normal channel which can give you wonky results).

All in all, I really love this sort of tutorials, as I love seeing other people's workflow. Thanks a lot for writing this, though.

+1 vote     reply to comment
ferriswheel42 Author
ferriswheel42 Sep 22 2009, 6:30pm replied:

No problem! I like writing tutorials, so it all works out ^_^. I tried out the NVidia plugin, and it works fantastic. Here's what I ended up with: I35.photobucket.com
I had to use the sharpen tool a bit, but it's still pretty nice.
I'll update the image in the tutorial when I have time.
Thanks again for the tip!

+2 votes   reply to comment
FaunsUK
FaunsUK Sep 18 2009, 8:57am says:

Pretty neat stuff =D

+2 votes     reply to comment
Kimbo
Kimbo Sep 18 2009, 10:09am says:

looking good

+2 votes     reply to comment
Vikestart
Vikestart Sep 18 2009, 11:59am says:

Thanks! You're awesome =)

+2 votes     reply to comment
█Black/Brunez█
█Black/Brunez█ Sep 18 2009, 12:08pm says:

The war factory looks awesome!

+2 votes     reply to comment
Wasper
Wasper Sep 18 2009, 3:19pm says:

You don't need Max9 for it... Max8 does the job pretty well too (make sure to grab an unwrap plugin like Unwraptools 1.4 to make unwrapping way easier and faster). But I wouldn't go below Max7...
You also don't need the latest Uber-PS, PS CS2 + Nvidias dds/normal map plugin is sufficient.

+1 vote     reply to comment
ferriswheel42 Author
ferriswheel42 Sep 18 2009, 4:08pm replied:

This tutorial is for texturing models for Red Alert 3 mods. Elements of the RA3 SDK are only compatible with 3DS Max 9, including (I'm pretty sure) the DirectX shaders.

+1 vote   reply to comment
R3ven Creator
R3ven Sep 18 2009, 4:47pm replied:

no they work with 7 and 9 and i've heard it worked 8 too, but not as much as i've heard it working with 7 and 9 :P

they could work with any type, but it'd take forever to get them to work with them and i couldn't figure it out anyways -_-

+1 vote   reply to comment
EvilConker
EvilConker Sep 18 2009, 11:31pm says:

I love you man.

+1 vote     reply to comment
ferriswheel42 Author
ferriswheel42 Sep 19 2009, 12:57am replied:

I love you t--- Waitasecond.

+3 votes   reply to comment
liberty_wings
liberty_wings Oct 8 2009, 5:55pm says:

i don't understeand nothing of this tutorial! i'm too noob to do this!

+1 vote     reply to comment
dhrubo
dhrubo Oct 13 2009, 6:17am says:

I have played this game.It is awsome.

+2 votes     reply to comment
CaptTom
CaptTom Oct 23 2009, 4:11pm says:

Its always good to see some trying give info on unwrapping and texturing. It was a pain when I first started

+1 vote     reply to comment
ES_Chrizz
ES_Chrizz Nov 18 2009, 12:00pm says:

To correct the normal map. You did the normal map totally wrong. its to soft and crispy on wrong parts. Just check out the C&C3 mod sdk information about normal and spec maps

+1 vote     reply to comment
ES_Chrizz
ES_Chrizz Nov 18 2009, 12:06pm says:

Here a sample
Dump.e-studios.eu

+1 vote     reply to comment
ferriswheel42 Author
ferriswheel42 Nov 23 2009, 1:29am replied:

Obviously there are ways to perfect this. The tutorial demonstrates the basics - refining the process takes time and practice.

+1 vote   reply to comment
gr13v0u5
gr13v0u5 Jul 12 2010, 7:25am says:

I'd been looking for a tutorial like this for ages. This is saving my life. Well, I already knew about modelling, UV mapping and texturing, but the Team Colour layer was about the only thing I'd missed.

I suppose it would work for Tiberium Wars too, wouldn't it? If there's any difference compared to what's said here, or even if there's already a tutorial up for TW, please let me know.

+1 vote     reply to comment
DaKommandant Online
DaKommandant Apr 12 2011, 8:00am says:

Very handy thank you.

...............................
誰がここで日本語が好きですか? 私は誰だ。
...............................

+1 vote     reply to comment
The_splat
The_splat Aug 4 2011, 7:15pm says:

Excellent tutorial on uv unwrap although id personally recommend shader map pro for fast conversions of completed texture jobs

+2 votes     reply to comment
Post a Comment
click to sign in

You are not logged in, your comment will be anonymous unless you join the community today (totally free - or sign in with your social account on the right) which we encourage all contributors to do.

2000 characters limit; HTML formatting and smileys are not supported - text only

Icon
C&C: Red Alert 3 Icon
Platform
Windows
Developer
Infinity Realms
Contact
Send Message
Official Page
Paradoxmod.com
Release Date
Released Jul 3, 2010
Mod Watch
Track this mod
Tutorial
Browse
Tutorials
Report Abuse
Report article
Related Mods
Red Alert 3 Paradox (C&C: Red Alert 3)
Red Alert 3 Paradox C&C: Red Alert 3 - Single & Multiplayer Real Time Strategy
Related Games
C&C: Red Alert 3
C&C: Red Alert 3 Single, Multiplayer & Co-Op Real Time Strategy
Related Groups
Infinity Realms
Infinity Realms Developer & Publisher with 13 members