Originally posted here: Planetshogo.com
Created by: Malcolm Andrieshyn
Mirrored here for archival purposes
Tutorial written by:
Okay dudes, here's a tutorial that will show you how to set up chrome mapping for player models and world objects in the Lithtech gaming engine. This tutorial will be useful for people who want to chrome map their custom textures for Shogo and BloodII. I'm writing this tutorial 'cause it took me four days to figure out how the chrome mapping worked in the Lithtech engine and that was a big waste of time 'cause if someone would've explained it to me it would've taken about ten minutes, also there's a big lack of Lithtech editing tutorials as far as custom textures or models are concerned. If you're just starting to learn how to edit Shogo or BloodII and you don't know what a .rez file is or how to unpack them this is not going to a be useful tutorial for you to read. Go to www.planetblood.com or www.planetshogo.com and download the Lithtech tools and then read the tutorials on how to make custom .rez files. I suggest you download the Lithtech tools for BloodII 'cause I had some problems with one of the plugins in the 3rd release of the Shogo tools.
Things you WILL need to setup a chrome mapped texture in Shogo or BloodII:
-Paintshop Pro 5.0 (Note, you will only need Paintshop Pro if you want to edit existing textures in the game, if you're going to make your own custom textures you DON'T need this program.
-dtxformat.8bi (Note, make SURE this file is in your Photoshop plugins\file formats directory.
Okay, this is where the tutorial starts. I'm going to explain how to chrome map an existing texture in BloodII so the file names are going to be specific to that game, but you can apply this tutorial to Shogo too. (Note, if you want to chrome map a texture that is not currently chrome mapped you will have to change the actual code in the game, I don't know how to do this 'cause I'm an artist not a programmer. As far as I know the code in the game tells the game which textures to apply chrome mapping to so if you want to make a texture that is completely new and you want it to be chrome mapped you'll have to get your programmer to assign that texture to be chrome mapped. This tutorial will show you how to set up the chrome mapping for textures in the game that are already assigned to be chrome mapped. For example, if all you wanted to do was make a new mech in Shogo and you wanted it to be chrome mapped all you would have to do is put a texture in the game that has the same name as the old texture that has already been assigned to be chrome mapped by the code that the dudes at Monolith wrote, you'd also have to name your new model the same as the old model. This would replace both the texture and the model but the code would still know to chrome map the texture 'cause it would think nothing had changed. I think that's how it works any ways.
(1) Okay, the texture we're going to be editing is going to be the default gun texture for Caleb. The name of the texture is C_BERETTA_PV_T.dtx. The "C" stands for Caleb and the "PV" stands for perspective view I think and I'm not sure what the "T" stands for. Any ways, open DEdit and load up the file blood2.dep. Click on the textures tab and then click on the little plus sign next to the skins folder. This should bring up a lot of other folders, so now you want to click on the weapons folder. This should bring up all the weapons textures in the game. Click on the file called C_BERETTA_PV_T and it will appear in the viewing window. Left click on the texture's file name and choose export pcx file. A window should appear asking you where you want to save the file so just save it where ever you want but remember where it is. You can close DEdit for a while now if you want. Use Paintshop Pro to open the .pcx file you have just saved, if you try to open it with Photoshop it won't work 'cause it's corrupted, only Paintshop Pro will work 'cause it can work with pallettes better than Photoshop. Okay, now that you have C_BERETTA_PV_T.pcx open in Paintshop Pro save it as a .jpg file. After you save the file as C_BERETTA_PV_T.jpg you won't ever have to use Paintshop Pro for the rest of this tutorial so you can close it now.
(2) Open Photoshop and then open the file called C_BERETTA_PV_T.jpg, or if you are making a custom texture open a new file, remember that the largest texture that will go in the game is 256x256. As far as I know the reason for this is that 3dfx doesn't support anything bigger, some of the newer games like Unreal Tournament are skinning important things like player models with four 256x256 textures but BloodII and Shogo only support one texture per model. If you have trouble painting small texture try working with a 256x256 texture and zoom in to 200%. I used to paint my textures at 512x512 and then shrink them down but you lose a lot of detail and they get pixelated. Paint what ever texture you need, here's the normal C_BERETTA_PV_T.jpg that I'm using for this tutorial.
(3) Okay, open the file called C_BERETTA_PV_T.dtx, you can find this file in your Rez\Skins\Weapons assuming you extracted the blood2.rez to a folder called "Rez" like I did. Now that you have it open notice it's all black and white and looks like this.
Click on the channels tab in photoshop and notice that the black and white .dtx file has an alpha channel that looks like this.
This is the part that confused me in the beginning. The black and white .dtx file is actually color, you just can't see it in Photoshop 'cause of the way it deals with channels or something. That's why we had to export the file as a .jpg in Paintshop Pro first so we would have a color version to edit, but why did we have to export to .pcx first? We had to do that 'cause DEdit doesn't export anything else. And REMEMBER, if you you want to paint a whole new texture without editing the old one, then you don't have to do any of the previous steps all you have to do is start painting. Okay, so now you know the black and white image is actually color, but what does the alpha channel do? The alpha channel is what determines how much of the texture to chrome map. Lithtech takes 256 shades of grey to determine what is shiny and what is not. Just think of it this way, black = 100% shiny and white = 0% shiny. Everything in between is different shades of shiny. Now that you know this look at the alpha channel of the .dtx file again
and notice parts like the handle of the gun and where the hands would be are 100% white so they don't come out shiny 'cause Caleb's hands aren't made out of chrome.
(4) Now you know how the chrome mapping works but it's not as easy as just making an alpha channel and then saving as .dtx for a custom texture. Open up the C_BERETTA_PV_T.jpg file again and then open a new file and make a chrome map for it that is a grey scale image, REMEMBER black = 100% shiny. This is the the color .jpg I am using and this is the chrome map I made.
By looking at the chrome map I made you can tell that the hands will be 0% shiny and the gun will be 100% shiny, this is a bad example 'cause the edges of the texture are black and so is the background for this page, so when you look at the texture remember it's a 256x256 image, not a small white square.
(5) Now that you have your regular color texture and your greyscale chrome map save both these files as .pcx files. Make sure you have decreased the color depth to indexed color for the C_BERETTA_PV_T.jpg file first, when asked choose "dither/none," "pallette adaptive," "color depth/8bits per pixel" and "color matching/best" Make a BACKUP copy of your original C_BERETTA_PV_T.dtx first 'cause you will have to overwrite it in the next step. Open DEdit and load the blood2.dep and then click the textures tab and then open skins and highlight C_BERETTA_PV_T and left click on it. Choose to import .pcx files and then import C_BERETTA_PV_T.pcx and enter the texture flag "0" 'cause that was the flag for the old texture. If you want to find out a texture's flag number left click on it and choose texture properties. DEdit will ask you if you want to overwrite 'cause it has the same name as the existing file and you have to say yes 'cause you are replacing a texture in the game with the one you just made. You might notice that you have two C_BERETTA_PV_T texture now, this is a bug and you will have to restart DEdit to fix this. Restart DEdit and click the textures tab, skins, weapons. Left click the C_BERETTA_PV_T texture and choose import alpha mask and then choose to import the greyscale .pcx alpha mask you painted in Photoshop.
(6) All you have to do now is make a .rez file that has your newly edited C_BERETTA_PV_T.dtx file in it. This is what the guns ended up looking like when I set the chrome map for the guns to be 100% by painting them completely black in Photoshop.
Okay, cool, thats it, I hope this helps some people out, hopefully it will save you a lot of time. If you have any questions you can e-mail me at email@example.com