Detail Textures for HL1

Detail Textures for HL1

Re: Detail Textures for HL1 Posted by Jinx on Sat Dec 16th 2006 at 12:27pm
Jinx
874 posts
Posted 2006-12-16 12:27pm
Jinx
member
874 posts 692 snarkmarks Registered: Nov 27th 2002 Location: Ohio
I tinkered with these a while back:
http://collective.valve-erc.com/index.php?doc=1076548934-94242500

The problem was, although I could get them working in-game, making the actual detail texture itself was a pain; I could add a "grain" to a regular texture, but I could never take the original texture and properly modified it into a detail version that would emulate proper detail and depth.

This is the best I could manage a while back:
User posted image

I guess it does look a bit more alive. But I've seen them done, though, where it really looks great- like the dark part of each block would look a little lower, making each stone look more individual etc. I assume that is done by modifying the original texture, but I'm not sure where to start.

Does anyone have experience with making proper detail textures in Photoshop? Know of a tutorial that walks you through the process? I realize they are of limited use since they don't work on func_walls, but it would be a nice effect, even if I use it just on the floor textures (and maybe the walls & ceilings if I can get away with it; not using func_walls = higher polies).

Thanks in advance :smile:
Re: Detail Textures for HL1 Posted by Captain P on Sat Dec 16th 2006 at 12:56pm
Captain P
1370 posts
Posted 2006-12-16 12:56pm
1370 posts 1995 snarkmarks Registered: Nov 6th 2003 Occupation: Game-programmer Location: Netherlands
Since this detail texture basically is a greyscale overlay at a different scale, taking the original texture, scaling it up with the proper scale and converting it to a greyscale image, while darkening lower area's and highlighting higher area's, and adding shades and all, should give you a good start.

What did you try so far then and where did it go wrong?
Create-ivity - a game development blog
Re: Detail Textures for HL1 Posted by Jinx on Sat Dec 16th 2006 at 1:01pm
Jinx
874 posts
Posted 2006-12-16 1:01pm
Jinx
member
874 posts 692 snarkmarks Registered: Nov 27th 2002 Location: Ohio
Just used the 'texturizer' in photoshop to make the one above :x

I remember tinkering around a little like that with the original texture, but always with godawful results. I don't think I was doing it right, though; I'll try what you suggested. Though I may not get to it for a bit, I'd like to include that feature in Museum and the revised version of Temple.
Re: Detail Textures for HL1 Posted by Crono on Sat Dec 16th 2006 at 1:21pm
Crono
6628 posts
Posted 2006-12-16 1:21pm
Crono
super admin
6628 posts 700 snarkmarks Registered: Dec 19th 2003 Location: Oregon, USA
Can't you just use the normal map tool for HL2? It works through photoshop and just produces a height map image (grayscale)

I know there's an nvidia tool that makes it very easy.

