WiseHDR: Difference between revisions
Thunder4ik (talk | contribs) m (→DOD:S Example: Unicodifying, replaced: [[Image: → [[File: (9)) |
mNo edit summary |
||
(One intermediate revision by the same user not shown) | |||
Line 1: | Line 1: | ||
{{DISPLAYTITLE:WiseHDR: HDR - (High Dynamic Range)}} | {{DISPLAYTITLE:WiseHDR: HDR - (High Dynamic Range)}} | ||
{{SDKNuts Tutorials}} | |||
{{wisemxport|[[User:Pinsplash|Pinsplash]] ([[User talk:Pinsplash|talk]]) 07:20, 21 June 2018 (UTC)}} | {{wisemxport|[[User:Pinsplash|Pinsplash]] ([[User talk:Pinsplash|talk]]) 07:20, 21 June 2018 (UTC)}} | ||
''(Porter's note: About half of the original tutorial by wisemx was left out of this port because it was basically an exact copy of the [[HDR Lighting Basics]] page.)'' | ''(Porter's note: About half of the original tutorial by wisemx was left out of this port because it was basically an exact copy of the [[HDR Lighting Basics]] page.)'' | ||
== | =={{dods|4}} Example== | ||
Let’s examine the Source SDK HDR example map from | Let’s examine the Source SDK HDR example map from {{dods|3.1}} step by step. Even if you don't have DOD:S this file is part of the updated Source SDK, you can open it in Hammer with the CS:S parameters. The map is {{path|common\sourcesdk_content\dod\mapsrc\sdk_example_hdr.vmf}}. | ||
{{ent|light_environment}}: | |||
*'''Pitch Yaw Roll''': 0 165 0 | *'''Pitch Yaw Roll''': 0 165 0 | ||
*'''Pitch''': -40 | *'''Pitch''': -40 | ||
Line 17: | Line 18: | ||
[[Skybox]] Texture Name: <code>sdk_sky_example_hdr</code> | [[Skybox]] Texture Name: <code>sdk_sky_example_hdr</code> | ||
{{ent|env_tonemap_controller}}: | |||
*'''Name''': tonemap | *'''Name''': tonemap | ||
:This entity is give a name so it can be called via [[inputs]]. There are 9 inputs in the example <code>env_tonemap_controller</code>. Three of the inputs set the initial HDR exposures when the map starts via a <code>[[logic_auto]]</code>. The remaining 6 Inputs are 2 groups of 3 Inputs from triggers. | :This entity is give a name so it can be called via [[inputs]]. There are 9 inputs in the example <code>env_tonemap_controller</code>. Three of the inputs set the initial HDR exposures when the map starts via a <code>[[logic_auto]]</code>. The remaining 6 Inputs are 2 groups of 3 Inputs from triggers. | ||
{{ent|logic_auto}}: | |||
{| {{OutputsTable}} | {| {{OutputsTable}} | ||
| [[File:Io11.png]] || OnMapSpawn || tonemap || SetAutoExposureMax || 2 || 0.00 || No | | [[File:Io11.png]] || OnMapSpawn || tonemap || SetAutoExposureMax || 2 || 0.00 || No | ||
Line 50: | Line 51: | ||
|} | |} | ||
Notice the height of the | Notice the height of the {{ent|env_cubemap}} inside the sample building. This will often be important when you build cubemaps with the {{command|buildcubemaps}} console command in relation to the height of windows for example. | ||
Lastly notice the dev reflectivity materials are used. These are great tools for both testing and achieving lighting effects. You can for example use the material <code>dev/reflectivity_30</code> on a | Lastly, notice the dev reflectivity materials are used. These are great tools for both testing and achieving lighting effects. You can for example use the material <code>dev/reflectivity_30</code> on a {{ent|func_illusionary}} for a light-at-the-end-of-the-tunnel effect, even without HDR enabled. | ||
==Final Notes== | ==Final Notes== | ||
Open the DOD:S sample map <code>sdk_dod_flash</code>. (In the same folder as the HDR sample.) Notice the 15 | Open the DOD:S sample map <code>sdk_dod_flash</code>. (In the same folder as the HDR sample.) Notice the 15 {{ent|info_lighting}} entities used in this map. These are used to change the lighting origin of a {{ent|prop_static}}. To use these simply place an <code>info_lighting</code> in the spot where you want to change the lighting origin for a <code>prop_static</code>. Then in that <code>prop_static</code> set the name of the <code>info_lighting</code> in the '''Lighting Origin''' property. Also notice there are only 3 inputs in the <code>env_tonemap_controller</code> for this map. The '''Exposure Max''', '''Min''' and '''Bloom Scale''' are all set once when the map spawns. |
Latest revision as of 09:21, 16 April 2024
This tutorial was originally created by wisemx. It was originally posted on SDKnuts.net.
(Porter's note: About half of the original tutorial by wisemx was left out of this port because it was basically an exact copy of the HDR Lighting Basics page.)
Day of Defeat: Source Example
Let’s examine the Source SDK HDR example map from Day of Defeat: Source step by step. Even if you don't have DOD:S this file is part of the updated Source SDK, you can open it in Hammer with the CS:S parameters. The map is common\sourcesdk_content\dod\mapsrc\sdk_example_hdr.vmf
.
- Pitch Yaw Roll: 0 165 0
- Pitch: -40
- Brightness: 250 241 192 600
- Ambient: 209 227 237 200
- BrightnessHDR: 250 241 192 500
- AmbientHDR: 209 227 237 200
Skybox Texture Name: sdk_sky_example_hdr
- Name: tonemap
- This entity is give a name so it can be called via inputs. There are 9 inputs in the example
env_tonemap_controller
. Three of the inputs set the initial HDR exposures when the map starts via alogic_auto
. The remaining 6 Inputs are 2 groups of 3 Inputs from triggers.
My Output | Target Entity | Target Input | Parameter | Delay | Only Once | |
---|---|---|---|---|---|---|
![]() |
OnMapSpawn | tonemap | SetAutoExposureMax | 2 | 0.00 | No |
![]() |
OnMapSpawn | tonemap | SetAutoExposureMin | .8 | 0.00 | No |
![]() |
OnMapSpawn | tonemap | SetBloomScale | 1.2 | 0.00 | No |
The trigger_multiple
entites are not needed but are used to illustrate how you can control the HDR exposure during the game.
Walking into the sample building will trigger these:
My Output | Target Entity | Target Input | Parameter | Delay | Only Once | |
---|---|---|---|---|---|---|
![]() |
OnMapSpawn | tonemap | SetAutoExposureMax | 5 | 0.00 | No |
![]() |
OnMapSpawn | tonemap | SetAutoExposureMin | 3 | 0.00 | No |
![]() |
OnMapSpawn | tonemap | SetBloomScale | 2 | 0.00 | No |
Walking out of the sample building will trigger these:
My Output | Target Entity | Target Input | Parameter | Delay | Only Once | |
---|---|---|---|---|---|---|
![]() |
OnMapSpawn | tonemap | SetAutoExposureMax | 2 | 0.00 | No |
![]() |
OnMapSpawn | tonemap | SetAutoExposureMin | .8 | 0.00 | No |
![]() |
OnMapSpawn | tonemap | SetBloomScale | 1 | 0.00 | No |
Notice the height of the env_cubemap inside the sample building. This will often be important when you build cubemaps with the buildcubemaps console command in relation to the height of windows for example.
Lastly, notice the dev reflectivity materials are used. These are great tools for both testing and achieving lighting effects. You can for example use the material dev/reflectivity_30
on a func_illusionary for a light-at-the-end-of-the-tunnel effect, even without HDR enabled.
Final Notes
Open the DOD:S sample map sdk_dod_flash
. (In the same folder as the HDR sample.) Notice the 15 info_lighting entities used in this map. These are used to change the lighting origin of a prop_static. To use these simply place an info_lighting
in the spot where you want to change the lighting origin for a prop_static
. Then in that prop_static
set the name of the info_lighting
in the Lighting Origin property. Also notice there are only 3 inputs in the env_tonemap_controller
for this map. The Exposure Max, Min and Bloom Scale are all set once when the map spawns.