Mini tutorial on achieving beautiful, reflective floors

Some of you are familiar with this tutorial where the author guides you through the process of using a water texture as a means of achieving those sexy, awesome reflective floors that you see in real life in museums, banks, malls etc. Give it a read-through if you haven’t already, because this mini tutorial builds onto that.

**There are a couple potential problems with that method. One is that by adding “$alpha” 0.7 to the texture’s VMT file, you’re telling the ENTIRE texture to be semi-transparent. But what if that texture has some areas where it’s not meant to be reflective? It’s going to look fairly odd seeing a non-reflective area in the texture be just as shiny and reflective as the rest of it.

The other problem is that you can’t use its reflective/specular map as another VTF by adding it in the VMT as

$envmapmask materials/materialname_r


So now you’re either stuck with having the entire texture semi-transparent, or you’re forced to use the ugly cubemap reflections that are static in the texture, meaning the reflection’s perspective doesn’t change no matter where you move on it or look.

**But wait, there’s hope! ** Since that sexy reflection tutorial only works by messing with the texture’s alpha amount, why not use the reflection/specularity map as the alpha mask? This way, cracks in tiles or parts that shouldn’t be reflective are kept at maximum alpha while the reflective areas are darker in the texture map.

With the VMT set to simply alter the entire’s texture alpha:

With the VMT set to look at the texture’s alpha map:

Another view:

I’ll show you to achieve just that, and you need just a few things to get started:

VTFEdit -
Photoshop (Just about every version from 7 and up should work)
Diffuse/color texture map
Reflection/specularity texture map

Okay, so here I have both of the maps open in Photoshop, diffuse on the left, specular on the right:

On the right, click on the Channels tab (it doesn’t matter which texture you do it for):

When you do it while having the specular map selected, it’ll show up as:

Now, all you have to do, is click and drag the Grayscale CHANNEL (not the image) onto the color/diffuse IMAGE (not channel tab) and voila! An exact transfer!:

Note: If it tells you that the target image is a different depth, just transfer it over anyways, don’t worry.*
At this point, you can close out of the specularity/reflection texture. We’re just focusing on the diffuse/color texture now. Now in the channels tab for your color/diffuse texture, you’re going to see an Alpha channel added to the list of channels, and that’s what we want:

We’re just about done with the Photoshop part, but here comes the potentially tricky part. The alpha or opacity of the map is based upon how white it is, so:

Pure white = completely opaque/visible/no reflection
Pure black = completely transparent/invisible/total reflection

So right now, all those solid black parts are going to be completely invisible and we don’t want that. We want them just slightly transparent, so we need to brighten them up. So, disable all the channels except the alpha channel, and in the menu above, go to Image > Adjustments > Replace Color.

With the Eyedropper tool selected, in the preview image, click on any black squares to select the almost solid black. Now try out Fuzziness: 120 and Lightness: +70.

This boosts up the alpha of the black sections considerably, and leaves some black speckles for small spots of 100% reflectivity. Remember, we want it just SLIGHTLY transparent, but if you want it more or less, feel free to alter the values.

Now, enable all channels in the Channels tab. Go to File > Save As. Make sure that the filetype is Targa (TGA) and make sure it’s 32-bits/pixel resolution.
Okay, all done with Photoshop! You’re welcome to close it all out when you’re done. Now, you need to open up VTFEdit.**

Go to File > Import > and find your TGA file. Just say OK when it comes up with the prompt.

Then, simply go to File > Save As > and save it inside a folder in your materials folder for the game you’re using. For example, for Episode 2, \username\half-life 2 episode two\ep2\materials\mysupercooltexturefolder. Now, go to Tools > Create VMT file.

Click on the Options Tab, and click on the Translucent checkbox. What does that do? Having $translucent “1” in your VMT means that the texture will be transparent depending on its alpha amount, and this is the key for what we’re trying to do.

You can set the Surface to whatever you want, that’s simply for how the game will interpret gibs or footstep sounds.

Now you can close VTFEdit, and fire up Hammer.

NOTE: The remainder of this tutorial assumes you read the Interlopers tutorial on how to do the reflective floor, but if you’re too lazy, you can just download their example map, which I did for this tutorial (Not that I’m lazy, well for right now at least). You can get the example map here:

Simply click on the Texture tool and click on the floor:

Locate your texture wherever you put it and select it, and simply apply it:

Don’t worry, mine’s only 0.05 x 0.05 since it’s a freaking massive texture. But that’s it, simply compile it and run your map!

Additional pics:


oh shiiitttt! nice, gota try it! Do you think you could package it for download?

Woah, never seen better reflective floor in source before. This is awesome. It’s gonna be put in my map for sure.

Super Shiny!

That looks great!

Thats a very nice way of doing reflections. I want to try it now, but I can’t think of a worthy texture…would glass work :raise:

The things possible in source are limitless, it just takes unique level designers who think outside the box to manipulate and use the functions available.

you sir, are one of them, kudos.

Why certainly. For example, you could have frosted glass that’s starting to condense only at the bottom. You could whip up some fractal noise in Photoshop and save that to the alpha.

Unfortunately, that doesn’t fall under this tutorial for reflection. It would have to be reflective by using cubemaps.

Do you know if there’s any workaround to getting reflectives working on multiple brushes at once? I can’t use them in my map because of this… They glitch out like mad. Reflective tutorials have always warned about this, but I had to see for myself. No luck. :frowning:

I’m pretty sure it’s not possible to have multiple reflections, or at least that are visible to each other. It would create a hall of infinite reflections. They’ll have to be hidden from each other.

Ahh damn, cubemap reflections look like ass, even on glass.

Actually, I think it’s possible, but it would have to be at least 4 units thick for all the 1 unit thick brushes. It’s worth a shot. Make a 256x256 image in photoshop, color it with a light blue, and then make your alpha a solid very dark gray color.


you can do that with models as well, and if you mix in a nice normal map with it, the results can look really good (even with cubemaps).

Oh god, the wall tile
It’s so blurry!

It’s a small tutorial based upon a larger one.

That is a sexy stool model rob. Would you be up for uploading it so I can try it out in realtime? I’m curious to see how the reflections look like in motion.

How do you get larger than this?


filter>motion blur
= fail lol
you gotta offset then blur the edges nub lol