This guide will show you how to make new clothing
texture maps for the avatars in The Red Light Center. We will be using Adobe Photoshop 7.0 but you could achieve the same results using the freely available image editing program
The Gimp.
Adding a t-shirt logoLets start by adding a logo to an existing t-shirt for the male avatar. Here is the
Photoshop file if you wish to examine it more closely.
In image above you can see the the skin, t-shirt and a blue wireframe overlay. The blue lines are the UV coordinates for the male avatar model. The left side of the image is the front of the t-shirt, the middle is the back of the t-shirt and the right side contains the arm. Notice that there is only a single arm in this image. For this model the single arm is used on both sides of the avatar. This was to save texture map RAM. What this means is that both arms will always have the same texture.
Alpha channelsThe Red Light Center game engine composites the clothing textures on top of the underlying skin textures. To make your clothing show properly in the game engine you have to create an alpha channel. In the alpha channel of you cloth texture fully white pixels are opaque and fully black pixels are completely transparent. Any values between full white and full black specify a range of transparency/translucency. Below is the alpha channel for our t-shirt. Red Light Center now uses PNG image format for textures that require transparency. Due to the way alpha is used with PNG files in Photoshop you should keep a backup source file in Photoshop format and a 2nd in .png format that you will use in game.
If you wanted to have a sleeve-less t-shirt you would paint the area at the top of the arms black.
Working with seamsThe UV coordinates for this particular model are a combination of straight projection and unwrap texture mapping. To make a nice seamless texture you have to ensure that the color along the seam edges are the same. The corresponding seams are highlighted in the image below to help you visualize the process.
- The green lines show the matching seam areas for where the t-shirt sleeve meets the t-shirt
- The red lines show where the sides of the t-shirt come together
- The violet lines show where the top of the t-shirt on his left side
[The yellow lines show where the seam of the t-shit is on his right side
Adding a logoWe have added a Red Light Center logo to the front of our t-shirt as a Photoshop layer.
Setting up AlphaTo set up the alpha channel to export your image with alpha properly is a bit tricky in Photoshop.
First you need to create a layer mask.
Activate the layer mask.
Copy the Alpha channel and then paste it into the Layer Mask
To see the result of the layer mask click on the Layer thumbnail.
To have you new texture show up in the game engine there are some specific guidelines you must follow:
- You must save the image as a PNG format image file
- For shirt/torso textures the image must be 512 x 256 pixels in size
- You must make a unique name for your image, and it must start with "HMUT_"
- Male textures are saved in the folder:
C:\Program Files\RedLightCenter\resources\male\textures In Photoshop go to File->Save As and select PNG in the Format drop down list. For this example I saved the file as HMUT_shirt_t_logo.png
This will (depending on the version of Photoshop you are using) bring up a second File Save Dialog.
Make sure in "Interlace" "None" button is selected.
Adding the shirt to the gameTo see you new clothes in game open the following file in a text editor:
C:\Program Files\RedLightCenter\myinfo.ini
Scroll down to the section that says TorsoMapDecal= and change the name to your new shirt texture HMUT_shirt_t_logo.png
[b]
[UserInfo]
WLogonName=mars@prototerra.com
WPassword=
Language=English
GUI=Default
displayTips=True
PlayWorldSounds=True
displaySexSpeedChat=True
[Model]
WUserName=mars
mesh=HM.msh
HeadMap=HMCH001_Spencer.jpg
EyeMap=HMUE_green.jpg
TorsoMap=HMCT001_Spencer.jpg
LegMap=HMCL001_Spencer.jpg
headMapDecal=HMUH_facial_hair_chin.png
eyeMapDecal=
TorsoMapDecal=HMUT_shirt_t_logo.png
LegMapDecal=HMUL_jean_black.png
HeadMesh=HM_Hair_Mid_MedLengthBrown.msh
HeadState=idle
HeadAttachedAs=WEARING
FaceMesh=
FaceState=
FaceAttachedAs=
RightWristMesh=
RightWristState=
RightAttachedAs=
EarMesh=
EarState=
EarAttachedAs=
WearingMesh=
WearingState=
WearingAttachedAs=
ShoulderMesh=
ShoulderState=
ShoulderAttachedAs=
FootMesh=
FootState=
FootAttachedAs=
1stPerson=False
Scale=1.1
[machine]
TextureDetail=High