Jump to content

Home

A good lighting tutorial?


MightyMidget

Recommended Posts

Excerpt from my Terragen Custom Skies Tutorial (check JK2Review/tutorials or my site for the full text):

 

If you want your sky to emit light, this is what you need:

 

textures/yourmap/sky_light

{

qer_editorimage textures/skies/sky.tga

q3map_skylight <amount> <iterations>

q3map_sun <R> <G> <B> <light> <heading> <elevation>

surfaceparm sky

surfaceparm noimpact

surfaceparm nomarks

notc

q3map_nolightmap

skyParms textures/yourmap/yoursky 512 -

}

 

The skylight command tells the game that your sky emits light. Replace <amount> with the amount of light (100 is fairly bright), and make <iterations> about 3-4. Note that q3map_skylight only works with the q3map2 compiler, if you are using SOF2MAP, you must use q3map_surfacelight <amount>.

 

q3map_sun controls the sun that emits light in game. Enter the color of the sunlight in RGB normalized values (they range from 0 to 1), and input the light strength (100 is fairly bright), heading of the sunlight in degrees, and the elevation in degrees (0 is sunrise/set, 90 is noon).

 

Edit: You can also write your own light-emitting shaders. To make a shader emit light, just add the line "surfacelight <amount>" to the code. You'll have to play with <amount> to get it right (it's a numeric value, think of it as the shader's light key).

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...