Detail Textures for NS?

MouseMouse The Lighter Side of PessimismMembers, NS1 Playtester, Forum Moderators, Squad Five Blue, Reinforced - Shadow, WC 2013 - Shadow Join Date: 2002-03-02 Member: 263Posts: 3,567 mod
(was: "A Question For XP-Cagey")
r_detailtextures (0,1)

according to what I could find from a quick google

r_detailtextures does the following
QUOTE
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.


When entered into the console after a map is loaded
QUOTE
] r_detailtextures 1
Loading Detail Textures...
No detail texture mapping file: maps/ns_veil_detail.txt


My question is twofold
1) Can we utilise detail textures in NS?
2) If so how would we go about using them?
-/AUS/- PS_Mouse
«13456716

Comments

  • prsearleprsearle Members, Constellation Join Date: 2002-11-01 Member: 2365Posts: 338
    Very interesting. My guess is that this is something Valve added to the engine for CS:CZ. If you create the file maps/mapname_detail.txt, then the error disappears and only the "Loading" bit remains. Of course, I've no idea what the contents of the file should be...
  • KungFuSquirrelKungFuSquirrel Basher of Muttons Members, NS1 Playtester, Contributor Join Date: 2002-01-26 Member: 103Posts: 2,175
    You don't seem to be able to use them yet. However, I've seen a couple screenshots of them applied in CS:CZ (the new Militia shot, for example) and it looks absolutely horrible.
  • OlmyOlmy Members, NS1 Playtester, Contributor, NS2 Developer, NS2 Map Tester, Reinforced - Diamond Join Date: 2003-05-08 Member: 16142Posts: 1,452 Advanced user
    If it becomes available to do in half life mods it would have alot of potential, if done correctly... as kfs pointed out.
  • KungFuSquirrelKungFuSquirrel Basher of Muttons Members, NS1 Playtester, Contributor Join Date: 2002-01-26 Member: 103Posts: 2,175
    Indeed. Detail textures in themselves can be very powerful, but you have to know how to use them and use the proper ones in the proper place. It'll be interesting to see how it turns out, but I'm just afraid it'll be a cheap hack that won't really be all that useful. No reason we can't keep our fingers crossed, though smile.gif
  • KungFuSquirrelKungFuSquirrel Basher of Muttons Members, NS1 Playtester, Contributor Join Date: 2002-01-26 Member: 103Posts: 2,175
    user posted image

    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. sad.gif Hopefully that's just poor implementation and not the system itself.
  • RestrikRestrik Members, Constellation Join Date: 2003-08-10 Member: 19392Posts: 230
    it doesn't look that bad...


    come on guys HL1 is over 5 years old now....based on an even older engine (Q2) cut it a little slack biggrin.gif
  • prsearleprsearle Members, Constellation Join Date: 2002-11-01 Member: 2365Posts: 338
    Looking through platform.gcf, I found a file called RetailInstalledFiles.txt, which seems to have a list of every file ever installed by a Valve product. There's a whole block of file names starting with \czero\, including:

    \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.
  • Kouji_SanKouji_San Sr. Hινε Uρкεερεг - EUPT Deputy The NetherlandsMembers, NS2 Playtester, Squad Five Blue Join Date: 2003-05-13 Member: 16271Posts: 15,782 Advanced user
    Man that cs_militia changed lot since I last played it in cs 1.3 or something tounge.gif

    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.

    Guardian of the "magic cookiejar" 

    Retired forum Admin, I mostly used a flamethrower tank for disputes... Mostly

    Retired EUPT Deputy | Moral Support | Squad 5 Blue | 102 1HP Skulk escapes and counting

  • DarkATiDarkATi Revelation 22:17 Members, Reinforced - Shadow Join Date: 2003-06-20 Member: 17532Posts: 2,545 Fully active user
    QUOTE (Kouji San @ Feb 11 2004, 09:04 AM)
    Man that cs_militia changed lot since I last played it in cs 1.3 or something tounge.gif

    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.

    Come on, someone like Cagey or another from the dev team answer us, pretty please? I wanna know!!

    ~ DarkATi
  • Kouji_SanKouji_San Sr. Hινε Uρкεερεг - EUPT Deputy The NetherlandsMembers, NS2 Playtester, Squad Five Blue Join Date: 2003-05-13 Member: 16271Posts: 15,782 Advanced user
    Why did you quote me sad.gif Now I feel its my fault
    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 biggrin.gif

    I would love to know it to, so yeah please!!! tell us smile.gif

    Guardian of the "magic cookiejar" 

    Retired forum Admin, I mostly used a flamethrower tank for disputes... Mostly

    Retired EUPT Deputy | Moral Support | Squad 5 Blue | 102 1HP Skulk escapes and counting

  • DarkATiDarkATi Revelation 22:17 Members, Reinforced - Shadow Join Date: 2003-06-20 Member: 17532Posts: 2,545 Fully active user
    QUOTE (Kouji San @ Feb 11 2004, 09:20 AM)
    Why did you quote me sad.gif Now I feel its my fault
    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 biggrin.gif

    I would love to know it to, so yeah please!!! tell us smile.gif

    Hit quote instead of reply. :\

    ~ DarkATi
  • YamazakiYamazaki Members, NS1 Playtester, Contributor Join Date: 2002-01-24 Member: 21Posts: 760
    QUOTE (KungFuSquirrel @ Feb 11 2004, 01:49 PM)

    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. sad.gif Hopefully that's just poor implementation and not the system itself.

    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.

    <a href="www.polyillusions.com">user posted image</a>
  • DOOManiacDOOManiac Worst. Critic. Ever. Members, NS1 Playtester Join Date: 2002-04-17 Member: 462Posts: 8,596
    QUOTE (Restrik @ Feb 11 2004, 08:00 AM)
    come on guys HL1 is over 5 years old now....based on an even older engine (Q2) cut it a little slack :D

    Quake 1 actually, with the Quake 2 renderer. :P
    Russell 'DOOManiac' Weed


    [email protected]

  • TrojanTrojan Members Join Date: 2002-11-02 Member: 4611Posts: 344
    QUOTE (Restrik @ Feb 12 2004, 01:00 AM)
    it doesn't look that bad...


    come on guys HL1 is over 5 years old now....based on an even older engine (Q2) cut it a little slack biggrin.gif

    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 wink.gif
    Visit the AusNS2 website today!
  • InsaneInsane Anomaly Members, Super Administrators, Forum Admins, NS1 Playtester, Forum Moderators, NS2 Developer, Constellation, NS2 Playtester, Squad Five Blue, NS2 Map Tester, Subnautica Developer, Pistachionauts, Future Perfect Developer Join Date: 2002-05-13 Member: 605Posts: 3,912 admin
    It also looks to me like the detail textures in that shot might not be hi-res enough to look that great. It's certainly worth investigating, though.
  • ThaldarinThaldarin Alonzi&#33; Members, Constellation Join Date: 2003-07-15 Member: 18173Posts: 6,132
    QUOTE (DOOManiac @ Feb 11 2004, 04:36 PM)
    QUOTE (Restrik @ Feb 11 2004, 08:00 AM)
    come on guys HL1 is over 5 years old now....based on an even older engine (Q2) cut it a little slack biggrin.gif

    Quake 1 actually, with the Quake 2 renderer. tounge.gif

    So surely Half-Life is Quake 1.5 ?
  • RestrikRestrik Members, Constellation Join Date: 2003-08-10 Member: 19392Posts: 230
    ok ok so i made a mistake, quake 1 w/ q2 render sue me! smile.gif
  • CageyCagey Ex-Unknown Worlds Programmer Members, Retired Developer, NS1 Playtester, Constellation Join Date: 2002-11-15 Member: 8829Posts: 1,751
    QUOTE (Mouse @ Feb 11 2004, 02:05 AM)
    r_detailtextures (0,1)

    according to what I could find from a quick google

    r_detailtextures does the following
    QUOTE
    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.


    When entered into the console after a map is loaded
    QUOTE
    ] r_detailtextures 1
    Loading Detail Textures...
    No detail texture mapping file: maps/ns_veil_detail.txt


    My question is twofold
    1) Can we utilise detail textures in NS?
    2) If so how would we go about using them?

    Good morning smile.gif

    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 smile.gif.

    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.
    XP-Cagey

    Recommended Reading: NS Mapping Guidelines | Mapping Forum FAQ
    Nostalgia: Power Cells Thread
  • InsaneInsane Anomaly Members, Super Administrators, Forum Admins, NS1 Playtester, Forum Moderators, NS2 Developer, Constellation, NS2 Playtester, Squad Five Blue, NS2 Map Tester, Subnautica Developer, Pistachionauts, Future Perfect Developer Join Date: 2002-05-13 Member: 605Posts: 3,912 admin
    QUOTE (XP-Cagey @ Feb 11 2004, 05:18 PM)
    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.
  • CageyCagey Ex-Unknown Worlds Programmer Members, Retired Developer, NS1 Playtester, Constellation Join Date: 2002-11-15 Member: 8829Posts: 1,751
    edited February 2004
    QUOTE (Insane @ Feb 11 2004, 09:27 AM)
    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.

    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 smile.gif.
    XP-Cagey

    Recommended Reading: NS Mapping Guidelines | Mapping Forum FAQ
    Nostalgia: Power Cells Thread
  • InsaneInsane Anomaly Members, Super Administrators, Forum Admins, NS1 Playtester, Forum Moderators, NS2 Developer, Constellation, NS2 Playtester, Squad Five Blue, NS2 Map Tester, Subnautica Developer, Pistachionauts, Future Perfect Developer Join Date: 2002-05-13 Member: 605Posts: 3,912 admin
    I hadn't heard it was possible anywhere, I was just wondering about that particular issue, so I guess it could be either system.
  • YamazakiYamazaki Members, NS1 Playtester, Contributor Join Date: 2002-01-24 Member: 21Posts: 760
    QUOTE (XP-Cagey @ Feb 11 2004, 05:40 PM)
    QUOTE (Insane @ Feb 11 2004, 09:27 AM)
    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.

    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 smile.gif.

    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 href="www.polyillusions.com">user posted image</a>
  • BigDBigD [OldF] Members Join Date: 2002-10-25 Member: 1596Posts: 1,056 Advanced user
    /offtopic They changed my favorite map in cs? to that? :o nooooooooooooo! /offtopic

    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.
    www.oldf.net
  • prsearleprsearle Members, Constellation Join Date: 2002-11-01 Member: 2365Posts: 338
    Check out the attached image tounge.gif That's a before and after shot of c2a5 (Half-Life).
  • YamazakiYamazaki Members, NS1 Playtester, Contributor Join Date: 2002-01-24 Member: 21Posts: 760
    Where'd you get that picture from prsearle? Did you figure out the details.txt and apply it to that old HL map? Or did someone else?
    <a href="www.polyillusions.com">user posted image</a>
  • prsearleprsearle Members, Constellation Join Date: 2002-11-01 Member: 2365Posts: 338
    Yeah, I took the picture myself. Here's how to get detail textures working in any Half-Life mod:

    Prsearle's Guide to Half-Life Detail Textures
    To add detail textures to your map, you'll need two things:
    • The detail textures
    • A detail texture list file

    Detail textures
    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").

    Detail Texture List File
    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:
    QUOTE
    out_pav3    detail/ground3    10.0    10.0


    Notes
    • The detail textures will only show up if the player has r_detailtextures set to 1.
    • Avoid using detail textures on random tiling textures (-0texname, -1texname); the detail isn't applied to any randomly picked textures.
    • Try playing around with different scales; 10.0 to 25.0 works depending on the textures involved.
    • 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.
  • TrojanTrojan Members Join Date: 2002-11-02 Member: 4611Posts: 344
    edited February 2004
    If done correctly, it works very well. Case point one and two. A lot of the new Q1 textures, namely the base ones (Technical wall textures, like lab wink.gif) have very straight edges and such, but the new overlay texturemaps are very, very good. Makes the textures look a million times better. 'Course, QW also has 24bit textures now, so that helps.

    Tenebrae also shows off stuff like this to a good extent... A little more.. advanced, than most mod-engines, but it still shows you what these type of effects can achieveif done properly.
    Visit the AusNS2 website today!
  • YamazakiYamazaki Members, NS1 Playtester, Contributor Join Date: 2002-01-24 Member: 21Posts: 760
    I did some experimentation and made a few detail textures for use with my Combat map. One's a simple brushed metal effect and the other is wallpanel16 with a highpass and sharpen filter applied. Here's the results:
    <a href="www.polyillusions.com">user posted image</a>
  • KungFuSquirrelKungFuSquirrel Basher of Muttons Members, NS1 Playtester, Contributor Join Date: 2002-01-26 Member: 103Posts: 2,175
    I'm not sure if I like the one you used on the floors there, but I am definitely liking the wall version. Nicely done.
  • YamazakiYamazaki Members, NS1 Playtester, Contributor Join Date: 2002-01-24 Member: 21Posts: 760
    edited February 2004
    QUOTE (KungFuSquirrel @ Feb 12 2004, 04:46 AM)
    I'm not sure if I like the one you used on the floors there, but I am definitely liking the wall version. Nicely done.

    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.
    <a href="www.polyillusions.com">user posted image</a>
Sign In or Register to comment.