-
Notifications
You must be signed in to change notification settings - Fork 19
Updated information about Clustered Lighting on Wiki #131
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from all commits
Commits
Show all changes
6 commits
Select commit
Hold shift + click to select a range
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,33 @@ | ||
| --- | ||
| title: Clustered Light Inspector | ||
| weight: 30 | ||
| features: | ||
| - USE_CLUSTERED | ||
| --- | ||
| # Developer UI | ||
|
|
||
| In P2CE, you can enable the developer UI using the `devui_toggle_menu` console command. Currently, it consists of 8 menus: Windows, Graphics, Profiler, Map, Scripting, Entity, Settings and Debug. | ||
|
|
||
| Graphics menu is the one needed. Upon pressing, four more buttons appear: Fog Config, Clustered Light Inspector, CSM Config and Post Processing. You need to choose the **Clustered Light Inspector**. | ||
|
|
||
|  | ||
|
|
||
| ## Clustered Light Inspector | ||
|
|
||
| Clustered Light Inspector is a menu where you can control `light_rt` entities in real time in-game. There are various options that give almost a full control over the entity. You can control all the default light options, such as `Constant`, `Linear`, `Quadratic`, `0% Intencity Falloff`, `50% Intencity Falloff`, `Minimum Brightness Threshold`, `Override Radius` and `Light Scale`, as well as `Color` using the color palette, `Shadow Scale`, `Near Z`, light's `Pattern` and entity's position in the map. | ||
|
|
||
| > [!TIP] | ||
| > Position bars are scrollable! | ||
|
|
||
| There are additional debugging and finding options. "Show Light Bounds" is relevant for `light_rt` and shows bounds of the light as a sphere. "Show Light Cone" is relevant for `light_rt_spot` and shows bounds of the light spot. "Show Only in Radius" will only display clustered lights in a specified radius. | ||
|
|
||
| * Top: Clustered Light Inspector | ||
| * Middle: Clustered Light Inspector with the selected light's properties tweaked | ||
| * Bottom: Clustered Light Inspector with the selected light's position edited using XYZ bars | ||
|
|
||
|  | ||
|
|
||
|  | ||
|
|
||
|  | ||
|
|
This file was deleted.
Oops, something went wrong.
Binary file not shown.
Binary file not shown.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Laveig marked this conversation as resolved.
Show resolved
Hide resolved
|
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file not shown.
Binary file not shown.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Diff not rendered.
Oops, something went wrong.
Oops, something went wrong.
Laveig marked this conversation as resolved.
Show resolved
Hide resolved
|
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Oops, something went wrong.
Oops, something went wrong.
Laveig marked this conversation as resolved.
Show resolved
Hide resolved
Laveig marked this conversation as resolved.
Show resolved
Hide resolved
|
Oops, something went wrong.
Laveig marked this conversation as resolved.
Show resolved
Hide resolved
Laveig marked this conversation as resolved.
Show resolved
Hide resolved
|
Oops, something went wrong.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
This file was deleted.
Oops, something went wrong.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1 +1 @@ | ||
| { "title": "Clustered Shading" } | ||
| { "title": "Clustered Lighting" } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,31 +1,67 @@ | ||
| --- | ||
| title: Quick Start Guide | ||
| weight: 20 | ||
| features: | ||
| - USE_CLUSTERED | ||
| --- | ||
| # Quick Start Guide | ||
|
|
||
| "I want an unmoving normal Source engine light, but better, and not slow" | ||
| ### "I want an expensive light that has fancy shadows and isn't supposed to move" | ||
|
|
||
| 1. Add a light_rt or light_rt_spot entity | ||
| 2. Set "Light mode" to "Specular" | ||
| 3. Make sure the "Shadowed" spawnflag is UNCHECKED | ||
| 4. Set "Radius" and "50 percent scale" KeyValues to adjust the look and feel | ||
| 5. For best results, use PBR textures with appropriate MRAOs and normal maps | ||
| 2. Set "Specular Light Mode" to "Dynamic Only" | ||
| 3. Set "Direct Light Mode" to "Dynamic Only" | ||
| 4. Set "Indirect Light Mode" to "Static Only | ||
| 5. Set "Initial Shadow Size" to 6 or 7 | ||
| 6. Make sure the "Shadowed" flag is **checked** | ||
| 7. Set "50 percent falloff distance" and "0 percent falloff distance" KeyValues to adjust the look and feel | ||
| 8. For best results, use PBR textures with appropriate MRAOs and normal maps | ||
|
|
||
|  | ||
|  | ||
|
|
||
|  | ||
| ### "I want a fully dynamic light that is supposed to move and interact with other dynamic lights" | ||
|
|
||
| "I want an expensive light that has fancy shadows or moves around" | ||
| 1. Add a light_rt or light_rt_spot entity | ||
| 2. Set "Specular Light Mode" to "Dynamic Only" | ||
| 3. Set "Direct Light Mode" to "Dynamic Only" | ||
| 4. Set "Indirect Light Mode" to "None" | ||
| 5. Set "Initial Shadow Size" to something around 5 | ||
| 6. Make sure the "Shadowed" flag is **checked** | ||
| 7. Set "50 percent falloff distance" and "0 percent falloff distance" KeyValues to adjust the look and feel | ||
| 8. For best results, use PBR textures with appropriate MRAOs and normal maps | ||
|
|
||
|  | ||
|
|
||
| ### "I want a regular, cheap static light" | ||
|
|
||
| 1. Add a light_rt or light_rt_spot entity | ||
| 2. Set "Light mode" to "Static Bounce" (for mostly stationary) or "Fully Dynamic" (frequently moves) | ||
| 3. Set "Initial Shadow Size" to somewhere around 5 to 7 | ||
| 4. Make sure the "Shadowed" spawnflag is CHECKED | ||
| 5. Set "Radius" and "50 percent scale" KeyValues to adjust the look and feel | ||
| 2. Set "Specular Light Mode" to "None" | ||
| 3. Set "Direct Light Mode" to "Static Only" | ||
| 4. Set "Indirect Light Mode" to "Static Only" | ||
| 5. Set "50 percent falloff distance" and "0 percent falloff distance" KeyValues to adjust the look and feel | ||
| 6. For best results, use PBR textures with appropriate MRAOs and normal maps | ||
|
|
||
|  | ||
|  | ||
|
|
||
| ### "I only want indirect lighting" | ||
|
|
||
| 1. Add a light_rt or light_rt_spot entity | ||
| 2. Set "Specular Light Mode" to "None" | ||
| 3. Set "Direct Light Mode" to "None" | ||
| 4. Set "Indirect Light Mode" to "Static Only" | ||
| 5. Set "50 percent falloff distance" and "0 percent falloff distance" KeyValues to adjust the look and feel | ||
| 6. For best results, use PBR textures with appropriate MRAOs and normal maps | ||
|
|
||
|  | ||
|
|
||
| ### "I only want a specular reflection" | ||
|
|
||
| 1. Add a light_rt or light_rt_spot entity | ||
| 2. Set "Specular Light Mode" to "None" | ||
| 3. Set "Direct Light Mode" to "None" | ||
| 4. Set "Indirect Light Mode" to "Static Only" | ||
| 5. Make sure the "Shadowed" flag is **checked** | ||
| 6. Set "50 percent falloff distance" and "0 percent falloff distance" KeyValues to adjust the look and feel | ||
| 7. For best results, use PBR textures with appropriate MRAOs and normal maps | ||
|
|
||
|  | ||
|  |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,39 +1,40 @@ | ||
| --- | ||
| title: "Troubleshooting and Known Issues" | ||
| title: "Known Issues" | ||
| weight: 40 | ||
| features: | ||
| - USE_CLUSTERED | ||
| --- | ||
| # Troubleshooting and Known Issues | ||
|
|
||
| This is a list of currently known issues and some troubleshooting tips for any issues with clustered lighting. | ||
|
|
||
| **"Everything is completely broken/corrupted"** | ||
| ### "My lights don't have shadows" / "My lights are shining through walls" | ||
|
|
||
| * Certain GPU models may have trouble running the clustered renderer. **If you experience this, let us know what GPU brand/model, operating system and other hardware specs you're using.** Usually this issue has been observed when running the game on Linux under DXVK on AMD platforms. However, the circumstances in which this has been observed should not be possible in production. | ||
| * For cheap static shadows, make sure "Direct light mode" is set to "Static Only" for your light entity. With this option, specular lighting will still travel through walls. If that's an issue for your map, you may need to use dynamic shadows or turn off specular. | ||
| * For dynamic shadows, make sure the "Shadowed" spawn flag is enabled on the light that should be casting shadows. | ||
|
|
||
| **"My lights don't have shadows" / "My lights are shining through walls"** | ||
| ### "I set the Shadowed spawn flag, but there are still no shadows/light leaks through walls" | ||
|
|
||
| * For cheap static shadows, make sure you are using baked direct lighting for static shadows, (Light mode "specular" or "static.") With this option, specular lighting will still travel through walls. If that's an issue for your map, you may need to use dynamic shadows or turn off specular. | ||
| * For dynamic shadows, make sure the "Shadowed" spawn flag is set on the light that should be casting shadows. | ||
| * You have too many dynamic shadows updating at once. Remember that **each shadow size level increases the shadow atlas size by a factor of 4**, and **the shadow atlas cannot have exceed a value of 7**, so if there are for example 2 `light_rt`s with shadow size of 6 close to each other, they will overlap and therefore will not produce any shadows. However, there is an unstable workaround, where by enabling `light_rt`s one by one they have a chance to keep their shadows. | ||
|
|
||
| **"I set the Shadowed spawn flag, but there are still no shadows/light leaks through walls"** | ||
| ### "My dynamic shadows are blurry" | ||
|
|
||
| * You may have too many dynamic shadows updating at once. This is a known issue without a current workaround. Let us know if you find one! | ||
| * Set the "Initial Shadow Size" keyvalue of your light to something around 6. | ||
|
|
||
| **"My dynamic shadows are blurry"** | ||
| ### "My dynamic shadows are 'frozen' or don't update" / "Some entities like rockets don't cast shadows" | ||
|
|
||
| * Set the "Initial Shadow Size" key on your light to something around 7, or higher if you really need it. | ||
| * Shadows are updated when entities move near the light source. Some entities aren't hooked up properly, this is a known issue. Most entities should be fixed (prop_dynamic, prop_physics), but if you find any entity that does not update shadows, make sure to let us know on the Strata issue tracker. | ||
|
|
||
| **"My dynamic shadows are 'frozen' or don't update" / "Some entities like rockets don't cast shadows"** | ||
| ### "My dynamic shadows update in low fps" | ||
|
|
||
| * Shadows are updated when entities move near the light source. Some entities aren't hooked up properly, this is a known issue. Most entities should be fixed (prop_dynamic, prop_physics), but if you find any entity that does not update shadows, make sure to let us know on the [Strata issue tracker](https://github.com/StrataSource/Engine/issues). | ||
| * There is a cap on how many faces can get their shadows updated, and this cap is called the **shadow frame budget**. This is an optimisation technique that prevents the game from lagging on low-end devices. You can increase the budget by using the `r_clustered_shadowframebudget` console command. Note that this will significantly lower your fps when used carelessly. | ||
|
|
||
| **"Shadows glitch or flicker when a light is moving"** | ||
| ### "Shadows glitch or flicker when a light is moving" | ||
|
|
||
| * This is a known issue without a current workaround. Let us know if you find one! | ||
| * Clustered shadows update less frequently than the game itself, so if a moving clustered light entity cannot keep up updating the shadowmap, the shadows from that entity will flicker. This often happens in heavy maps with a lot of clustered lights, and rarely if the light peaks from a corner, especially when lighting up a huge area. There is no workaround other than not moving clustered lights too fast and using dynamic shadows only where nesessary. | ||
|
|
||
| **"I see light coming from light sources that aren't in the current PVS"** | ||
| ### "Everything is completely broken/corrupted and I can't fix it" | ||
|
|
||
| * This is a known issue without a current workaround. Let us know if you find one! | ||
| * Certain GPU models may have trouble running the clustered renderer. **If you experience this, let us know what GPU brand/model, operating system and other hardware specs you're using.** Clustered lights may act weird when running the game on Linux under DXVK on AMD platforms. However, the circumstances in which they break should not be possible in production. | ||
|
|
||
| If you have any issues that are not addressed in this article, make sure to report it to us on the [Strata issue tracker](https://github.com/StrataSource/Engine/issues). | ||
| ## If you have any issues that are not addressed in this article, make sure to report it to us on the [Strata issue tracker](https://github.com/StrataSource/Engine/issues). |
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.