Jump to content

Home

A good lighting tutorial?


MightyMidget

Recommended Posts

Posted

I did the one at rich deisels and i know how to use radial and spot lights now, but are there any other kinds of lights to use? How about a 'sun' light a light you can apply to a sky box that makes it light up your level as the sun would?

Posted

Well you could add a light command thing to your skybox (I'm sorry, but you gotta ask rgoer about those). I'm not very good with skyboxes and shaders though, sorry. It is possible though. I'm pretty sure... :p

Posted

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

 

  Quote
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).

Archived

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

×
×
  • Create New...