Modders and those interested in how to mod the Homeworld 2 Engine.

Post tutorial Report RSS Homeworld 2 Advanced Texturing Tutorial

This tutorial will cover making your own ship-textures for Homeworld 2 using the new shader 2.0 shaders. We start out with making a simple base-texture (metal) and work our way up to making panels/plating the-easy-way, textured shadow/lightning effects and making nice-looking machinery. Note that this is still a Work in Progress and things will still be addded later on.

Posted by on - Intermediate Textures

Index:
Tools and texture layers explained
Chapter 1: the Base/Diffuse texture
Chapter 2: Panels
Chapter 3: Detailing & machinery
Chapter 4: Shadows/Lighting
Chapter 5: Making the Glow textureChapter 6: Making the Normal texture
Chapter 7: Placing the texture ingame

Tools for the Job

  • - Photoshop (I use CS 2)
  • - Nvidia Normalmapfilter (v8.51)
  • - Nvidia DDS import/export plugin (v5.18)
  • - CFHodEd
  • - CFHodEd TANGENT (older version of CFHodEd wich has the tangent calculators necessary for parallax mapping)


Tools and texture layers explained:

Stock Homeworld 2 texture layers
The vanilla shaders use two textures: Diffuse and Glow.

$Diffuse - the base texture
Red/Green/Blue - normal RGB colors of the texture.Alpha - Team Color
$Glow - basic shading texture
Red - UnusedGreen - Luminosity DataBlue - Specular DataAlpha - Team Stripe

Shader 2.0 texture layers

The new shaders use three textures: Diffuse, Glow and Normal.(thanks to CnlPepper for explaining this!)

$Diffuse - the base texture
Red/Green/Blue - normal RGB colors of the texture.Alpha - Team Color
$Glow - basic shading texture
Red - GlossinessGreen - Luminosity DataBlue - Specular DataAlpha - Team Stripe
$Normal - Bump mapping/Parallax-mapping texture
Red - S TangentGreen - T TangentBlue - N TangentAlpha - Height Map for Parallax Mapping

Chapter 1: the Base/Diffuse texture
Before anything else a good texture-base can make a big difference. If you are just starting with texturing, the easiest way is to either search some textures on Google or to copy some stock-homeworld 2 textures. For example: I used photo's from NASA of the ISS and space-shuttles to make a base-texture for the Human ships.

However: we want to build a brand new texture from nothing so we are going to begin by opening our UV-map image file (I use Wings3D where I export my UV-map as BMP). However, the image is imported as a "background" layer, that can't be edited properly.

Select the canvas and copy/paste so a duplicate of the UV-map image is created. Then you can delete the "background" layer and then create a new layer beneath the new UV-map layer.
Name this layer "Diffuse" and fill it with the base color for your texture (I often use dark-grey).Go to Filter > Noise > Add Noise.In the dialog box, enter these values:Amount: 25Select GaussianSelect Monochromatic
Now go to Filter > Blur > Motion Blur and experiment with the Distance value, but leave the angle value at 0. I used 35 for the distance. If you want a "brushed metal look" use a value around 300. There you have a very basic metal texture. You can change the color by adjusting the Hue/Saturation.

