Detail Textures for NS?
Mouse
The Lighter Side of Pessimism Join Date: 2002-03-02 Member: 263Members, NS1 Playtester, Forum Moderators, Squad Five Blue, Reinforced - Shadow, WC 2013 - Shadow
<div class="IPBDescription">(was: "A Question For XP-Cagey")</div> r_detailtextures (0,1)
according to what I could find from a quick google
r_detailtextures does the following
<!--QuoteBegin--></div><table border='0' align='center' width='95%' cellpadding='3' cellspacing='1'><tr><td><b>QUOTE</b> </td></tr><tr><td id='QUOTE'><!--QuoteEBegin-->A detail texture is a very small, fine pattern that is faded in as you approach a surface, for example wood grain, or imperfections in stone. It will improve visual quality although it will cause a performance hit especially on older machines.<!--QuoteEnd--></td></tr></table><div class='postcolor'><!--QuoteEEnd-->
When entered into the console after a map is loaded
<!--QuoteBegin--></div><table border='0' align='center' width='95%' cellpadding='3' cellspacing='1'><tr><td><b>QUOTE</b> </td></tr><tr><td id='QUOTE'><!--QuoteEBegin-->] r_detailtextures 1
Loading Detail Textures...
No detail texture mapping file: maps/ns_veil_detail.txt<!--QuoteEnd--></td></tr></table><div class='postcolor'><!--QuoteEEnd-->
My question is twofold
1) Can we utilise detail textures in NS?
2) If so how would we go about using them?
according to what I could find from a quick google
r_detailtextures does the following
<!--QuoteBegin--></div><table border='0' align='center' width='95%' cellpadding='3' cellspacing='1'><tr><td><b>QUOTE</b> </td></tr><tr><td id='QUOTE'><!--QuoteEBegin-->A detail texture is a very small, fine pattern that is faded in as you approach a surface, for example wood grain, or imperfections in stone. It will improve visual quality although it will cause a performance hit especially on older machines.<!--QuoteEnd--></td></tr></table><div class='postcolor'><!--QuoteEEnd-->
When entered into the console after a map is loaded
<!--QuoteBegin--></div><table border='0' align='center' width='95%' cellpadding='3' cellspacing='1'><tr><td><b>QUOTE</b> </td></tr><tr><td id='QUOTE'><!--QuoteEBegin-->] r_detailtextures 1
Loading Detail Textures...
No detail texture mapping file: maps/ns_veil_detail.txt<!--QuoteEnd--></td></tr></table><div class='postcolor'><!--QuoteEEnd-->
My question is twofold
1) Can we utilise detail textures in NS?
2) If so how would we go about using them?
Comments
Here's the shot I saw with them implemented. You can see there's some added stuff going on there, but really it's not very good at all. <!--emo&:(--><img src='http://www.unknownworlds.com/forums/html//emoticons/sad.gif' border='0' style='vertical-align:middle' alt='sad.gif' /><!--endemo--> Hopefully that's just poor implementation and not the system itself.
come on guys HL1 is over 5 years old now....based on an even older engine (Q2) cut it a little slack <!--emo&:D--><img src='http://www.unknownworlds.com/forums/html//emoticons/biggrin.gif' border='0' style='vertical-align:middle' alt='biggrin.gif' /><!--endemo-->
\czero\gfx\detail\dt_wood3.tga and
\czero\maps\de_torn_cz_detail.txt
so it looks like you'll need to do the following to get detail textures in NS:
- Create detail textures and save as ns/gfx/detail/dt_texname.tga
- Create the file ns/maps/mapname_detail.txt
- Make sure r_detailtextures is set to 1
The only thing we need to know now is the format of the .txt file and any special requirments for the TGAs.
A shield like that would be kind of weird. I mean just think of a marine climbing up a ladder with gear and shield... That tree however looks mighty fine btw.
A shield like that would be kind of weird. I mean just think of a marine climbing up a ladder with gear and shield... That tree however looks mighty fine btw. <!--QuoteEnd--> </td></tr></table><div class='postcolor'> <!--QuoteEEnd-->
Come on, someone like Cagey or another from the dev team answer us, pretty please? I wanna know!!
~ DarkATi
And it's not my fault that Cagey or another from the dev team hasn't answered yet, come to think of it I dont see them online yet <!--emo&:D--><img src='http://www.unknownworlds.com/forums/html//emoticons/biggrin.gif' border='0' style='vertical-align:middle' alt='biggrin.gif' /><!--endemo-->
I would love to know it to, so yeah please!!! tell us <!--emo&:)--><img src='http://www.unknownworlds.com/forums/html//emoticons/smile.gif' border='0' style='vertical-align:middle' alt='smile.gif' /><!--endemo-->
And it's not my fault that Cagey or another from the dev team hasn't answered yet, come to think of it I dont see them online yet <!--emo&:D--><img src='http://www.unknownworlds.com/forums/html//emoticons/biggrin.gif' border='0' style='vertical-align:middle' alt='biggrin.gif' /><!--endemo-->
I would love to know it to, so yeah please!!! tell us <!--emo&:)--><img src='http://www.unknownworlds.com/forums/html//emoticons/smile.gif' border='0' style='vertical-align:middle' alt='smile.gif' /><!--endemo--> <!--QuoteEnd--> </td></tr></table><div class='postcolor'> <!--QuoteEEnd-->
Hit quote instead of reply. :\
~ DarkATi
Here's the shot I saw with them implemented. You can see there's some added stuff going on there, but really it's not very good at all. <!--emo&:(--><img src='http://www.unknownworlds.com/forums/html//emoticons/sad.gif' border='0' style='vertical-align:middle' alt='sad.gif' /><!--endemo--> Hopefully that's just poor implementation and not the system itself. <!--QuoteEnd--> </td></tr></table><div class='postcolor'> <!--QuoteEEnd-->
It looks like the detail textures are being faded in far too early, as I can see them blurring the heck out of distant rock faces. Unreal Warfare (UT2k3) fades them in relatively close, and it's main benefit is that it covers up the pixelation that occurs when you stare at a texture up close (Like a wall in front of you, the floor under you, etc.). To add it to distant textures just makes a mess of everthing.
So I say it's poor implementation.
Quake 1 actually, with the Quake 2 renderer. :P
come on guys HL1 is over 5 years old now....based on an even older engine (Q2) cut it a little slack <!--emo&:D--><img src='http://www.unknownworlds.com/forums/html//emoticons/biggrin.gif' border='0' style='vertical-align:middle' alt='biggrin.gif' /><!--endemo--> <!--QuoteEnd--> </td></tr></table><div class='postcolor'> <!--QuoteEEnd-->
Its mostly Q1, but thats not what im replying about.
Q1 is older, sure, the full source is released, but it looks a lot damn prettier now than HL, and most current games. Both Tenebrae(nq) and Fuhquake(QW) challenge any current engine, Tenebrae blows most, well, all, away. Challenged only really by DOOM3, which isnt released.
Meaning of this rant is that age doesnt count for anything in this buisness <!--emo&;)--><img src='http://www.unknownworlds.com/forums/html//emoticons/wink.gif' border='0' style='vertical-align:middle' alt='wink.gif' /><!--endemo-->
Quake 1 actually, with the Quake 2 renderer. <!--emo&:p--><img src='http://www.unknownworlds.com/forums/html//emoticons/tounge.gif' border='0' style='vertical-align:middle' alt='tounge.gif' /><!--endemo--> <!--QuoteEnd--> </td></tr></table><div class='postcolor'> <!--QuoteEEnd-->
So surely Half-Life is Quake 1.5 ?
according to what I could find from a quick google
r_detailtextures does the following
<!--QuoteBegin--></div><table border='0' align='center' width='95%' cellpadding='3' cellspacing='1'><tr><td><b>QUOTE</b> </td></tr><tr><td id='QUOTE'><!--QuoteEBegin-->A detail texture is a very small, fine pattern that is faded in as you approach a surface, for example wood grain, or imperfections in stone. It will improve visual quality although it will cause a performance hit especially on older machines.<!--QuoteEnd--></td></tr></table><div class='postcolor'><!--QuoteEEnd-->
When entered into the console after a map is loaded
<!--QuoteBegin--></div><table border='0' align='center' width='95%' cellpadding='3' cellspacing='1'><tr><td><b>QUOTE</b> </td></tr><tr><td id='QUOTE'><!--QuoteEBegin-->] r_detailtextures 1
Loading Detail Textures...
No detail texture mapping file: maps/ns_veil_detail.txt<!--QuoteEnd--></td></tr></table><div class='postcolor'><!--QuoteEEnd-->
My question is twofold
1) Can we utilise detail textures in NS?
2) If so how would we go about using them? <!--QuoteEnd--> </td></tr></table><div class='postcolor'> <!--QuoteEEnd-->
Good morning <!--emo&:)--><img src='http://www.unknownworlds.com/forums/html//emoticons/smile.gif' border='0' style='vertical-align:middle' alt='smile.gif' /><!--endemo-->
To answer the questions,
1) Since it's something that must be toggled on, the only deterimental effect I see it having for most people would be an increased download size; I don't think that's a big problem, especially for maps that are distributed separately from the mod. I don't see a reason why you can't include detail textures with an NS map at the moment.
I wouldn't put too much effort into a set of detail textures, however; I doubt most users would ever turn them on and I'd hate to see a lot of effort put into details that are almost never used.
There probably won't be a definitive answer until Flayra gets back from vacation (he and Max still have final say on map requirements since I don't work directly with the mod code), but I'm guessing it's not going to be encouraged.
2) I think this one's already been mostly figured out by the thread <!--emo&:)--><img src='http://www.unknownworlds.com/forums/html//emoticons/smile.gif' border='0' style='vertical-align:middle' alt='smile.gif' /><!--endemo-->.
The missing step is the content of the detail.txt file, and unfortunately I haven't seen one yet so I can't help with that step.
Detail textures are like an extra translucent layer that wallpapers over your main texture; the idea is to use a different scale for the details that helps break up any repeating patterns and adds detail when you're very close to the surface. In practice it can be difficult to make the result look better unless the original texture was specifically designed for use with details.
For the best results, you never want to use a detail texture on any texture that has sharp lines or appears to change materials; the detail layer will be applied everywhere including over any "shadows" in the main texture, any areas that are supposed to be trim, etc. Detail textures work best on natural textures (woods, rocks) that don't have any border or trim elements.
Isn't it possible though to create detail textures specific to original textures that follow the contours and borders of the original?
I would expect this would increase the download size quite a bit, though.
I would expect this would increase the download size quite a bit, though. <!--QuoteEnd--></td></tr></table><div class='postcolor'><!--QuoteEEnd-->
It depends on how the details are implemented -- some systems tile the texture over the original as an additional rendering pass using a scale set in the detail file and always provide complete coverage of the texture. Under that system, the idea is that the textures repeat at different frequencies so the repetition is less obvious.
Other systems stretch a large detail image over a smaller main image -- under that setup, you gain the ability to follow borders but also gain an even higher feeling of repetition in your texturing since all of the details in both the main and detail texture repeat at the same rate. This technique makes large areas of a single texture look even more repetitive but it's well suited for a single repetition of a texture (like a door).
I'm not sure which system Half-Life uses, so I'm not sure if Half-Life details can follow the original textures' borders. If you've heard that it is possible, Valve probably implemented the second system (which isn't as useful IMHO) and I made a bad assumption in my original post <!--emo&:)--><img src='http://www.unknownworlds.com/forums/html//emoticons/smile.gif' border='0' style='vertical-align:middle' alt='smile.gif' /><!--endemo-->.
I would expect this would increase the download size quite a bit, though. <!--QuoteEnd--></td></tr></table><div class='postcolor'><!--QuoteEEnd-->
It depends on how the details are implemented -- some systems tile the texture over the original as an additional rendering pass using a scale set in the detail file and always provide complete coverage of the texture. Under that system, the idea is that the textures repeat at different frequencies so the repetition is less obvious.
Other systems stretch a large detail image over a smaller main image -- under that setup, you gain the ability to follow borders but also gain an even higher feeling of repetition in your texturing since all of the details in both the main and detail texture repeat at the same rate. This technique makes large areas of a single texture look even more repetitive but it's well suited for a single repetition of a texture (like a door).
I'm not sure which system Half-Life uses, so I'm not sure if Half-Life details can follow the original textures' borders. If you've heard that it is possible, Valve probably implemented the second system (which isn't as useful IMHO) and I made a bad assumption in my original post <!--emo&:)--><img src='http://www.unknownworlds.com/forums/html//emoticons/smile.gif' border='0' style='vertical-align:middle' alt='smile.gif' /><!--endemo-->. <!--QuoteEnd--> </td></tr></table><div class='postcolor'> <!--QuoteEEnd-->
The more I think about it the less I'm interested in this addition. It might help out with 1/3rd of the textures in your map, but the other two thirds would be too complicated for a detail texture. It really only helps with organic surfaces (Like infestation, wood, rock) or surfaces that are simple and tileable (like a tiling simple metal texture with no borders, trims, or extras). Most of the wall NS textures would look odd with detail textures.
A really good example of detail texturing is in the serious sam engine. I believe they used procedural texturing (see Cageys first example in his second post) where the detail doesn't appear to repeat too much. I found it to be very obvious in that game. It looked better than constant blur, but would it be worth it? ...
Maybe on grass, and organic stuff like Yamazaki said, but otherwise no IMO.
<u>Prsearle's Guide to Half-Life Detail Textures</u>
To add detail textures to your map, you'll need two things:<ul><li>The detail textures</li><li>A detail texture list file</li></ul>
<u>Detail textures</u>
Detail textures should be greyscale images. 128x128 is a good size to use. It's best to use 50% grey as a base colour and darken bits that should be highlighted.
The texture should be saved as a 24-bit uncompressed TGA file. It should be placed in your ns/gfx/detail folder and named appropriately (e.g. "ground1.tga" or "shinymetal3.tga").
<u>Detail Texture List File</u>
The list file is what tells Half-Life which detail texture to use in your map. It is a text file and should be named x_detail.txt, where x is the name of your map. The file should be placed in the same directory as the bsp file. So if I was adding detail textures to ns_dust, then the list file would be ns/maps/ns_dust_detail.txt.
The list file should contain one line for each texture you want to apply a detail texture to. Each line should have four items seperated by tabs. The first item is the texture name; the second item is the detail texture filename relative to the ns/gfx directory and without the extension. The third and four items specify the x and y scale of the detail texture; larger values make it bigger. 10.0 gives a good result usually. If that all sounded a bit confusing, here's an example: say I wanted to use the detail texture ns/gfx/detail/ground3.tga wherever the texture out_pav3 occurs. I might use a line looking like this:<!--QuoteBegin--></div><table border='0' align='center' width='95%' cellpadding='3' cellspacing='1'><tr><td><b>QUOTE</b> </td></tr><tr><td id='QUOTE'><!--QuoteEBegin-->out_pav3 detail/ground3 10.0 10.0<!--QuoteEnd--></td></tr></table><div class='postcolor'><!--QuoteEEnd-->
<u>Notes</u><ul><li>The detail textures will only show up if the player has r_detailtextures set to 1.</li><li>Avoid using detail textures on random tiling textures (-0texname, -1texname); the detail isn't applied to any randomly picked textures.</li><li>Try playing around with different scales; 10.0 to 25.0 works depending on the textures involved.</li><li>If your making your own detail textures, make sure they tile well or you'll end up with a grid pattern. Also, it's important the TGAs are 24-bit uncompressed - Half-Life will not load them otherwise.</li></ul>
<a href='http://tenebrae.sourceforge.net/' target='_blank'>Tenebrae</a> also shows off stuff like this to a good extent... A little <a href='http://tenebrae.sourceforge.net/shots8/quake00006.jpg' target='_blank'>more</a>.. <a href='http://tenebrae.sourceforge.net/shots8/quake00101.jpg' target='_blank'>advanced</a>, than most mod-engines, but it still shows you what these type of <a href='http://tenebrae.sourceforge.net/shots8/quake00099.jpg' target='_blank'>effects</a> can <a href='http://tenebrae.sourceforge.net/shots8/quake00064.jpg' target='_blank'>achieve</a>if done properly.
That brushed metal effect on the floor was a quick job, it's going to be redone. I've got a few others for surfaces like Infestation and Concrete.
Here's one important thing I discovered while making these detail textures:
The contrast in the texture determines how far away they are visible, so detail textures with very bright highlights and very dark shadows end up being visible at great distances. Textures with very minimal contrast end up being barely visible unless you shove your face into it. Aiming for something in between is best.