KatsBits Community

Game Editing => idTech Editing Hints & Tips => Topic started by: kat on June 25, 2015, 02:46:39 AM

Title: r_lightdetaillevel [n]
Post by: kat on June 25, 2015, 02:46:39 AM
What is 'Light Detail Level'?
'r_lightdetaillevel [n]' or 'light detail level', is a method of controlling whether lights get rendered based on the quality settings Quake 4 is run at - 'low', 'meduim', 'high' or 'ultra' - and their asigned 'value' ('[n]' above). By default all lights placed in the game world have a value of '10' which means it will be rendered irrispective of the quality settings Quake 4 is run at; obviously this means a map rendering all the lights available on a low end PC will kick the FPS hard.


General Entity Editor - 1: Enter 'key' and 'value' data. 2: Settings appears after being set. 3: Entity notes
To control this we can use different values for light entities so that they only draw under certain quality settings or when entering the r_lightdetaillevel command variable into the in game console.

How to use light detail level
You can apply a setting in two ways, with a light entity placed in a map you can then;1 : Entity inspector (general)
Requires you to manually type in the correct key/value pairing to get this to work. Select the light and type the following into the Entity inspector;2: Light inspector (specific)
Means opening the Light properties inspector and setting a value in the text field underneath the check-boxes that activate/deactivate whether the light casts shadows and so on; it displays '10' be default, so;

Light Entity Editor - highlighted area indicates where value is entered
General Notes
Although you can go pretty '****' with this feature, setting lights all manner of values, id and Raven generally stuck to the following for different 'types' of light;Once in game you can switch back and forth between full light render and partial by using 'r_lightdetaillevel 5' (partial) or 'r_lightdetaillevel 0' (full) - using the example settings above.

Be sure to include some information in your readme file to let players know that you have used light detail level and what optimum r_ they need to use.

Keep in mind that this is probably something you may want to leave till last or near the end of your map build so you don't 'forget' you've done it when you keep asking yourself why 'x' light isn't working!.