KatsBits Community

r_lightdetaillevel [n]

kat · 1 · 5416

0 Members and 1 Guest are viewing this topic.

Offline kat

  • Administrator
  • Hero Member
  • *
    • Posts: 2659
    • KatsBits
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;
  • Use the general Entity Properties inspector (keyboard 'N')
  • Use the Light properties inspector (keyboard 'J')
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;
  • key = lightDetail
  • value - [n] (a number from 0-10)
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;
  • Enter a value in the text field and click 'Apply'.

Light Entity Editor - highlighted area indicates where value is entered
General Notes
Although you can go pretty 'hardcore' with this feature, setting lights all manner of values, id and Raven generally stuck to the following for different 'types' of light;
  • 10 - for all 'main' lights. Light volumes that you couldn't do without, the ones that actually 'light' the map or areas in question (this is the default value for lights).
  • 5 - for any other light. Applied to 'detail' and 'effects' lights, lights that are used to highlight objects or features; a red light used over a jumppad for instance would be set to a detail level of '5'.
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!.