diff --git a/docs/Graphics/Graphics-General/ParallaxCorrectedCubemaps.md b/docs/Graphics/Graphics-General/ParallaxCorrectedCubemaps.md new file mode 100644 index 000000000..d92f7d3ad --- /dev/null +++ b/docs/Graphics/Graphics-General/ParallaxCorrectedCubemaps.md @@ -0,0 +1,66 @@ +--- +title: Parallax Corrected Cubemaps +--- +# Parallax Corrected Cubemaps + +![Click on the hand holding a mask](images/guide_parallax_cubemaps.jpg) + +This page covers Strata's implementation of Parallax-Corrected Cubemaps. These cubemaps are created with a combination of the `env_cubemap` point entity and the `parallax_obb` brush entity. + +## Overview +This tutorial is from the [Momentum Mod Wiki](https://docs.momentum-mod.org/shaders/parallax_corrected_cubemaps/). + +> [!NOTE] +> Thanks to Brian Charles for his work on this feature. +> More technical information can be found on the [Valve Developer Wiki Page.](https://developer.valvesoftware.com/wiki/Parallax_Corrected_Cubemaps) + +## Prerequisites +* Be proficient in using the Hammer Editor +* Have the appropriate `.fgd` file for your game in your Hammer configuration +* Know how to use the developer console +## Components of a Parallax-Corrected Cubemap + +In Hammer, Parallax-Corrected Cubemaps need two entities to function correctly: + +* A trigger brush tied to a parallax_obb entity - must be named + +* An env_cubemap with “Cubemap Bounds” set to the name of the parallax_obb + +![Click on the hand holding a mask](images/cube_0.jpg) + +> [!NOTE] +> In older versions of Momentum Mod, you may notice a box appear in the centre of the brush when you tie it to a parallax_obb entity like shown above. +> This is normal and allows you to more easily select the brush if you have made it match the shape of the room. + +Any regular LightmappedGeneric materials will still be able to use the cubemap as normal, this feature simply adds functionality on top of the existing env_cubemap in conjunction with an extra entity and shader to use inside .VMT files. + +> [!TIP] +> There are some important things to take note of: +> * The parallax_obb entity must be a single box brush +> * The Parallax-Corrected cubemap is still built the same way regular cubemaps are. This means that you may have distortion in the reflections depending on where you place the env_cubemap and the shape of the parallax_obb brush. +> +> This example has a wide room with a low ceiling as well as the cubemap entity not quite in the centre: + +![Click on the hand holding a mask](images/cube_4.jpg) + +## Hammer +Here is the process of creating the necessary entities in Hammer for this feature to work in a room you’ve already made. + +The first thing you should do is to create the “bounding box” of the cubemap with a trigger brush. Make it so that it fits the room as closely as possible. +![Click on the hand holding a mask](images/cube_2.jpg) + +Once you’ve made the trigger brush, tie it to a parallax_obb entity and give it a name: + +![Click on the hand holding a mask](images/cube_3.png) + +That’s all that is needed for the brush, onto the cubemap entity itself. + +When creating an env_cubemap you should see an extra option called “Cubemap Bounds”. Set it to the name of the parallax_obb you just created. + +![Click on the hand holding a mask](images/cube_1.png) + +This should be all the setup that is required in Hammer. + +You should be able to compile your map as normal and build the cubemaps in game to see the effects if you have any supported materials in the map. + + diff --git a/docs/Graphics/Graphics-General/images/cube_0.jpg b/docs/Graphics/Graphics-General/images/cube_0.jpg new file mode 100644 index 000000000..47542a59a Binary files /dev/null and b/docs/Graphics/Graphics-General/images/cube_0.jpg differ diff --git a/docs/Graphics/Graphics-General/images/cube_1.png b/docs/Graphics/Graphics-General/images/cube_1.png new file mode 100644 index 000000000..7d879e488 Binary files /dev/null and b/docs/Graphics/Graphics-General/images/cube_1.png differ diff --git a/docs/Graphics/Graphics-General/images/cube_2.jpg b/docs/Graphics/Graphics-General/images/cube_2.jpg new file mode 100644 index 000000000..2048e4167 Binary files /dev/null and b/docs/Graphics/Graphics-General/images/cube_2.jpg differ diff --git a/docs/Graphics/Graphics-General/images/cube_3.png b/docs/Graphics/Graphics-General/images/cube_3.png new file mode 100644 index 000000000..046a8bea8 Binary files /dev/null and b/docs/Graphics/Graphics-General/images/cube_3.png differ diff --git a/docs/Graphics/Graphics-General/images/cube_4.jpg b/docs/Graphics/Graphics-General/images/cube_4.jpg new file mode 100644 index 000000000..9e97dcce9 Binary files /dev/null and b/docs/Graphics/Graphics-General/images/cube_4.jpg differ diff --git a/docs/Graphics/Graphics-General/images/guide_parallax_cubemaps.jpg b/docs/Graphics/Graphics-General/images/guide_parallax_cubemaps.jpg new file mode 100644 index 000000000..f6969c986 Binary files /dev/null and b/docs/Graphics/Graphics-General/images/guide_parallax_cubemaps.jpg differ diff --git a/docs/Graphics/Graphics-General/meta.json b/docs/Graphics/Graphics-General/meta.json new file mode 100644 index 000000000..222035447 --- /dev/null +++ b/docs/Graphics/Graphics-General/meta.json @@ -0,0 +1,4 @@ +{ + "title": "Parallax Corrected Cubemaps", + "weight": 20 +} diff --git a/docs/lighting/clustered/clustered_light_inspector.md b/docs/Graphics/clustered/clustered_light_inspector.md similarity index 100% rename from docs/lighting/clustered/clustered_light_inspector.md rename to docs/Graphics/clustered/clustered_light_inspector.md diff --git a/docs/lighting/clustered/images/clustered_ui1.png b/docs/Graphics/clustered/images/clustered_ui1.png similarity index 100% rename from docs/lighting/clustered/images/clustered_ui1.png rename to docs/Graphics/clustered/images/clustered_ui1.png diff --git a/docs/lighting/clustered/images/clustered_ui2.png b/docs/Graphics/clustered/images/clustered_ui2.png similarity index 100% rename from docs/lighting/clustered/images/clustered_ui2.png rename to docs/Graphics/clustered/images/clustered_ui2.png diff --git a/docs/lighting/clustered/images/clustered_ui3.png b/docs/Graphics/clustered/images/clustered_ui3.png similarity index 100% rename from docs/lighting/clustered/images/clustered_ui3.png rename to docs/Graphics/clustered/images/clustered_ui3.png diff --git a/docs/lighting/clustered/images/devui3.png b/docs/Graphics/clustered/images/devui3.png similarity index 100% rename from docs/lighting/clustered/images/devui3.png rename to docs/Graphics/clustered/images/devui3.png diff --git a/docs/lighting/clustered/images/direct_lighting.png b/docs/Graphics/clustered/images/direct_lighting.png similarity index 100% rename from docs/lighting/clustered/images/direct_lighting.png rename to docs/Graphics/clustered/images/direct_lighting.png diff --git a/docs/lighting/clustered/images/light_dynamic.png b/docs/Graphics/clustered/images/light_dynamic.png similarity index 100% rename from docs/lighting/clustered/images/light_dynamic.png rename to docs/Graphics/clustered/images/light_dynamic.png diff --git a/docs/lighting/clustered/images/light_dynamicbounce.png b/docs/Graphics/clustered/images/light_dynamicbounce.png similarity index 100% rename from docs/lighting/clustered/images/light_dynamicbounce.png rename to docs/Graphics/clustered/images/light_dynamicbounce.png diff --git a/docs/lighting/clustered/images/light_indirect.png b/docs/Graphics/clustered/images/light_indirect.png similarity index 100% rename from docs/lighting/clustered/images/light_indirect.png rename to docs/Graphics/clustered/images/light_indirect.png diff --git a/docs/lighting/clustered/images/light_spec.png b/docs/Graphics/clustered/images/light_spec.png similarity index 100% rename from docs/lighting/clustered/images/light_spec.png rename to docs/Graphics/clustered/images/light_spec.png diff --git a/docs/lighting/clustered/images/normal_lighting.png b/docs/Graphics/clustered/images/normal_lighting.png similarity index 100% rename from docs/lighting/clustered/images/normal_lighting.png rename to docs/Graphics/clustered/images/normal_lighting.png diff --git a/docs/lighting/clustered/images/properties_dynamic.png b/docs/Graphics/clustered/images/properties_dynamic.png similarity index 100% rename from docs/lighting/clustered/images/properties_dynamic.png rename to docs/Graphics/clustered/images/properties_dynamic.png diff --git a/docs/lighting/clustered/images/properties_dynamic2.png b/docs/Graphics/clustered/images/properties_dynamic2.png similarity index 100% rename from docs/lighting/clustered/images/properties_dynamic2.png rename to docs/Graphics/clustered/images/properties_dynamic2.png diff --git a/docs/lighting/clustered/images/properties_indirect.png b/docs/Graphics/clustered/images/properties_indirect.png similarity index 100% rename from docs/lighting/clustered/images/properties_indirect.png rename to docs/Graphics/clustered/images/properties_indirect.png diff --git a/docs/lighting/clustered/images/properties_specular.png b/docs/Graphics/clustered/images/properties_specular.png similarity index 100% rename from docs/lighting/clustered/images/properties_specular.png rename to docs/Graphics/clustered/images/properties_specular.png diff --git a/docs/lighting/clustered/images/properties_static.png b/docs/Graphics/clustered/images/properties_static.png similarity index 100% rename from docs/lighting/clustered/images/properties_static.png rename to docs/Graphics/clustered/images/properties_static.png diff --git a/docs/lighting/clustered/images/shadows1.png b/docs/Graphics/clustered/images/shadows1.png similarity index 100% rename from docs/lighting/clustered/images/shadows1.png rename to docs/Graphics/clustered/images/shadows1.png diff --git a/docs/lighting/clustered/images/shadowsize3.png b/docs/Graphics/clustered/images/shadowsize3.png similarity index 100% rename from docs/lighting/clustered/images/shadowsize3.png rename to docs/Graphics/clustered/images/shadowsize3.png diff --git a/docs/lighting/clustered/images/shadowsize5.png b/docs/Graphics/clustered/images/shadowsize5.png similarity index 100% rename from docs/lighting/clustered/images/shadowsize5.png rename to docs/Graphics/clustered/images/shadowsize5.png diff --git a/docs/lighting/clustered/images/shadowsize7.png b/docs/Graphics/clustered/images/shadowsize7.png similarity index 100% rename from docs/lighting/clustered/images/shadowsize7.png rename to docs/Graphics/clustered/images/shadowsize7.png diff --git a/docs/lighting/clustered/images/specular_falloff_1.jpg b/docs/Graphics/clustered/images/specular_falloff_1.jpg similarity index 100% rename from docs/lighting/clustered/images/specular_falloff_1.jpg rename to docs/Graphics/clustered/images/specular_falloff_1.jpg diff --git a/docs/lighting/clustered/images/specular_falloff_2.jpg b/docs/Graphics/clustered/images/specular_falloff_2.jpg similarity index 100% rename from docs/lighting/clustered/images/specular_falloff_2.jpg rename to docs/Graphics/clustered/images/specular_falloff_2.jpg diff --git a/docs/lighting/clustered/images/specular_off.png b/docs/Graphics/clustered/images/specular_off.png similarity index 100% rename from docs/lighting/clustered/images/specular_off.png rename to docs/Graphics/clustered/images/specular_off.png diff --git a/docs/lighting/clustered/images/specular_on.png b/docs/Graphics/clustered/images/specular_on.png similarity index 100% rename from docs/lighting/clustered/images/specular_on.png rename to docs/Graphics/clustered/images/specular_on.png diff --git a/docs/lighting/clustered/images/specular_shadoff.png b/docs/Graphics/clustered/images/specular_shadoff.png similarity index 100% rename from docs/lighting/clustered/images/specular_shadoff.png rename to docs/Graphics/clustered/images/specular_shadoff.png diff --git a/docs/lighting/clustered/images/specular_shadon.png b/docs/Graphics/clustered/images/specular_shadon.png similarity index 100% rename from docs/lighting/clustered/images/specular_shadon.png rename to docs/Graphics/clustered/images/specular_shadon.png diff --git a/docs/lighting/clustered/images/volumetrics.png b/docs/Graphics/clustered/images/volumetrics.png similarity index 100% rename from docs/lighting/clustered/images/volumetrics.png rename to docs/Graphics/clustered/images/volumetrics.png diff --git a/docs/lighting/clustered/meta.json b/docs/Graphics/clustered/meta.json similarity index 100% rename from docs/lighting/clustered/meta.json rename to docs/Graphics/clustered/meta.json diff --git a/docs/lighting/clustered/quick_start.md b/docs/Graphics/clustered/quick_start.md similarity index 100% rename from docs/lighting/clustered/quick_start.md rename to docs/Graphics/clustered/quick_start.md diff --git a/docs/lighting/clustered/troubleshooting.md b/docs/Graphics/clustered/troubleshooting.md similarity index 100% rename from docs/lighting/clustered/troubleshooting.md rename to docs/Graphics/clustered/troubleshooting.md diff --git a/docs/lighting/clustered/what_is.md b/docs/Graphics/clustered/what_is.md similarity index 100% rename from docs/lighting/clustered/what_is.md rename to docs/Graphics/clustered/what_is.md diff --git a/docs/Graphics/meta.json b/docs/Graphics/meta.json new file mode 100644 index 000000000..3905485db --- /dev/null +++ b/docs/Graphics/meta.json @@ -0,0 +1,3 @@ +{ + "title": "Graphics & Lighting" +} diff --git a/docs/lighting/volumetrics/images/basic_volumetric.gif b/docs/Graphics/volumetrics/images/basic_volumetric.gif similarity index 100% rename from docs/lighting/volumetrics/images/basic_volumetric.gif rename to docs/Graphics/volumetrics/images/basic_volumetric.gif diff --git a/docs/lighting/volumetrics/images/clustered_light_inspector_volumetric.jpg b/docs/Graphics/volumetrics/images/clustered_light_inspector_volumetric.jpg similarity index 100% rename from docs/lighting/volumetrics/images/clustered_light_inspector_volumetric.jpg rename to docs/Graphics/volumetrics/images/clustered_light_inspector_volumetric.jpg diff --git a/docs/lighting/volumetrics/images/fog_inspector.png b/docs/Graphics/volumetrics/images/fog_inspector.png similarity index 100% rename from docs/lighting/volumetrics/images/fog_inspector.png rename to docs/Graphics/volumetrics/images/fog_inspector.png diff --git a/docs/lighting/volumetrics/images/graphics_vol-menu.png b/docs/Graphics/volumetrics/images/graphics_vol-menu.png similarity index 100% rename from docs/lighting/volumetrics/images/graphics_vol-menu.png rename to docs/Graphics/volumetrics/images/graphics_vol-menu.png diff --git a/docs/lighting/volumetrics/images/graphics_vol.png b/docs/Graphics/volumetrics/images/graphics_vol.png similarity index 100% rename from docs/lighting/volumetrics/images/graphics_vol.png rename to docs/Graphics/volumetrics/images/graphics_vol.png diff --git a/docs/lighting/volumetrics/images/light_rt_kv.png b/docs/Graphics/volumetrics/images/light_rt_kv.png similarity index 100% rename from docs/lighting/volumetrics/images/light_rt_kv.png rename to docs/Graphics/volumetrics/images/light_rt_kv.png diff --git a/docs/lighting/volumetrics/images/obb_volume_changetexture.jpg b/docs/Graphics/volumetrics/images/obb_volume_changetexture.jpg similarity index 100% rename from docs/lighting/volumetrics/images/obb_volume_changetexture.jpg rename to docs/Graphics/volumetrics/images/obb_volume_changetexture.jpg diff --git a/docs/lighting/volumetrics/images/obb_volume_interact.png b/docs/Graphics/volumetrics/images/obb_volume_interact.png similarity index 100% rename from docs/lighting/volumetrics/images/obb_volume_interact.png rename to docs/Graphics/volumetrics/images/obb_volume_interact.png diff --git a/docs/lighting/volumetrics/images/obb_volumefog_csm_interact_workaround.jpg b/docs/Graphics/volumetrics/images/obb_volumefog_csm_interact_workaround.jpg similarity index 100% rename from docs/lighting/volumetrics/images/obb_volumefog_csm_interact_workaround.jpg rename to docs/Graphics/volumetrics/images/obb_volumefog_csm_interact_workaround.jpg diff --git a/docs/lighting/volumetrics/images/obb_volumefog_cube.jpg b/docs/Graphics/volumetrics/images/obb_volumefog_cube.jpg similarity index 100% rename from docs/lighting/volumetrics/images/obb_volumefog_cube.jpg rename to docs/Graphics/volumetrics/images/obb_volumefog_cube.jpg diff --git a/docs/lighting/volumetrics/images/obb_volumefog_kv.png b/docs/Graphics/volumetrics/images/obb_volumefog_kv.png similarity index 100% rename from docs/lighting/volumetrics/images/obb_volumefog_kv.png rename to docs/Graphics/volumetrics/images/obb_volumefog_kv.png diff --git a/docs/lighting/volumetrics/images/obb_volumefog_sphere.jpg b/docs/Graphics/volumetrics/images/obb_volumefog_sphere.jpg similarity index 100% rename from docs/lighting/volumetrics/images/obb_volumefog_sphere.jpg rename to docs/Graphics/volumetrics/images/obb_volumefog_sphere.jpg diff --git a/docs/lighting/volumetrics/images/ptex_kv.png b/docs/Graphics/volumetrics/images/ptex_kv.png similarity index 100% rename from docs/lighting/volumetrics/images/ptex_kv.png rename to docs/Graphics/volumetrics/images/ptex_kv.png diff --git a/docs/lighting/volumetrics/images/ptex_vol.gif b/docs/Graphics/volumetrics/images/ptex_vol.gif similarity index 100% rename from docs/lighting/volumetrics/images/ptex_vol.gif rename to docs/Graphics/volumetrics/images/ptex_vol.gif diff --git a/docs/lighting/volumetrics/images/shadowed_flag.png b/docs/Graphics/volumetrics/images/shadowed_flag.png similarity index 100% rename from docs/lighting/volumetrics/images/shadowed_flag.png rename to docs/Graphics/volumetrics/images/shadowed_flag.png diff --git a/docs/lighting/volumetrics/images/vol_occlusion.png b/docs/Graphics/volumetrics/images/vol_occlusion.png similarity index 100% rename from docs/lighting/volumetrics/images/vol_occlusion.png rename to docs/Graphics/volumetrics/images/vol_occlusion.png diff --git a/docs/lighting/volumetrics/images/vol_playershadow.png b/docs/Graphics/volumetrics/images/vol_playershadow.png similarity index 100% rename from docs/lighting/volumetrics/images/vol_playershadow.png rename to docs/Graphics/volumetrics/images/vol_playershadow.png diff --git a/docs/lighting/volumetrics/images/volumetrics.png b/docs/Graphics/volumetrics/images/volumetrics.png similarity index 100% rename from docs/lighting/volumetrics/images/volumetrics.png rename to docs/Graphics/volumetrics/images/volumetrics.png diff --git a/docs/lighting/volumetrics/intro.md b/docs/Graphics/volumetrics/intro.md similarity index 99% rename from docs/lighting/volumetrics/intro.md rename to docs/Graphics/volumetrics/intro.md index b84a7be35..de7edb7f3 100644 --- a/docs/lighting/volumetrics/intro.md +++ b/docs/Graphics/volumetrics/intro.md @@ -26,7 +26,7 @@ There are 3 KeyValues in `light_rt` and `light_rt_spot` entities: `Volumetric Li `env_projectexture`, has only two volumetric-related KeyValues - `Volumetric Intensity`, which is identical to `Volumetric Density`, and `Enable Volumetrics`. But unlike all the other entities that produce volumetrics, projected texture volumetrics also support projecting .webm videos. -More about setting up volumetrics for each entity in [Quick Start](/lighting/volumetrics/quick_setup) +More about setting up volumetrics for each entity in [Quick Start](/Graphics/volumetrics/quick_setup) ## Light Cookies and WebM support diff --git a/docs/lighting/volumetrics/meta.json b/docs/Graphics/volumetrics/meta.json similarity index 100% rename from docs/lighting/volumetrics/meta.json rename to docs/Graphics/volumetrics/meta.json diff --git a/docs/lighting/volumetrics/quick_setup.md b/docs/Graphics/volumetrics/quick_setup.md similarity index 100% rename from docs/lighting/volumetrics/quick_setup.md rename to docs/Graphics/volumetrics/quick_setup.md diff --git a/docs/lighting/volumetrics/troubleshooting.md b/docs/Graphics/volumetrics/troubleshooting.md similarity index 96% rename from docs/lighting/volumetrics/troubleshooting.md rename to docs/Graphics/volumetrics/troubleshooting.md index 59c50df88..4080828e9 100644 --- a/docs/lighting/volumetrics/troubleshooting.md +++ b/docs/Graphics/volumetrics/troubleshooting.md @@ -21,7 +21,7 @@ This is a list of currently known issues and some troubleshooting tips for any i ### "The volumetrics for a light source are everywhere, even behind walls!" -* Volumetric lighting is shadow dependant, you need to make sure the `Shadowed` flag is checked when making shadowed volumetrics. If the flag is enabled but volumetrics are still leaking, then you might have too many dynamic shadows updating at once. See [clustered troubleshooting page](/lighting/clustered/troubleshooting) for more information related to the issue. +* Volumetric lighting is shadow dependant, you need to make sure the `Shadowed` flag is checked when making shadowed volumetrics. If the flag is enabled but volumetrics are still leaking, then you might have too many dynamic shadows updating at once. See [clustered troubleshooting page](/Graphics/clustered/troubleshooting) for more information related to the issue. ### "My volumetrics are broken and corrupt!" diff --git a/docs/lighting/meta.json b/docs/lighting/meta.json deleted file mode 100644 index a11ff3c7d..000000000 --- a/docs/lighting/meta.json +++ /dev/null @@ -1,3 +0,0 @@ -{ - "title": "Lighting" -} diff --git a/docs/modding/devui/categories/graphics.md b/docs/modding/devui/categories/graphics.md index 87a5ff702..fa2c340a9 100644 --- a/docs/modding/devui/categories/graphics.md +++ b/docs/modding/devui/categories/graphics.md @@ -9,7 +9,7 @@ The graphics tab is the most popular among all the other tab in the Developer UI ![Graphics tab](images/graphics.png) -It consists of six windows - **Fog Config**, **[Clustered Light Inspector](/lighting/clustered/clustered_light_inspector)**, **Clustered Volumetrics Inspector**, **CSM Config**, **Post Processing** and **SoftBody Debug**. +It consists of six windows - **Fog Config**, **[Clustered Light Inspector](/Graphics/clustered/clustered_light_inspector)**, **Clustered Volumetrics Inspector**, **CSM Config**, **Post Processing** and **SoftBody Debug**. ****