Jump to content

What defines the darkness of a map (night or day)?


Recommended Posts

Hi, I've been googling this for a long while but haven't found the answer. I was wondering, where is the lighting/darkness of a map defined? I mean what makes the map appear dark like it's at night as opposed to daytime? Is it something that can be changed by editing shaders or the .bsp file's entities? Or does it need to be defined before compiling the map?
I'm not a map maker but I want to try to make small changes to the game's original maps and I'm interested in how this works.

 

lWwATd.jpg

 

Thanks!

Link to comment

There's basically a big texture containing the light information called a "lightmap", which is calculated during compilation from light entities that are not themselves included, making the process irreversible. It's conceivable to edit the lightmap directly in theory, I believe it's too much work for anybody to have ever bothered since without a proper editor (which there isn't) it's nigh impossible to tell which part of the texture corresponds to which part of the map.

eezstreet likes this
Link to comment

Usually if you want a "night" version of a map you just need to compile two different versions a day and night version and then just have two different bsps for each one.  It's possible someone might be able to work out some sort of magic swapping thing between multiple lightmap points if you wanted time lapsing day-night cycles, but that'd take some weird hacking above my level of understanding.

Link to comment

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...