Marine Bot banner

Using Marine Bot to work with the detail textures

The Detail Textures

Detail Textures are Half-Life 1 engine tool to improve the visual quality. I mean that the tree trunk has a real bark now instead of just flat colored shapes. Or the wall now shows real structure even with cracks instead of low quality flat texture with blurred something that hardly appears as a crack. Actually it is only the Steam version of Half-Life 1 that allows such detail textures in game. Also you will need to have a GPU (video card) that supports this feature to be able to use and see them in the game. Half-Life 1 is pretty old game engine so unless you have really ancient computer you should be fine and you'll be able to turn this feature on. To check whether your computer can handle this you will need to open the console (by default the tilde key) and type in the following command: r_detailtexturessupported. If the console returns "r_detailtexturessupported" is "1" then your computer can handle this feature. So you can activate them by typing r_detailtextures 1 into the console. Now if you are on a map with detail textures (obj_armory or obj_sweden in Firearms 3.0) you should already see them around. It's especially visible on wooden surfaces or the sandbags. If you want to see the real differences you can always get close to some wooden furniture like a table and use the console to type in r_detailtextures 0 to turn the Detail Textures off. You'll see just the original usually blurred textures. Then turn the Detail Textures on again to see the rich wooden structure. Often it will be huge difference in the visual quality that helps to immerse into the game world and makes it believable.

Marine Bot and Detail Textures

Now you may ask what does this have to do with Marine Bot. Well not all the maps in Firearms do have the Detail Textures. And the way how do the Detail Textures work doesn't make it all that easy to add them to such maps. Finally seeing that Firearms is dead mod there's basically no chance that the original authors will ever add the Detail Textures even to the maps that don't have them now. Or that there will be Detail Textures for your favourite custom maps or maps from old Firearms 2.5 for example. So this is where Marine Bot provides a tool that will help you in creating your own Detail Textures for such maps. Yes you can create the Detail Textures on your own if you have the will and you know how to do it.

How do the Detail Textures work

The way how do the Detail Textures work is actually pretty simple. They are some sort of an overlay to the original map textures. Usually the Detail Textures are in a form of black & white pictures of the material structure that are then linked to the original map textures to be displayed together in the game world. What is cool about it is fact that the tool that links all together is just a simple text file with the names of the original textures, the names of the Detail Textures and the roughness in X and Y axis. This text file is located in your ...\firearms\maps folder and is named <mapname>_detail.txt (e.g. obj_armory_detail.txt). The Detail Textures themselves are located in ...firearms\gfx\detail and they are a TGA file format. And like I said they are usually black & white in order to only add the material structure without affecting the original texture color and brightness. However this isn't all that true, because the more blackish the Detail Texture is the darker will the original texture look like in the game. And vice versa. So if the Detail Texture has a lot of white in it then the original texture will be brighter and will shine more in the game.

Adding the Detail Textures to a new map

First thing you need to do is go to your ...\firearms\maps folder and create a new simple text file. Name it <mapname>_detail.txt so for 'obj_paradise' it would be obj_paradise_detail.txt. Open this new file for editing. Now go to your ...firearms\gfx\detail and leave it open in your file browser in order to see the names of available Detail Textures. Make sure you have Marine Bot installed in your Firearms and start the game on your map (in our case on obj_paradise). If you are using default configuration then wait till all the bots join the game and then kick them all off the game by typing 'kickbot all' (without the quotes) into the console. You don't need them to play the game now, but you need Marine Bot system to be able to get the real game texture names. Get close to the first rock you see, face it and aim at it. Now open the console and type in this command 'gettexturename' (without the quotes, BTW 'get_texture_name' works too). The console will return something like this: the name of the texture in front is "mz_cliff34". The string inside the double quotes is what you are looking for. That is the true name of the original game texture you need. Now you can select it and through clicking right mouse button pick 'copy' like if you were working in your operating system. Switch from the game back to your operating system and paste the selected texture name to the obj_paradise_detail.txt. Now switch to your file browser and go through the ...firearms\gfx\detail till you find a Detail Texture with a word 'rock' in its name. You'll find one named 'swe_rock2.tga'. Switch back to obj_paradise_detail.txt, click behind the 'mz_cliff34' string and make a space (I recommend at least two tabulator spaces). Now type the following string detail/swe_rock2. Make another tabulator space and type 3.5. Then another tabulator space and type 3.5 again. So the whole line looks like this:

