• Mini tutorial on achieving beautiful, reflective floors
    47 replies, posted
Some of you are familiar with this tutorial [url]http://www.interlopers.net/tutorials/19882[/url] 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. [b]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 [code]$envmapmask materials/materialname_r [/code][/b] 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. [b]But wait, there's hope! [/b] 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: [IMG]http://i9.photobucket.com/albums/a70/djeros/HALF-LIFE_2-20090811-1127.jpg[/IMG] With the VMT set to look at the texture's alpha map: [IMG]http://i9.photobucket.com/albums/a70/djeros/HALF-LIFE_2-20090811-1137.jpg[/IMG] Another view: [IMG]http://i9.photobucket.com/albums/a70/djeros/HALF-LIFE_2-20090811-114221.jpg[/IMG] I'll show you to achieve just that, and you need just a few things to get started: [b]VTFEdit - [url]http://nemesis.thewavelength.net/index.php?c=178[/url] Photoshop (Just about every version from 7 and up should work) Diffuse/color texture map Reflection/specularity texture map[/b] Okay, so here I have both of the maps open in Photoshop, diffuse on the left, specular on the right: [img]http://hailaeros.com/ZScreen_Uploads/Adobe_Photoshop_CS4_Extended-2009.08.11-11.55.31.jpg[/img] On the right, click on the Channels tab (it doesn't matter which texture you do it for): [img]http://hailaeros.com/ZScreen_Uploads/SS-2009.08.11-12.01.51.png[/img] When you do it while having the specular map selected, it'll show up as: [img]http://hailaeros.com/ZScreen_Uploads/SS-2009.08.11-12.03.15.png[/img] 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!: [img]http://hailaeros.com/ZScreen_Uploads/SS-2009.08.11-12.05.47.png[/img] [i] Note: If it tells you that the target image is a different depth, just transfer it over anyways, don't worry.[/i] 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: [img]http://hailaeros.com/ZScreen_Uploads/SS-2009.08.11-12.07.29.png[/img] 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. [img]http://hailaeros.com/ZScreen_Uploads/SS-2009.08.11-12.14.42.png[/img] 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. [img]http://hailaeros.com/ZScreen_Uploads/SS-2009.08.11-12.28.22.png[/img] 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. [b] Okay, all done with Photoshop! You're welcome to close it all out when you're done. Now, you need to open up VTFEdit.[/b] 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. [img]http://hailaeros.com/ZScreen_Uploads/Create_VMT_File-2009.08.11-12.51.06.png[/img] 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. [i]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: [url]http://www.interlopers.net/images/hl2tutorials/reflective_floor/example_map.zip[/url][/i] Simply click on the Texture tool and click on the floor: [img]http://hailaeros.com/ZScreen_Uploads/SS-2009.08.11-12.55.38.png[/img] Locate your texture wherever you put it and select it, and simply apply it: [img]http://hailaeros.com/ZScreen_Uploads/SS-2009.08.11-12.57.40.jpg[/img] 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! [IMG]http://i9.photobucket.com/albums/a70/djeros/HALF-LIFE_2-20090811-1307.jpg[/IMG] Additional pics: [img]http://hailaeros.com/ZScreen_Uploads/HALF-LIFE_2-2009.08.10-17.50.39.jpg[/img] [img]http://hailaeros.com/ZScreen_Uploads/HALF-LIFE_2-2009.08.10-15.13.58.jpg[/img]
Sexy.
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.
[QUOTE=djshox;16628350]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.[/QUOTE] 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. :(
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.
[QUOTE=djshox;16628350]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.[/QUOTE] 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.
Mini?
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). [img]http://i42.tinypic.com/1t7dq0.png[/img]
[QUOTE=robmaister12;16630091]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). [img]http://i42.tinypic.com/1t7dq0.png[/img][/QUOTE] Oh god, the wall tile It's so blurry!
[QUOTE=l337k1ll4;16629747]Mini?[/QUOTE] 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?
What?
Lolz filter>noise filter>motion blur = fail lol you gotta offset then blur the edges nub lol
[QUOTE=voled;16634549]Lolz filter>noise filter>motion blur = fail lol you gotta offset then blur the edges nub lol[/QUOTE] The wall is temporary, I am going to change that. The focus was supposed to be the barstool
I wish my photoshop wasn't broke.
This is incredibly nice looking. They should add your steps to the Interlopers tutorial.
[QUOTE=hexpunK;16628573]Ahh damn, cubemap reflections look like ass, even on glass.[/QUOTE] Yep. I tried setting up the reflective texture like glass. [b] Houston we have a problem:[/b] [img]http://hailaeros.com/ZScreen_Uploads/HALF-LIFE_2-2009.08.12-11.18.18.jpg[/img] [img]http://hailaeros.com/ZScreen_Uploads/HALF-LIFE_2-2009.08.12-11.18.40.jpg[/img]
It's like the void...but there is no void.
i never understood reflective floors because they are just shiny and polished, they're not a mirror.
DL linky?
Download link to what?
[QUOTE=Pj The Dj;16649084]i never understood reflective floors because they are just shiny and polished, they're not a mirror.[/QUOTE] Because we can't do super-high quality 'shiny/polished' effect in Source without water/mirrors?
the floor texture.
Sorry, you need to Log In to post a reply to this thread.