Difference between revisions of "Lighting:Light Style"

From Custom Map Makers Wiki
Jump to: navigation, search
(Light Style Enitie)
 
(6 intermediate revisions by 3 users not shown)
Line 4: Line 4:
 
===About===
 
===About===
  
Adding light style to a light entities let's the mapper create the effect of dynamik lighting.
+
Adding light style to a light entities let's the mapper create the effect of dynamic lighting.
True dynamik lightning in Urban Terror does not exsist. The effect is created simply by the engin using a lightimage and shaders.
+
True dynamic lightning in Urban Terror does not exists. The effect is created simply by the engine using a lightimage and shaders.
  
One thing to think of before using Light Style is that the engin have to redraw the scene with the lights. This is affecting the fps of the level. So use it with care.
+
One thing to think of before using Light Style is that the engine have to redraw the scene with the lights. This is affecting the fps of the level. So use it with care.
  
  
 
===How to. Step by Step===
 
===How to. Step by Step===
  
1. Start by selcting any brush that is a part of your worldspawn.
+
1. Start by selecting any brush that is a part of your worldspawn.
  
2. Add the folowing key "_style1alphaGen" with the value "wave sin .5 .3 .25 1.5" (without the ")
+
2. Add the following key "_style1alphaGen" with the value "wave sin .5 .3 .25 1.5" (without the ")
  
3. Add the folowing key "_style1rgbGen" with the value "wave noise 0.5 1 0 5.37" (without the ")
+
3. Add the following key "_style1rgbGen" with the value "wave noise 0.5 1 0 5.37" (without the ")
  
 
4. Edit the values to the value you want
 
4. Edit the values to the value you want
  
 
5. Add a light and enter the key "style" with the value "1" (without the ").
 
5. Add a light and enter the key "style" with the value "1" (without the ").
 +
 +
 +
===Adding lightstyle in an shader===
 +
You can also add the lighstyle to a shader insted of to a light.
 +
To do this simply add q3map_lightStyle 1 in the shader.
 +
If you use more than one lightsyle you just replace the 1 with the ligthstyle you want.
  
  
Line 35: Line 41:
  
  
{{Warning|Use the "Light Style Enitie" with care. It is not the best way of doing this and should not be the first tested}}  
+
{{Warning|Use the "Light Style Entity" with care. It is not the best way of doing this and should not be the first tested}}  
 +
 
 +
===Light Style Entity===
 +
In some cases adding lightstyle to the worldspawn does not work. If that happens you can create a [[Entities:Func#func_group|func_group]], adding the values to it instead of the worldspawn. Or you can add a entity with the values.
  
===Light Style Enitie===
+
To make a entity make a new file in radiant/q3.game/baseq3/ called lightstyle.def.
In some cases adding lightstyle to the worldspawn does not work. If that happends you can make a [[func_group]], adding the values to it instead of the worldspawn. Or you can add a enitie with the values.
+
Add the following lines to this file:
  
To make a enitie make a new file in radiant/q3.game/baseq3/ called lightstyle.def.
 
Add the folowing lines to this file:
 
{{
 
  
 
//Light_style
 
//Light_style
Line 49: Line 55:
  
 
/*QUAKED Lightstyle (0.3 0.9 0.4)(-5 -5 -5) (5 5 5)
 
/*QUAKED Lightstyle (0.3 0.9 0.4)(-5 -5 -5) (5 5 5)
An false enitie used for adding light styles to the map.
+
 
 +
An false entity used for adding light styles to the map.
 +
 
 
-------- KEYS --------
 
-------- KEYS --------
_style1alphaGen : This controles the behavior of the light(eg. wave sin .5 .3 .25 1.5)
+
_style1alphaGen : This controls the behaviour of the light(eg. wave sin .5 .3 .25 1.5)
_style1rgbGen : This controles the color of the light(eg. wave noise 0.5 1 0 5.37)
+
 
 +
_style1rgbGen : This controls the colour of the light(e.g. wave noise 0.5 1 0 5.37)
 
*/
 
*/
  
}}
 
  
When you open radiant again there will be a new enitie in the list called Lightstyle.
+
When you open radiant again there will be a new entity in the list called Lightstyle.
It will look like a small green box. The values in the comments are suggestions, so just enter the walues you need instead.
+
It will look like a small green box. The values in the comments are suggestions, so just enter the values you need instead.
 +
 
 +
[[Category:Lighting]]

Latest revision as of 21:02, 30 January 2012

Roadworks.png This page is work in progress!

Light Style

About

Adding light style to a light entities let's the mapper create the effect of dynamic lighting. True dynamic lightning in Urban Terror does not exists. The effect is created simply by the engine using a lightimage and shaders.

One thing to think of before using Light Style is that the engine have to redraw the scene with the lights. This is affecting the fps of the level. So use it with care.


How to. Step by Step

1. Start by selecting any brush that is a part of your worldspawn.

2. Add the following key "_style1alphaGen" with the value "wave sin .5 .3 .25 1.5" (without the ")

3. Add the following key "_style1rgbGen" with the value "wave noise 0.5 1 0 5.37" (without the ")

4. Edit the values to the value you want

5. Add a light and enter the key "style" with the value "1" (without the ").


Adding lightstyle in an shader

You can also add the lighstyle to a shader insted of to a light. To do this simply add q3map_lightStyle 1 in the shader. If you use more than one lightsyle you just replace the 1 with the ligthstyle you want.


Multiple Light Styles

It is possible to add more light styles. To do that enter "_styleXalphaGen" and "_styleXrgbGen" with another number instead of the X.


Sample Map

There is a test map here: http://www.robotrenegade.com/q3map2/downloads/samples/maps/map-slstyle.zip


The q3map2 will generate lightmaps and a shaderfile for the light style. The lightstyle shader that is generated should not be changed.


Error.png Use the "Light Style Entity" with care. It is not the best way of doing this and should not be the first tested


Light Style Entity

In some cases adding lightstyle to the worldspawn does not work. If that happens you can create a func_group, adding the values to it instead of the worldspawn. Or you can add a entity with the values.

To make a entity make a new file in radiant/q3.game/baseq3/ called lightstyle.def. Add the following lines to this file:


//Light_style

// * * * * * * * *

/*QUAKED Lightstyle (0.3 0.9 0.4)(-5 -5 -5) (5 5 5)

An false entity used for adding light styles to the map.


KEYS --------

_style1alphaGen : This controls the behaviour of the light(eg. wave sin .5 .3 .25 1.5)

_style1rgbGen : This controls the colour of the light(e.g. wave noise 0.5 1 0 5.37)

  • /


When you open radiant again there will be a new entity in the list called Lightstyle. It will look like a small green box. The values in the comments are suggestions, so just enter the values you need instead.