Lighting and cubemaps

Discussion in 'Mapping Questions & Discussion' started by Mylakovich, Feb 20, 2008.

  1. Mylakovich

    Mylakovich L1: Registered

    Messages:
    2
    Positive Ratings:
    0
    I'm working with Hammer for the first time and I have some noob questions. I've been reading the Valve Developer Comunity Wiki as well as these forums, which have been very helpful. I'm surprised how many tutorials and assistance documentation there is. I've created a simple map, and worked out how to do the fundamental stuff like spawn zones and control points so it has reached the "hideous but technically playable" stage.

    But now I am having an issue with the lighting and cubemaps. I set the skybox to "sky_hydro_01", and set the light_environment entity to match the value according to the Skylist on the Valve Developer Community wiki. I also created an env_cubemap entity near the center of the map to test it out and left the size as Default.

    Here is what I have so far:
    Hammer Screenshot

    When I run the map, things look ok but there are a few issues. First, the lighting looks decent, but certain parts of the map are effected by shadows inappropriately. Primarily, the floor and other areas like the red fort appear either lit or shadowed from a far distance depending on if my character is in the light or shadow. If I move, the whole world will rapidly brighten or darken unrealisticly.
    For instance in this shot, I am standing in a shadow looking across the level.
    In shadow
    Now when I take two steps forward out of the shadow:
    In sunlight
    everything immediately becomes drasticly brighter, in particular the floor and the red fort.

    One more example of this: In the shadows, and out.

    Any advice on how to fix this would be appreciated.

    The second issue involves the env_cubemaps. When I type buildcubemaps in the console, it goes through some images but then gives me an error:
    Not really sure what to make of this.

    Anyway, thanks in advance.
     
  2. dirtyminuth

    dirtyminuth L5: Dapper Member

    Messages:
    221
    Positive Ratings:
    14
    Textures that have player position dependent lighting are in the "models/props_*" directories (in the Texture Browser). Do not use them for texturing brushes. There is likely an equivalent texture in the browser without the "models/props_*" prefix.

    Don't worry about the cubemaps error you quoted. Cubemaps will still build successfully.
     
  3. Mylakovich

    Mylakovich L1: Registered

    Messages:
    2
    Positive Ratings:
    0
    I replaced most of the textures and now the lighting looks good. Thanks!
     
  4. DrHaphazard

    DrHaphazard L5: Dapper Member

    Messages:
    249
    Positive Ratings:
    12
    For future reference Mylakovich, and you may well have known this already, but its quite easy to replace textures en masse. Simply click on the Texture application, select the incorrect texture then click the replace button next to the texture preview. Then simply find the correct version of your texture in the second browser that pops up.
     
  5. Kataan

    Kataan L1: Registered

    Messages:
    9
    Positive Ratings:
    0
    I've been screwing around with lighting for the last few days thinking i had messed something up, but it was all due to those model textures.

    This was very help full!

    Thank you.