| Author |
Topic: worldspawn ambient lighting question |
| ShockRave~rb |
General Member Since: Dec 23, 2006 Posts: 58 Last: Dec 23, 2006 [view latest posts] |
|
|
|
|
| [AoG]Vortex~rb |
General Member Since: Dec 23, 2006 Posts: 413 Last: Dec 23, 2006 [view latest posts] |
|
|
|
|
| ShockRave~rb |
General Member Since: Dec 23, 2006 Posts: 58 Last: Dec 23, 2006 [view latest posts] |
|
|
|
|
| spike232~rb |
General Member Since: Dec 23, 2006 Posts: 5892 Last: Dec 23, 2006 [view latest posts] |
|
|
|
|
| [AoG]Vortex~rb |
General Member Since: Dec 23, 2006 Posts: 413 Last: Dec 23, 2006 [view latest posts] |
|
|
|
Category: SoFII Mapping Posted: Wednesday, Aug. 21, 2002 01:33 pm |
 |
Some skybox shaders provide a parameter for sunlight, some don't. Still, it's the best way to get light in outdoor areas.
The sunlight shader key works like this: Key: q3map_sun Value: <r> <g> <b> <intensity> <degrees> <elevation>
rgb is the rgb color, each normalized 0.0 to 1.0 with a space between. intensity is the brightness of the sun. This light does not weaken with distance. degrees is the angle of the source of the sunlight (0 = east, 90 = north, etc). elevation is degrees up from the horizon (0 = horizon, 90 = high noon).
You'll probably also want to include a q3map_surfacelight property in your skybrush to fill in the shadows, since the sunlight is very directional and looks like crap by itself. Key: q3map_surfacelight, Value: <light value>
If the skybrush is overcast or night, make the sunlight weak relative to the surfacelight. If it's a clear day make the sunlight stronger to create stronger shadows. |
 |
|
|
| ShockRave~rb |
General Member Since: Dec 23, 2006 Posts: 58 Last: Dec 23, 2006 [view latest posts] |
|
|
|
|
| Gabriel~rb |
General Member Since: Dec 23, 2006 Posts: 23 Last: Dec 23, 2006 [view latest posts] |
|
|
|
Category: SoFII Mapping Posted: Wednesday, Aug. 28, 2002 04:24 am |
 |
Sorry for the late response. Here is a skybox shader example for you to peruse:
//SKYBOXES q3map_sun <red> <green> <blue> <intensity> <degrees> <elevation> color will be normalized, so it doesn't matter what range you use intensity falls off with angle but not distance 100 is a fairly bright sun degree of 0 = from the east, 90 = north, etc. altitude of 0 = sunrise/set, 90 = noon
textures/mytexdirectory/Gabriel_skybox { qer_editorimage textures/mytexdirectory/Gabrielsky1.tga surfaceparm noimpact surfaceparm nolightmap q3map_lightsubdivide 512 surfaceparm sky q3map_sun .5 .37 .19 150 11 39 q3map_surfacelight 85
skyparms env/mymapname/Gabrielsky - - }
In order for these types of skyboxes to work you have to add a folder named env to your base folder. Within the env folder you create another folder and name it after your map. You will then add the six jpeg.s of your skybox (bottom, right, left, front, back, and top) to this folder. A great program for rendering skyboxes is Terragen.
You will then have to create an application texture Gabrielsky1.tga and save it into a texture directory of your choice. If you are making a level in GTK you will need to add your new shader to the scripts folder and add its name to the shaderlist.
Now you can load radiant and then the texture folder that contains your application texture. Just apply the texture to the six skybox brush faces and compile. The engine should line the sky edges up correctly if you rendered them efficiently. |
 |
|
|
| ShockRave~rb |
General Member Since: Dec 23, 2006 Posts: 58 Last: Dec 23, 2006 [view latest posts] |
|
|
|
|
| Gabriel~rb |
General Member Since: Dec 23, 2006 Posts: 23 Last: Dec 23, 2006 [view latest posts] |
|
|
|
|
| [AoG]Vortex~rb |
General Member Since: Dec 23, 2006 Posts: 413 Last: Dec 23, 2006 [view latest posts] |
|
|
|
|
|
|
mp_TempleCall of Duty: Mods: Multiplayer (624.12Kb)
|