mz_cliff34		detail/swe_rock2	3.5	3.5

This is the link that will map the Detail Texture named 'swe_rock2' to original game texture named 'mz_cliff34'. The two numbers at the end of the line represent the roughness in X and Y axis. Which means how many times will the 'swe_rock2' be applied to 'mz_cliff34' in each axis. Most of the times the textures are squarish so you will use equal numbers for the best result. But there may be times when the Detail Texture will look really weird so you'll have to experiment with these values to get desired result. Now when you have the link ready you must save obj_paradise_detail.txt so that Steam Half-Life 1 engine can read it when it is loading the map. Once you've saved the file you can switch back to the game. You won't see anything new in the game, because as I said the Detail Textures are loaded when the map loads. So open the game console and type 'restart' (without quotes) to start a new game on this map. After the restart you'll finally be able to see this Detail Texture on the rock as well as on every other game object (surface) that uses 'mz_cliff34' texture. If you are happy with the roughness (the amount of detail) then you can go to different game object that uses different texture and repeat the above steps to apply a new Detail Texture on it. Just make sure that each texture is on a new line. Don't worry if you use the same Detail Texture for more than one original game texture. Actually that is pretty common case, because there aren't many Detail Textures inside ...firearms\gfx\detail to work with. Also be creative and feel free to try using even Detail Textures that don't match the exact structure. There are cases when the result is better if you use Detail Texture created for different material structure then if you would've tried to strictly stick to matching material. See this:

sulcurb1		detail/thtrim2		1.0	1.0
suldirtstreet1		detail/swe_rust1	6.0	6.0
sulfence1		detail/thbeam1		10.0	10.0

For the dirt street I used Detail Texture for metal rust. And for wooden fence I used Detail Texture for a big metal beam from tc_thebes.

Updating existing Detail Textures

As you may have already guessed you can always edit the Detail Textures simple text file. Any change you do will take effect after restarting the map so even if you just tweak the roughness you'll have to restart the map to see whether your tweaks were good or bad. If you decide to use different Detail Texture then the roughness may not fit at all. This is actually quite tiring task, but if you take the time to fine tune even the roughness the overall quality will improve a lot.

Using custom Detail Textures

Well you can add your own (self made or downloaded from Internet) Detail Textures to the simple text file, but then you'll have to create complete zip archive if you decide to upload them somewhere for others to use. If you download some of my creations then you would see that it's always a full folder structure inside the zip file, because I tend to use some custom Detail Textures. I've downloaded some from the Internet and I've also created a few on my own. I have never been able to find nice Detail Texture for the grass so I simply created my own and started to use it in all my Detail Texture packages. I first used it on ps_marie for its original purpose as a grass, but then a modified version of that texture did fit well even for the hay on the ps_river. Also I often use custom Detail Textures for tc_thebes from AirWolf, because they go nicely with many of the default Firearms Detail Textures. Custom Detail Textures are cool, but you must make sure that you've included them too if you decide to share your work with others.

A list of Firearms 3.0 maps that come with Detail Textures by default

This is a list of maps that do have the Detail Textures so if you use just those then you won't have any problem when you share your work with others, because everyone who installs Firearms 3.0 has them.

Basically it's the armory and sweden that have unique Detail Textures. All other maps are using them. Or are using a modified version with unique name and slightly different appearance or rotated by 90 degree so it can be useful sometimes.

Do you want to know more?

Following link will get you to Marine Bot homepage where you can find more guides like this one.

by Frank McNeil 2005-2024


end of file