PDA

View Full Version : Lighting Problem


vecima
05-26-2007, 09:38 AM
I've been working on this particular map for quite a long time. i haven't changed the pitch/yaw/roll values of the light_environment, but in
the last set of screens, i INCREASED the brighness value. they are ordered chronologically.

http://type3studios.com/compare1.jpg

http://type3studios.com/compare1_ed.jpg

those first shots are from about 6 or more months ago.

the next 2 are from a few weeks ago.

http://type3studios.com/compare2.jpg

http://type3studios.com/compare2_ed.jpg

and these final shots are from today.

http://type3studios.com/compare3.jpg

http://type3studios.com/compare3_ed.jpg

does anyone know why the brightness could change that drastically?

haymaker
05-26-2007, 11:18 AM
probably not, but...leak?

vecima
05-26-2007, 01:33 PM
nope. compiles clean so far as i can tell.

i'll post the log with some new screens in a little while when it's done, as well as the settings for my light_environment

Shiny
05-26-2007, 10:17 PM
I'm guessing it is with the settings of your light_environment

Here is an easy way to plan this out-

Open the properties window for the light_environment:
1) Set the direction of the Angles (the little radar circle in the upper right hand corner of the class info tab) in the direction you want the light to shine. This represents the top view of the map. So if the line in the circle is pointing left (180 degrees), the light will shine in the left direction of the top 2D view.

2)Then set the Pitch at anywhere between 0 and -90, where 0 is straight across the horizon and -90 is straight down. This represents how high or low the light source is in the map.

It looks as if the Pitch in your map might be 0, which is straight across. Maybe not, but take a look at it in case.

Hope that helps.

Shiny
05-26-2007, 10:20 PM
P.S. The sun has nothing to do with the actual lighting in the map. It is basically just a glorified sprite. Changing its placement doesn't change the lighting effect.

vecima
05-27-2007, 04:13 PM
i realise that the sun has nothing to do with lighting the map, and i've checked all of the settings of the light_environment several times over before ever posting here... also these shots are after running 'buildcubemaps' in the console. also, the light environment described below is in BOTH the main part of the map, and the 3d skybox.

the settings of the light environment are:

Pitch, Yaw, Roll: -23 201 0
Pitch: -23
Brightness: 221 238 255 600 (600 is MUCH MUCH higher than the map used to be compiled with)
Ambient: 222 227 237 200 (200 is higher than nearly ALL HL2 maps)
BrightnessHDR: -1 -1 -1 -1
AmbientHDR: -1 -1 -1 -1

my compile log for the map in the following screens is here:
http://www.type3studios.com/compile_log.txt

here is the comparison shot:
http://www.type3studios.com/compare6.jpg

still a bit dark. here are some other shots from the map.
it almost looks like the light_environments aren't being compiled in

http://www.type3studios.com/compare4.jpg


the streetlight model isn't lit correctly... it's too bright (the light is off).
http://www.type3studios.com/compare5.jpg


the building in the skybox isn't lit right. also the church building isn't lit up. it shouldn't be all dark like that. (note the model above is lit up... that model looks correct).
http://www.type3studios.com/compare7.jpg


that skybox building model looks fullbright.
http://www.type3studios.com/compare8.jpg


the skybox building on the right is not lit correctly... in fact it looks as though it's lit on the other side (opposite from where the light should be shining).
http://www.type3studios.com/compare9.jpg

milarkey
05-27-2007, 08:30 PM
hey where do you get all those citadel buildings from? i cant see them on my list. i have like minature ones but thats all

Nicadeamas
05-27-2007, 09:56 PM
.
(about the citidel models)
The little one is quite large, and it is only 1/16th scale. There is no real sized model for the cididel because it would go off the grid.
You will need to learn about 3d skyboxes to use the citidel in your map.
http://developer.valvesoftware.com/wiki/3D_Skybox

vecima
05-28-2007, 01:01 PM
i don't understand what the problem is with this map. it's like the higher i push the brightness and ambience of the light_environment, the darker the map gets. i've wildly changed the colors, and observed models lighting up that color, but the lighting is still incorrect in the map.

