Help: How to get those shiny floors.

Discussion in 'Mapping Questions & Discussion' started by MrStump, Aug 23, 2008.

  1. MrStump

    MrStump L1: Registered

    Messages:
    21
    Positive Ratings:
    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.
     
  2. Beetle

    Beetle L9: Fashionable Member

    Messages:
    627
    Positive Ratings:
    141
    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.
     
    • Thanks Thanks x 1
  3. MrStump

    MrStump L1: Registered

    Messages:
    21
    Positive Ratings:
    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?
     
  4. Beetle

    Beetle L9: Fashionable Member

    Messages:
    627
    Positive Ratings:
    141
    Did you restart the map once without exiting the game after you did buildcubemap?
     
  5. samn

    samn L4: Comfortable Member

    Messages:
    158
    Positive Ratings:
    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.
     
    • Thanks Thanks x 2
  6. MrStump

    MrStump L1: Registered

    Messages:
    21
    Positive Ratings:
    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.
     
  7. grazr

    aa grazr Old Man Mutant Ninja Turtle

    Messages:
    5,436
    Positive Ratings:
    3,562
    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.
     
    • Thanks Thanks x 1
  8. Beetle

    Beetle L9: Fashionable Member

    Messages:
    627
    Positive Ratings:
    141
    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.
     
  9. Altaco

    Altaco L7: Fancy Member

    Messages:
    485
    Positive Ratings:
    121
    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.
     
  10. MrStump

    MrStump L1: Registered

    Messages:
    21
    Positive Ratings:
    2
    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.
     
  11. Beetle

    Beetle L9: Fashionable Member

    Messages:
    627
    Positive Ratings:
    141
    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.
     
  12. grazr

    aa grazr Old Man Mutant Ninja Turtle

    Messages:
    5,436
    Positive Ratings:
    3,562
    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
     
    • Thanks Thanks x 1
  13. Beetle

    Beetle L9: Fashionable Member

    Messages:
    627
    Positive Ratings:
    141
    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.
     
  14. FaTony

    FaTony Banned

    Messages:
    902
    Positive Ratings:
    160
    You said it! Time for the HUGE post!

    /me starting a tutorial thread.
     
  15. FaTony

    FaTony Banned

    Messages:
    902
    Positive Ratings:
    160