Lighting and cubemaps

Mylakovich

L1: Registered
Feb 20, 2008
2
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:
Current mod isn't in a subdirectory of "game"!
bounce: 1/1 sample: 1/1
*** 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!
Not really sure what to make of this.

Anyway, thanks in advance.
 

dirtyminuth

L5: Dapper Member
Nov 5, 2007
221
15
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.
 

DrHaphazard

L5: Dapper Member
Jan 6, 2008
249
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.
 

Kataan

L1: Registered
Mar 12, 2009
9
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.