Shiny
05-29-2007, 01:05 AM
Gee, I don't know. I've built a small map of my own and tested some of these things out but my light_environment works for me.

Did you say that you had 2 light_environments? I think you only need one. Just place it in the main part of your map and any area surrounded by the tools_skybox texture will have the same lighting effects. If you have 2, they might be "competing" with each other, making weird things happen.

Other than that, I'm not sure. Maybe try a smaller test map with some of the same buildings and the effect that you want. It'll be faster to compile and maybe easier to see what the problem is.

vecima
05-29-2007, 05:07 AM
You need a 2nd light_environment in your 3d skybox. well, you're supposed to need one anyway.

I have some new interesting results from tests... I don't know if i'm narrowing the problem down at all, but I feel these are worth mentioning...

for one test, I cordonned off my map so that there was no skybox and compiled with the same light_environment described above. it came out really bright (as the brightness is set pretty high), with I think the correct shadows. realising that my problem is somehow related to the skybox, I turned off the cordon, so that i was compiling the entire map AND skybox, except this time i deleted the light_environment that was IN the skybox. the map came out exactly as dark as it is in the last set of pictures.

so, for some reason, the light_environment in my skybox isn't working. the brush based buildings are coming out black, and the model based ones are coming out fullbright. i've tried having cubemaps in there, but later deleted them, as it didn't help, and a compile with no light_environment in the skybox came out exactly the same as a compile with one. the light_environment for both the skybox and the map were the exact one detailed above.

Shiny
05-29-2007, 10:27 PM
Interesting. Not sure what would be wrong with your skybox. You said there were no leaks, right?

Also, the light_environment contains the info for the entire .VMF file, so light will cast at your settings anywhere there is the tools_skybox texture. Here is a quote from this website (http://developer.valvesoftware.com/wiki/3D_Skybox) :

"A map must have a light_environment in it, otherwise models in the 3d skybox will be lit incorrectly. A light_environment in the non-skybox part of the map negates the need for one in the 3D skybox."

Although, I don't think it matters whether or not the light_environment is in the 3D skybox or in the normal skybox. You just have to have one somewhere in the inner parts of your map.

witalldonebefor
05-29-2007, 10:43 PM
I had a link to a website that checks compile logs for leaks and other bugs in a map. Once I find it I'll post it for you.

witalldonebefor
05-29-2007, 10:47 PM
Here it is, http://www.interlopers.net/errors/ go down to the search box check the thing off that says "This is a compile log" And paste your log in it. Then it wil give you all your maps errors.

Well, I copied your log into it and you have no problem with the map it's self, other than a few things off. But nothing that will kill you map, and has nothing to do with lighting.

cinnamon whirl
05-30-2007, 05:40 AM
I always work with just a single light_environment, in the main section of my map, rather than two. Further to Shiny's post:

"Normally, only one light_environment entity is required per VMF file. A 3D Skybox requires placement of an extra light_environment. If multiple light_environment entities are placed, Vrad uses the keyvalues from the first placed light_environment to calculate the lighting."

(http://developer.valvesoftware.com/wiki/Light_environment)

Which is rather conflicting advice. I would try getting rid of the skybox light_env., and checking to make sure you haven't accidentally placed the main map one inside a bit of geometry, or in a large model.

PS. I can't see your log file atm. Hope it isn't too long a compile!

vecima
05-30-2007, 05:46 AM
well, thanks for you help folks, but the issue is fixed.

as it turns out, if you use the citadel model that is partly transparent at the top (the one that looks like it fades into the clouds), you need to disable it's shadows. for some reason it seemed it was making my skybox fullbright and casting a huge shadow on the rest of the map (the citadel is pretty close to the map in the skybox). the other citadel didn't do this (my first few pics used the solid citadel), so that's what threw me off for so long. oh well, such is the price of discovery i guess.

thanks to Nicadeamas, and this thread at VERC (http://www.chatbear.com/unity2/4989/435,1133966383,20342/932492/0#3)
for finally getting this solved.

Shiny
05-30-2007, 09:13 AM
Ha! That's very interesting. I will keep that in mind as it will probably be useful information in the future!