Proper way to create reflective metal surfaces (phong/envmap?)

Discussion in 'Mapping Questions & Discussion' started by Theobromin, Apr 12, 2012.

  1. Theobromin

    Theobromin L1: Registered

    Messages:
    9
    Positive Ratings:
    0
    Hello there, looking for a way to make a realistic metal surface (like stainless steel or similar)-

    I suppose phong would produce a more dull reflection, while envmap would look rather polished?

    But what kind of configurations usually tend to look the best?
     
  2. grazr

    aa grazr Old Man Mutant Ninja Turtle

    Messages:
    5,436
    Positive Ratings:
    3,562
    Well it depends on what you want your metal to resemble, there are lots of types of metal with all sorts of finishes.

    For a default shiney metal a high reflectivity helps.
     
    • Thanks Thanks x 1
  3. Theobromin

    Theobromin L1: Registered

    Messages:
    9
    Positive Ratings:
    0
    Okay, thanks, guess I'll just do it by trying out different textures with high reflectivity.

    In particular, I've been looking for a neat looking metal door in a spot where I really don't want to use the standard door props....
     
  4. grazr

    aa grazr Old Man Mutant Ninja Turtle

    Messages:
    5,436
    Positive Ratings:
    3,562
    I'm not sure how you are with models but there are numerous versions and styles of metal materials for reference on models. For example the distillery models found in gorge are clean and shiney and have clear cubemap reflections. It might be worth investigating some of the material files for them.

    P.S. To specify what i meant by high reflectivity, i was refering to light reflectivity. I'm not sure how clear i was about that in my OP. Hopefully you understood but if not, i made this post script to make sure.
     
  5. Theobromin

    Theobromin L1: Registered

    Messages:
    9
    Positive Ratings:
    0
    I suppose you mean high $reflectivity values?
     
  6. Rexy

    aa Rexy The Kwisatz Haderach

    Messages:
    1,795
    Positive Ratings:
    2,367
    If you're looking for material shader parameter to use with world geometry, such as 'lightmappedgeneric' (brush textures), phong doesn't work (at least the last time I checked). The phong shader parameter in the tf2 version of source are strictly a model privilege.

    But you're right in your original assumption: "I suppose phong would produce a more dull reflection, while envmap would look rather polished".

    Your other option may be:
    https://developer.valvesoftware.com/wiki/Func_reflective_glass


    Reflectivity isn't going to make your material look reflective. It just changes how much light is bouncing off the material in question.
    https://developer.valvesoftware.com/wiki/$reflectivity
     
    Last edited: Apr 12, 2012
  7. grazr

    aa grazr Old Man Mutant Ninja Turtle

    Messages:
    5,436
    Positive Ratings:
    3,562
    Doesn't it also increase the bloom from the surface of the material?
     
  8. Rexy

    aa Rexy The Kwisatz Haderach

    Messages:
    1,795
    Positive Ratings:
    2,367
    Possibly? Ask YM, he wrote the nodraw.net article about it.
     
  9. YM

    aa YM LVL100 YM

    Messages:
    7,099
    Positive Ratings:
    5,742
    Nope. All reflectivity does is change the number of successful bounces for each colour channel off that texture. It's automated so normally you don't need to fiddle with it too so a white texture will have high values and a dark texture will have low values. This is good for matt textures but if you have super-shiny black metal, you're gunna want to bump it up a little so the surrounding brushes get enough bounce.

    It has zero impact on the cubemaps on the texture.

    I'm pretty sure you can use phong together with an envmap, I think the 2-pipes and 3-pipes models use both together.

    The best thing to do is to experiment. Set the envmap to cubemap and play with envmapmask, tint and contrast settings (higher contrast means bright spots on a dark reflection) (slightly bluer/redder tint can change the material's warmth)
     
    • Thanks Thanks x 1
  10. BeaverKing

    BeaverKing L1: Registered

    Messages:
    11
    Positive Ratings:
    2
    that reflective glass entity, from what that wiki says, does not reflect players in real time, only the water shader does that, if im not mistaken. you can check this old article on the subject if that's the type of effect you're going for... -> http://www.gamebanana.com/css/tuts/5156

    update that technique a little, maybe that flat water texture on a func_brush with low opacity and no collisions to avoid projectiles causing splashes, 1 unit thick and in front of a normal metal wall to simulate a real time reflection, clip brush in the same place to keep players from passing through it...

    i dunno if thats what you want, just figured id throw it out there in case it helps spark an idea

    peace
     
    Last edited: Apr 13, 2012
  11. A Boojum Snark

    aa A Boojum Snark Toraipoddodezain Mazahabado

    Messages:
    4,769
    Positive Ratings:
    5,527
    Water can't be on entities (exception: cheap water on func_water_analog), and the reflection shader only words correctly on a horizontal plane. There isn't really a way to make a super crisp reflection in anything but proper water.
     
  12. BeaverKing

    BeaverKing L1: Registered

    Messages:
    11
    Positive Ratings:
    2
    hmm. guess doing it the way that old article describes with the fake reflection under the actual floor is the only way... could almost swear ive seen a mirror on a wall that had real time player reflections before... maybe it was just npc's...

    oh well. was an idea :p

    maybe someone can make a modified shader to make the effect work on a brush with a slope in the z axis... i found a few custom shaders years ago that added things like parallax mapping and other stuff back into the game. anything's possible :)
     
    Last edited: Apr 13, 2012