Help: How to get those shiny floors.

MrStump

L1: Registered
Aug 23, 2008
21
2
I have been digging around the forum, the developer's wiki, and Google for a couple days now. I can not for the life of me figure out how to make my floors glossy. Not reflective like a mirror, just shiny (some of the spawn floors in Badwater use the effect). It gives the tile floors a nice "just waxed" look.

I wanted to not only make my floors shiny, but to put a shine on a couple chrome trims I've placed here and there on my map. I can not find any tutorial on how to do this, nor can I find a texture that is shiny. I've only been mapping for a month or so, and I feel like this is either common knowledge for most or its some quiet trick. Either way, I'm lost.

Any help you could give, I would greatly appreciate. Thanks.
 

Beetle

L9: Fashionable Member
Aug 17, 2008
627
178
Getting the glossy finish on floors is all about env_cubemaps. You must place an env_cubemap above your floor surface, hold ctrl while the "Point-At" button is clicked in the env_cubemap properties, and click the surfaces you wish to be reflected. For it to show any difference though, you must load your map and in the console type "buildcubemaps", then reload your map or it won't be saved.
 

MrStump

L1: Registered
Aug 23, 2008
21
2
I compiled my map, had it open in TF2, and typed buildcubemap in the console.

I received this:

Current mod isn't in a subdirectory of "game"!
bounce: 1/1 sample: 1/2
bounce: 1/1 sample: 2/2
*** Error: Skybox vtf files for sky_hydro_01 weren't compiled with the same size texture and/or same flags!
Can't load skybox file sky_hydro_01 to build the default cubemap!

I then exited, had HAMMER compile again, and loaded the map. The reflective texture did not work. What have I done wrong here?
 

Beetle

L9: Fashionable Member
Aug 17, 2008
627
178
Did you restart the map once without exiting the game after you did buildcubemap?
 

samn

L4: Comfortable Member
Mar 28, 2008
158
47
Compile your map (make sure there are cubemap entities spaced throughout the map)
Ignore those errors you get when you compile.
Start TF2, turn HDR OFF and go into console and type mat_specular 0.
Start your map and type 'sv_cheats 1' then 'buildcubemaps' into the console.
Turn HDR ON, reload the map, type the same into your console. Leave the map, type mat_specular 1, load the map and hopefully it should be working properly.

You will need to do this everytime you compile.
 

MrStump

L1: Registered
Aug 23, 2008
21
2
I tried both methods here, disconnected, made my own server with the map, and still no reflection.

However, the intel room, which is cadycorner and in no way the same texture or location as the floor I wished to have shiny, became shiny. There is a separate cube map (not attached to any surface) in the intel room. I am now quite confused and am reverting to a previous version of my map before I started. Perhaps I have a leark or some such nonsense that is messing it up.

It will be hard to check, however. I cube'd in my whole map in a skybox during the development phase of this map.
 

grazr

Old Man Mutant Ninja Turtle
aa
Mar 4, 2008
5,441
3,814
Check you are using a reflective material, this is a common mistake as some textures have multiple versions (notably lower dx settings for reflective materials). You don't need to "tie" a face to a cubemap, it should just work. Tieing them just makes sure that a face is used by said cubemap for certain, but it would reflect regardless of what cubemap it is reflecting from. (as far as i am aware).

If you think you have a leak you can check by loading your pointfile under: map > load pointfile. Which will draw a red line to the closest hole to the leaked entity in your hammer views.

Try untying your cubemap, and make sure there is no leak.
 

Beetle

L9: Fashionable Member
Aug 17, 2008
627
178
Sorry I forgot to clarify. Yea, just because you have a cubemap pointing to the texture doesn't mean it will reflect. The texture has to specify that its suppose to reflect in the vmt. I can tell what can reflect because I see a reflect version of the same texture like <texture name>_reflect.
 

Altaco

L420: High Member
Jul 3, 2008
484
120
You can just place the cubemap and if you just want basic reflections you don't have to change anything. Assigning specific faces is more advanced.
 

MrStump

L1: Registered
Aug 23, 2008
21
2
Compile your map (make sure there are cubemap entities spaced throughout the map)
Ignore those errors you get when you compile.
Start TF2, turn HDR OFF and go into console and type mat_specular 0.
Start your map and type 'sv_cheats 1' then 'buildcubemaps' into the console.
Turn HDR ON, reload the map, type the same into your console. Leave the map, type mat_specular 1, load the map and hopefully it should be working properly.

You will need to do this everytime you compile.

This worked perfectly for me. The simpler version of just typing buildcubemaps did nothing for me. Well, the quoted method plus the advice about only textures that have a reflect version will reflect. Helped me sort this all out. Thank you guy a lot for your help.


Also, I didn't have any leaks. However I did end up with odd lighting errors. I think it had to do with me putting spotlights with a wider than 90º angle. I ended up stripping every light entity from my map through the entities menu to fix the problem. But at least its fixed now and I can get back to work... um... after I add back in some lights.

Thanks again guys.
 

Beetle

L9: Fashionable Member
Aug 17, 2008
627
178
Hey Samn, I'm really curious as to why that works. I had a similar problem. The reflections were showing up as purple and black checkered squares. I used the same fix for that and it fixed it all the same, but I like to know why things work. Reflections seemed to work one day then not work the next with no new compiles, and that's why I tried it.
 

grazr

Old Man Mutant Ninja Turtle
aa
Mar 4, 2008
5,441
3,814
Sometimes minimising your game messes with the cubemaps. Sometimes people just get confused with this, it is a common bug that is often mistaken for mapping glitches/errors.

Alternatively, have you changed any settings in your display options for TF2; such as turning HDR on? This could have contributed to your reflective bug encounter. It is recommended that you compile cubemaps for both hdr and no hdr, as systems these days have varying capabilities to run and not be able to run this technology. I imagine these have different results ingame so doing both means that reflections arn't out of place in either.

Ultimately, that method makes sure everything gets loaded into your bsp. Unfortunately, i can't give too much info about it as that's not my area of expertise. Not that it was i whom your personally asked :p
 

Beetle

L9: Fashionable Member
Aug 17, 2008
627
178
Well whoever knows, please answer. :)

But yea grazr, I do max/min a lot, and I have known that to screw with the way textures appear on the screen, all white for instance. It just never occurred to me.