Check it if helps. (google it of course, I don't have a direct link)
Blame it on Microsoft, God does.
Re: Detail Textures for HL1 Posted by Jinx on Sat Dec 16th 2006 at 4:08pm
Jinx
874 posts
Posted 2006-12-16 4:08pm
Jinx
member
874 posts 692 snarkmarks Registered: Nov 27th 2002 Location: Ohio
I am following the format correctly I think... but all it's doing is making the texture look more contrasty. Am I missing something?

User posted image
Re: Detail Textures for HL1 Posted by Jinx on Sat Dec 16th 2006 at 5:33pm
Jinx
874 posts
Posted 2006-12-16 5:33pm
Jinx
member
874 posts 692 snarkmarks Registered: Nov 27th 2002 Location: Ohio
I think maybe I'm getting what I saw before mixed up with the limited bump-mapping people are doing in HL now. From what I read, the effect in the first pic is more what you are going for with detail textures. It's not really to provide depth, just to provide a little grain and roughness when a larger texture is seem up-close:

http://www.flipcode.com/cgi-bin/fcarticles.cgi?show=64518

Now I just need to figure out how to use Texturizer in Photoshop better heh.
Re: Detail Textures for HL1 Posted by Captain P on Sat Dec 16th 2006 at 6:19pm
Captain P
1370 posts
Posted 2006-12-16 6:19pm
1370 posts 1995 snarkmarks Registered: Nov 6th 2003 Occupation: Game-programmer Location: Netherlands
I'd say, lower the contrast by a few scales or so. These detail textures have a lot of effect on the brightness/contrast otherwise. Putting in relief can probably be done with some simple drawing tricks - adding shadows to indicate the surface next to it sticks out, etc, but these don't react to light directions as bumpmaps do, so the effect is limited, yeah. And you could do that to the base texture anyway. :smile:
Create-ivity - a game development blog
Re: Detail Textures for HL1 Posted by Jinx on Sun Dec 17th 2006 at 12:03am
Jinx
874 posts
Posted 2006-12-17 12:03am
Jinx
member
874 posts 692 snarkmarks Registered: Nov 27th 2002 Location: Ohio
Some images in this post have been automatically down-sized, click on them to view the full sized versions:

User posted image

Think I'm about there with the brightness; at a distance, you can't tell any difference between the texture with the detail texture and it's matching texture from the same set.

Not sure what else to do in terms of 'grain' on these, though, and it looks dumb if everything has the same detail texture lol
Re: Detail Textures for HL1 Posted by Le Chief on Sun Dec 17th 2006 at 12:27am
Le Chief
2605 posts
Posted 2006-12-17 12:27am
Le Chief
member
2605 posts 937 snarkmarks Registered: Jul 28th 2006 Location: Sydney, Australia
I spose this is related. Has anybody else noticed that when you make a WAD with wally and save it in wad3 format and shove it in one of you levels for half-life than you play the level that the texture fades in and out depending on how far you are standing from it. Its weird. I make a wad and it screws up. So what I do is make the textures with wally (cause you can make each texture have its only pallet) than save as a bmp the compile the texture into a WAD with some werid program.
Aaron's Stuff
Re: Detail Textures for HL1 Posted by Captain P on Sun Dec 17th 2006 at 12:43pm
Captain P
1370 posts
Posted 2006-12-17 12:43pm
1370 posts 1995 snarkmarks Registered: Nov 6th 2003 Occupation: Game-programmer Location: Netherlands
@aaron_da_killa: the texture fading is a common technique called mipmapping. It means the graphics card uses a lower-res version of the texture over a certain distance (actually over a certain view angle). It happens to all surfaces and has nothing to do with Wally or .wad files.
You can create images with your favorite paint tool and simply drag the files into a wad window in Wally. Wally will convert it while keeping quality loss to a minimum, e.g. it creates a custom palette for that image. Much easier than some complicated converting process. Took me some time to find out though. :wink:

@Jinx: you could still add a subtle darker shade in the detail texture to the edges of these tiles. The base texture doesn't have too much contrast at the tile edges, so the relief is less apparant to start with anyway.
Create-ivity - a game development blog
Re: Detail Textures for HL1 Posted by Jinx on Sun Dec 17th 2006 at 12:49pm
Jinx
874 posts
Posted 2006-12-17 12:49pm
Jinx
member
874 posts 692 snarkmarks Registered: Nov 27th 2002 Location: Ohio
@Jinx: you could still add a subtle darker shade in the detail texture to the edges of these tiles. The base texture doesn't have too much contrast at the tile edges, so the relief is less apparant to start with anyway.
I can't really do that; the detail texture works because it is tiled more than the base texture. ie across the face of one regular texture, the detail texture may repeat itself 8 or 10 times. that's how you get the extra grain/detail. So the detail texture is really just a little b&w texture with some grain on it usually.
Re: Detail Textures for HL1 Posted by Captain P on Mon Dec 18th 2006 at 3:29pm
Captain P
1370 posts
Posted 2006-12-18 3:29pm
1370 posts 1995 snarkmarks Registered: Nov 6th 2003 Occupation: Game-programmer Location: Netherlands
I know, and for that darker edge thing to work you'd have to position it precisely and use a much larger detail texture to deal with the smaller scale. Oh well, this looks fine anyway. :smile:
Create-ivity - a game development blog
Re: Detail Textures for HL1 Posted by Jinx on Wed Dec 20th 2006 at 12:34am
Jinx
874 posts
Posted 2006-12-20 12:34am
Jinx
member
874 posts 692 snarkmarks Registered: Nov 27th 2002 Location: Ohio
I am making progress on these; finally starting figure out the format, brightness/contrast, and scaling needed. Check out the grain on this painting up close: (linked since it's 1600x1200)

http://www.cryotank.net/remote/paintingcanvas.jpg

For certain things, you need a distinct sort of pattern to look good. For others, a sort of generic grain does the trick and makes it look at little better at least.

Once I finish Museum maybe I'll do a brief tutorial on getting them working, along with a zip of whatever ones I have made by then.
Re: Detail Textures for HL1 Posted by Jinx on Wed Dec 20th 2006 at 2:11am
Jinx
874 posts
Posted 2006-12-20 2:11am
Jinx
member
874 posts 692 snarkmarks Registered: Nov 27th 2002 Location: Ohio
FatherBrandon asked for more info on the Action HL boards, so I figured I'd share what I know here, too. This isn't quite a proper tutorial but it should get anyone interested going:

The VERC page on Detail Textures:
http://collective.valve-erc.com/index.php?doc=1076548934-94242500

That tells you how to get them in-game, but not much about what they need to actually look like. I had to use a lot of trial-and-error to get stuff working.

The trick is that RGB 128 128 128 is the shade of gray that has 0 effect. A good detail texture has variation from around 115-140 from what I'm finding. You can adjust brightness/contrast in Photoshop to match what you need. If you are taking a regular texture and desaturating it to use, you usually have to reduce contrast a LOT. Note that having the average brightness above or below 128 will brighten or darken the texture in-game. So the best way seems to vary a little above AND a little below 128. You can run across the texture with the eyedropper tool while adjusting the brightness contrast, to get a feel for where the texture's variance lies.

User posted image

Here's an example of part of my text file for temple, ahl_temple_detail.txt. You can add notes behind // that don't effect the file, which helps keep the stuff straight:

//floors x1
pk_floor1a detail/jx_detail01 6.0 6.0
pk_floor1c detail/jx_detail01 6.0 6.0

The numbers are the scaling. Depending on the size of the detail texture (go for square; 64, 128, or 256) and the scaling of the other texture in-game, the need varies. I find values between 6 and 14 are working best. I'd start with like 8 then see when you want it smaller or bigger.

Here's a zip for the texture I'm using on the floor in Temple, as well as a 64x64 grey texture if you want to make your own in photoshop using the texturizer or something:
http://www.cryotank.net/remote/detail_ex.zip

I have keys bound to turn the detail textures on and off, to compare. It helps you see what effect it's really having.

.
Re: Detail Textures for HL1 Posted by Captain P on Wed Dec 20th 2006 at 4:28pm
Captain P
1370 posts
Posted 2006-12-20 4:28pm
1370 posts 1995 snarkmarks Registered: Nov 6th 2003 Occupation: Game-programmer Location: Netherlands
Nice tips. Too bad only few people here are still working on HL stuff nowadays, but I think you could write a tutorial for TWHL, they're still more HL-oriented. :smile:
Create-ivity - a game development blog
Re: Detail Textures for HL1 Posted by Jinx on Wed Dec 20th 2006 at 5:06pm
Jinx
874 posts
Posted 2006-12-20 5:06pm
Jinx
member
874 posts 692 snarkmarks Registered: Nov 27th 2002 Location: Ohio
wtf is TWHL?
Re: Detail Textures for HL1 Posted by Captain P on Wed Dec 20th 2006 at 5:55pm
Captain P
1370 posts
Posted 2006-12-20 5:55pm
1370 posts 1995 snarkmarks Registered: Nov 6th 2003 Occupation: Game-programmer Location: Netherlands
Oh, another HL mapping community.
Create-ivity - a game development blog
Re: Detail Textures for HL1 Posted by Orpheus on Wed Dec 20th 2006 at 7:34pm
Orpheus
13860 posts
Posted 2006-12-20 7:34pm
Orpheus
member
13860 posts 2024 snarkmarks Registered: Aug 26th 2001 Occupation: Long Haul Trucking Location: Long Oklahoma - USA
Captain P said:
Nice tips. Too bad only few people here are still working on HL stuff nowadays, but I think you could write a tutorial for TWHL, they're still more HL-oriented. :smile:
Rowley is very interested in textures at TWHL. I am pretty sure he would burn a few candles to Jinxy if you did. Maybe even a first born namesake or two.

The best things in life, aren't things.
Re: Detail Textures for HL1 Posted by Jinx on Wed Dec 20th 2006 at 9:03pm
Jinx
874 posts
Posted 2006-12-20 9:03pm
Jinx
member
874 posts 692 snarkmarks Registered: Nov 27th 2002 Location: Ohio
And neither of you can give me a link? Sheesh, you're gonna make me GOOGLE it, aren't you? Bastards. :razz:
Re: Detail Textures for HL1 Posted by Orpheus on Wed Dec 20th 2006 at 9:36pm
Orpheus
13860 posts
Posted 2006-12-20 9:36pm
Orpheus
member
13860 posts 2024 snarkmarks Registered: Aug 26th 2001 Occupation: Long Haul Trucking Location: Long Oklahoma - USA
This is a link to Rowley's thread. Use it to locate anything you find of interest. I dunno if he will use anything you post but, he is interested in customs right now.

The best things in life, aren't things.
Re: Detail Textures for HL1 Posted by Captain P on Wed Dec 20th 2006 at 9:38pm
Captain P
1370 posts
Posted 2006-12-20 9:38pm
1370 posts 1995 snarkmarks Registered: Nov 6th 2003 Occupation: Game-programmer Location: Netherlands
We simply assume a self-respecting mapper is as familiar with Google as he is with the vertex tool. :razz:
Create-ivity - a game development blog
Re: Detail Textures for HL1 Posted by Jinx on Sat Dec 23rd 2006 at 10:30pm
Jinx
874 posts
Posted 2006-12-23 10:30pm
Jinx
member
874 posts 692 snarkmarks Registered: Nov 27th 2002 Location: Ohio
Some AHL mappers asked for a tutorial on doing this, so I gave them a basic description of what to do. I'm not quite where I need to be to write an offical tutorial at this point, but this is enough to get anyone interested going:

http://collective.valve-erc.com/index.php?doc=1076548934-94242500

That tells you how to get them in-game, but not much about what they need to actually look like. I had to use a lot of trial-and-error to get stuff working.

The trick is that RGB 128 128 128 is the shade of gray that has 0 effect. A good detail texture has variation from around 115-140 from what I'm finding. You can adjust brightness/contrast in Photoshop to match what you need. If you are taking a regular texture and desaturating it to use, you usually have to reduce contrast a LOT. Note that having the average brightness above or below 128 will brighten or darken the texture in-game. So the best way seems to vary a little above AND a little below 128. You can run across the texture with the eyedropper tool while adjusting the brightness contrast, to get a feel for where the texture's variance lies.

User posted image

Here's an example of part of my text file for temple, ahl_temple_detail.txt. You can add notes behind // that don't effect the file, which helps keep the stuff straight:

//floors x1
pk_floor1a detail/jx_detail01 6.0 6.0
pk_floor1c detail/jx_detail01 6.0 6.0

The numbers are the scaling. Depending on the size of the detail texture (go for square; 64, 128, or 256) and the scaling of the other texture in-game, the need varies. I find values between 6 and 14 are working best. I'd start with around 8 then see if you want it smaller or bigger.

Here's a zip for the texture I'm using on the floor in Temple, as well as a 64x64 grey texture if you want to make your own in photoshop using the texturizer or something:
http://www.cryotank.net/remote/detail_ex.zip

I have keys bound to turn the detail textures on and off, to compare. It helps you see what effect it's really having. Remember, these are OFF BY DEFAULT (in AHL, at least). So you have to turn them on yourself. So in the console set:

r_detailtextures 1

I'll write up an 'official' tutorial with more info and sample textures when I get my current map done, as well as some more tinkering/learning.

.