Chapter 2: the Panels
Now that we have our base we want to create some nice panels on our ship. There are multiple types of panels one can make but here is how I made the panels for the Human ships in Draconian Empire:
First of all make sure your brush-color is set to 100% black, this is essential for this technique.Select the Rectangle Tool (or press ‘U' on your keyboard) and select the shape you want to use for your panels (probably the square shape). Set the brush type to "Shape Layers" (the little square with the points on its corners-button).

Then set the Style to "With Blue Down State" wich is essentially an Pillow Embossed square, you can find this style in the "Rollover Buttons" preset gallery.Now draw a nice shape/square/whatever you like.
Now you have an pillow-embossed, black, shape but we are not done yet: set the Blending Mode of the new shape-layer to "Screen". Now only the shadow/light features of the shape remain, making for a nice panel-effect. This can be done using colors instead of black too, the effect will of course be different, just experiment.

Chapter 3: Detailing & making machinery
Now that we have a simple texture with some nice panels on there, lets add some nice details like vents, construction, machinery, engines, battle-scars/dirt & whatnot!

What also makes for a nice authentic texture is adding a bit of dirt to it. I often use brushes like "Starburst" for impact-scarring (from impacting space-debris etc) set to black with a transparency of about 32%. Again, this is mostly learned by experimentation.
Most of the time I use shapes to make all kinds of panel-like things on there, combined with the Stamp-tool to literally paint photo's (from the internet) on my texture. The best way to discover way to make certain effects or ‘objects' is to experiment combining several shapes with different blending settings.

Chapter 4: Shadows & Lightning effects
Of course, when it comes to shadows/lightning a lot is handled by the HW2 engine/shaders. However when making, say, a light on the texture, it is best to actually draw this light on the texture itself. Then when making the $Glow layer in your texture (see Chapter 5) give that lighted part a really bright green brush.
This makes for a nice lightning effect, without actually having to make a light there later in the ship's HOD-file. This also makes the model less CPU-intensive.
Now that your $Diffuse layer is done you can go to File > Save As and save it as an DDS. For this tutorial let's just use "mytexture.dds".

Chapter 5: the Glow texture
When you are finished making your awesome new texture it's time to make the $Glow layer.This layer sets the specular, glow(lightning) and glossiness properties of a texture.
The best and easiest way (for me at least) is to make the texture as follows:- Duplicate your $Diffuse layer and rename the duplicate to $Glow. - While having the $Glow layer selected, go to Image > Adjustments > Brightness/ContrastHere, set the Contrast to 50. It is wise to make all your glow layers with this same Contrast-number, so that all your ships look the same lightning-wise.
- Now go to Image > Adjustments > Channel MixerHere, set the Red & Green channels to zero. This will make your Glow texture all nice and blue.Now the base for the $Glow texture is set. Next is the Green channel of this texture, which tells the shaders in game if a part of a texture is glowing. I.e. windows that emit light, lights themselves or other glowing parts that emit light on your ship.

To do this I often just use a "Soft Mechanical" brush with an 100% green color. The transparency depends on how glowy you want a part to be. The greener the brighter the light.
After you are done with making all these nice green parts on your Glow texture there is a glossiness color to add! Now the Color Channel for this is Red but I use the color pink rather than red. The reason is that i have had nicer results using this (look at the solar panels on the Human Frigate). Applying this color is the same as adding the glow/green colors to the Glow texture: just draw them!
Now you can save this layer as "mytexture_light.dds".

Chapter 6: the Normal texture
Now this is the most important part of the Shader 2.0 textures because it adds some REALLY nice bump mapping and even better: Parallax mapping!
Making this texture is pretty easy but there are some things that you need to do right, otherwise you'll get some really WEIRD results (believe me XD).

Again, duplicate your $Diffuse layer and rename the duplicate to $Normal.Now we are going to use the awesome Nvidia Normalmapping-plugin.
Go to Filter > Nvidia Tools > NormalMapFilter.The settings here are REALLY important, you only need to set then once though as the plugin remembers your settings.
First make sure that the ONLY following options are set to ON (from left to right):- Add Height to Normal MapHeight Generation:- Invert X- Invert Y- 4 sampleHeight Source:- Average RGBAlpha Field:- Set to 1.0

I usually set the Scale (Height Generation) to 7, but values from 2 to 9 work nicely.
Now press ‘OK' and you'll see a nice Normal map in your $Normal layer!But we are not done yet, after all: the Shader 2.0 shaders need an Alpha channel to work properly. If this layer is not present the whole texture will shift over your model, making it all wobbly and weird.
With your $Normal layer still selected, go to Channels (little tab above the layers window) and make a new layer, this new layer will automatically be named Alpha so don't change this.Now if you just want to use bump mapping you can fill this Alpha layer with basic Grey, wich should be:R = 127G = 127B = 127

However if you want certain features (panels etc) to actually ‘stand out' on your texture so that it looks like it's part of the actual model then its Parallax mapping for you! It is advisable to do this as a last stage of your texture, AFTER you have exported the $Diffuse and $Glow layers to DDS format.Again it is pretty simple: basic Grey (RGB: 127,127,127) tells the Shader 2.0 shaders that this part of the texture is at zero height. Darker then basic Grey tells the shaders that this part of the texture his lower/sank into the ship. Lighter then basic Grey means its higher. I usually just draw squares over these parts with the appropriate grey-colors.

Now go to Layer > Save layer as Background to convert the Normal layer to a background layer. Now make sure that all the the layers channels are on (the layer will become red-ish when they are all on)
Again, use File > Save As to save this as "mytexture_normal.dds"After saving undo the converting to background action so you can change the Normal layer when you want to later on.Now we are all done and set!

Chapter 7: Placing the textures ingame
Now as you have probably noticed I used _light and _normal in the names for the $Glow and $Normal textures. This is just to keep everything nicely ordered and to easily recognize the textures. Now lets go to CFHodEd!
Import the three textures and create a new material (or set your current material) with the following properties:- Shader name: matte- Parameters: $diffuse, $glow and $normalThen set each texture to its corresponding parameter.
Now we still need to have the Tangent calculations done for the Parallax shaders to work properly so open up CFHodEd TANGENT and open the ships HOD file. Then just press Save and you are done!
Go play Homeworld 2 and enjoy your beautiful new texture!

Post comment Comments
Patrick03d
Patrick03d - - 3 comments

where to get the new shader?

Reply Good karma Bad karma+1 vote
EvilDraggie Author
EvilDraggie - - 142 comments

the new shaders are in my mod, dont remember where i got the original CnLPepper shaders tho.

There is a Babylon5 (star trek) mod of HW2 on here wich uses the newest shaders too.

Reply Good karma+1 vote
880Zero
880Zero - - 2,557 comments

Very good tutorial. However, what brushes do you normally use for dirt and scrapes if I may ask?

Reply Good karma Bad karma+1 vote
EvilDraggie Author
EvilDraggie - - 142 comments

thanks!

i use various brushes, mostly the more complex brushes such as:
Starburst, Texture 4 1, Texture Comb 3 1. Often combined with settings for Shape Dynamics and Scattering to give the brush a random feel.

Reply Good karma+1 vote
Guest
Guest - - 689,460 comments

This comment is currently awaiting admin approval, join now to view.

thomas39120
thomas39120 - - 604 comments

Guten Morgen, Ich suche eine Anleitung zum erstellen von Glow Textur für Modele in Photoshop , Ich habe genügend selbergebaute Modelle Samt Texturen (habe Mods für EAW Foc gemacht), Kann mir dabei jemand weiterhelfen

Good morning, I'm looking for a tutorial for creating Glow texture for Modele in Photoshop, I have plenty myself built models velvet textures (have mods for EAW Foc made), Can anyone here help me

Reply Good karma Bad karma+1 vote
Post a comment

Your comment will be anonymous unless you join the community. Or sign in with your social account: