From 7a43d932528491ff32b3a02cc2b74178be5f5c50 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fr=C3=A9d=C3=A9ric=20Vauchelles?= Date: Fri, 31 Jul 2020 11:56:24 +0200 Subject: [PATCH 1/5] Updated documentation of reflection probes --- .../Images/ReflectionProbe_Influence.svg | 177 ++++++++++++ .../Images/ReflectionProbe_InfluenceBlend.svg | 253 +++++++++++++++++ .../ReflectionProbe_InfluenceBlendNormal.svg | 259 ++++++++++++++++++ .../ReflectionProbe_InfluenceBlendOverlap.svg | 226 +++++++++++++++ .../Documentation~/Reflection-Probe-Usage.md | 44 +++ .../Documentation~/Reflection-Probes-Intro.md | 2 + 6 files changed, 961 insertions(+) create mode 100644 com.unity.render-pipelines.high-definition/Documentation~/Images/ReflectionProbe_Influence.svg create mode 100644 com.unity.render-pipelines.high-definition/Documentation~/Images/ReflectionProbe_InfluenceBlend.svg create mode 100644 com.unity.render-pipelines.high-definition/Documentation~/Images/ReflectionProbe_InfluenceBlendNormal.svg create mode 100644 com.unity.render-pipelines.high-definition/Documentation~/Images/ReflectionProbe_InfluenceBlendOverlap.svg create mode 100644 com.unity.render-pipelines.high-definition/Documentation~/Reflection-Probe-Usage.md diff --git a/com.unity.render-pipelines.high-definition/Documentation~/Images/ReflectionProbe_Influence.svg b/com.unity.render-pipelines.high-definition/Documentation~/Images/ReflectionProbe_Influence.svg new file mode 100644 index 00000000000..b93ac9cad0e --- /dev/null +++ b/com.unity.render-pipelines.high-definition/Documentation~/Images/ReflectionProbe_Influence.svg @@ -0,0 +1,177 @@ + + + + + + + + + + + + + + image/svg+xml + + + + + + + + + + + Mesh object + + + + + + + + + + + Influencedpixels + Influence volume + + diff --git a/com.unity.render-pipelines.high-definition/Documentation~/Images/ReflectionProbe_InfluenceBlend.svg b/com.unity.render-pipelines.high-definition/Documentation~/Images/ReflectionProbe_InfluenceBlend.svg new file mode 100644 index 00000000000..be626c298a2 --- /dev/null +++ b/com.unity.render-pipelines.high-definition/Documentation~/Images/ReflectionProbe_InfluenceBlend.svg @@ -0,0 +1,253 @@ + + + + + + + + + + + + + + image/svg+xml + + + + + + + + + + + + Mesh object + + + + + + + + Blendvolume + + + + + + Blend distance + + + + + + + + + Influence = 0 + Influence = 1 + + diff --git a/com.unity.render-pipelines.high-definition/Documentation~/Images/ReflectionProbe_InfluenceBlendNormal.svg b/com.unity.render-pipelines.high-definition/Documentation~/Images/ReflectionProbe_InfluenceBlendNormal.svg new file mode 100644 index 00000000000..a7b97e9adbb --- /dev/null +++ b/com.unity.render-pipelines.high-definition/Documentation~/Images/ReflectionProbe_InfluenceBlendNormal.svg @@ -0,0 +1,259 @@ + + + + + + + + + + + + + + image/svg+xml + + + + + + + + + + + + + + + + + Blendnormalvolume + + + House + Discarded pixels + Blend Distance + + + + + + + + + Normal + + + + + + + + + Influenced pixels + + diff --git a/com.unity.render-pipelines.high-definition/Documentation~/Images/ReflectionProbe_InfluenceBlendOverlap.svg b/com.unity.render-pipelines.high-definition/Documentation~/Images/ReflectionProbe_InfluenceBlendOverlap.svg new file mode 100644 index 00000000000..a81299a350b --- /dev/null +++ b/com.unity.render-pipelines.high-definition/Documentation~/Images/ReflectionProbe_InfluenceBlendOverlap.svg @@ -0,0 +1,226 @@ + + + + + + + + + + + + + + image/svg+xml + + + + + + + + + + + Mesh object + + + + + + + + + + + + + + + Probe B + Probe A + + + + + Overlappinginfluence + + diff --git a/com.unity.render-pipelines.high-definition/Documentation~/Reflection-Probe-Usage.md b/com.unity.render-pipelines.high-definition/Documentation~/Reflection-Probe-Usage.md new file mode 100644 index 00000000000..210d921ed05 --- /dev/null +++ b/com.unity.render-pipelines.high-definition/Documentation~/Reflection-Probe-Usage.md @@ -0,0 +1,44 @@ +# Reflection probe usage + +## What is a probe + +Reflection probes and planar reflection probes provide indirect specular lighting. + +A probe capture its surroundings and will influence specular lighting in a specific volume. +A reflection probe will capture all of its surroundings while a planar reflection probe will capture only one direction. + +## Controlling the influence of a probe + +The influence of a probe determines which pixels will be affected and by how much. + +There are 3 tools to control the influence on a pixel: +* Influence volume: any pixel inside this volume will be affected. +* Blend distance: pixel near the border of the volume will be less influenced. +* Blend normal distance: pixels near the border with an invalid normal won't be affected. + +### Influence volume + +Use this volume to include or exclude pixels to be influenced. + +Note: When a pixel is inside an influence volume it will be _processed_ by the probe, even if specular value provided by the probe is not significant. This is important to handle performance of probes. + +![img](Images/ReflectionProbe_Influence.svg) + +### Blend influence + +Between the influence volume and the blend volume, the specular lighting value provided by the probe is linearly weighted. +Use the blending to make smooth transition at the border of the influences of a probe or when probes are overlapping. + +![img](Images/ReflectionProbe_InfluenceBlend.svg) +![img](Images/ReflectionProbe_InfluenceBlendOverlap.svg) + +### Blend normal influence + +In some cases, a probe influence can "bleed", it does influence a pixel that makes no sense to be influenced. + +This is the case when a light ray can not reach a pixel due to occlusion but is inside the influence volume. + +You can set a blend normal distance similarly to a blend distance. +Pixels inside the influence volume but outside of the blend normal volume will not be influenced if their normal is pointing outward the probe. + +![img](Images/ReflectionProbe_InfluenceBlendNormal.svg) \ No newline at end of file diff --git a/com.unity.render-pipelines.high-definition/Documentation~/Reflection-Probes-Intro.md b/com.unity.render-pipelines.high-definition/Documentation~/Reflection-Probes-Intro.md index dffdd86d2a5..c34ee7016fe 100644 --- a/com.unity.render-pipelines.high-definition/Documentation~/Reflection-Probes-Intro.md +++ b/com.unity.render-pipelines.high-definition/Documentation~/Reflection-Probes-Intro.md @@ -14,3 +14,5 @@ To create a **Reflection Probe** in the Unity Editor, select **GameObject > Ligh You can customize the behavior of a Reflection Probe in the Inspector. Both types of HDRP Reflection Probe are separate components, but share many of the same properties. For information on each Reflection Probe’s properties, see the [Reflection Probe](Reflection-Probe.md) and [Planar Reflection Probe](Planar-Reflection-Probe.md) documentation. To make sure HDRP does not apply post-processing effects twice, once in a Reflection Probe's capture and once in a Camera's capture of the reflection, HDRP does not apply post-processing to the Reflection Probe capture. + +For more information about how to use the reflection probe, see [Reflection Probe Usage](Reflection-Probe-Usage.md) \ No newline at end of file From 14785de533d4171934d81348e9ba9ed5de493d05 Mon Sep 17 00:00:00 2001 From: JordanL8 Date: Fri, 31 Jul 2020 11:23:11 +0100 Subject: [PATCH 2/5] Added full stop --- .../Documentation~/Reflection-Probes-Intro.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/com.unity.render-pipelines.high-definition/Documentation~/Reflection-Probes-Intro.md b/com.unity.render-pipelines.high-definition/Documentation~/Reflection-Probes-Intro.md index c34ee7016fe..8fea24f5b1a 100644 --- a/com.unity.render-pipelines.high-definition/Documentation~/Reflection-Probes-Intro.md +++ b/com.unity.render-pipelines.high-definition/Documentation~/Reflection-Probes-Intro.md @@ -15,4 +15,4 @@ You can customize the behavior of a Reflection Probe in the Inspector. Both type To make sure HDRP does not apply post-processing effects twice, once in a Reflection Probe's capture and once in a Camera's capture of the reflection, HDRP does not apply post-processing to the Reflection Probe capture. -For more information about how to use the reflection probe, see [Reflection Probe Usage](Reflection-Probe-Usage.md) \ No newline at end of file +For more information about how to use the reflection probe, see [Reflection Probe Usage](Reflection-Probe-Usage.md). From d915bf4d1a6ab62089bae4ed8df0c927728c5019 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fr=C3=A9d=C3=A9ric=20Vauchelles?= Date: Wed, 9 Sep 2020 09:15:35 +0200 Subject: [PATCH 3/5] Fixed documentation --- .../Documentation~/Reflection-Probe-Usage.md | 30 ++++++++++--------- 1 file changed, 16 insertions(+), 14 deletions(-) diff --git a/com.unity.render-pipelines.high-definition/Documentation~/Reflection-Probe-Usage.md b/com.unity.render-pipelines.high-definition/Documentation~/Reflection-Probe-Usage.md index 210d921ed05..d5b5b51b7f4 100644 --- a/com.unity.render-pipelines.high-definition/Documentation~/Reflection-Probe-Usage.md +++ b/com.unity.render-pipelines.high-definition/Documentation~/Reflection-Probe-Usage.md @@ -2,43 +2,45 @@ ## What is a probe -Reflection probes and planar reflection probes provide indirect specular lighting. +[Reflection Probes](Reflection-Probe.md) and [Planar Reflection Probes](Planar-Reflection-Probe.md) provide indirect specular lighting. + +A Reflection Probe captures all of its surroundings whereas a Planar Reflection Probe only captures one direction. + +For more information on probes and how they work, see [Reflection Probes](Reflection-Probes-Intro.md). -A probe capture its surroundings and will influence specular lighting in a specific volume. -A reflection probe will capture all of its surroundings while a planar reflection probe will capture only one direction. ## Controlling the influence of a probe -The influence of a probe determines which pixels will be affected and by how much. +The influence of a probe determines which pixels it affects and by how much. There are 3 tools to control the influence on a pixel: -* Influence volume: any pixel inside this volume will be affected. -* Blend distance: pixel near the border of the volume will be less influenced. -* Blend normal distance: pixels near the border with an invalid normal won't be affected. +* [Influence volume](#influence-volume): The probe affects any pixel inside this volume. +* [Blend distance](#blend-influence): The probe affects pixels near the border of the Influence volume less. +* [Blend normal distance](#blend-normal-influence): The probe does not affect pixels near the border with an invalid normal. ### Influence volume -Use this volume to include or exclude pixels to be influenced. +Use this volume to include or exclude pixels from the probe's influence. -Note: When a pixel is inside an influence volume it will be _processed_ by the probe, even if specular value provided by the probe is not significant. This is important to handle performance of probes. +Note: When a pixel is inside an influence volume, the probe still _processes_ it even if the specular value provided by the probe is not significant. This is important to handle the performance of probes. ![img](Images/ReflectionProbe_Influence.svg) ### Blend influence -Between the influence volume and the blend volume, the specular lighting value provided by the probe is linearly weighted. -Use the blending to make smooth transition at the border of the influences of a probe or when probes are overlapping. +Unity weights the specular lighting value provided by the probe linearly between the influence volume and the blend volume. +Use blending to create smooth transitions at the border of the probe's influence, or when probes overlap. ![img](Images/ReflectionProbe_InfluenceBlend.svg) ![img](Images/ReflectionProbe_InfluenceBlendOverlap.svg) ### Blend normal influence -In some cases, a probe influence can "bleed", it does influence a pixel that makes no sense to be influenced. +In some cases, a probe can influence a pixel that is not consistent with the scene layout. -This is the case when a light ray can not reach a pixel due to occlusion but is inside the influence volume. +For example, when a light ray cannot reach a pixel due to occlusion but is inside the influence volume. You can set a blend normal distance similarly to a blend distance. -Pixels inside the influence volume but outside of the blend normal volume will not be influenced if their normal is pointing outward the probe. +The probe does not influence pixels that are inside the influence volume, but outside of the blend normal distance, if their normal points away from the probe. ![img](Images/ReflectionProbe_InfluenceBlendNormal.svg) \ No newline at end of file From 0f4409381407372c00d04db09d8e76d3b693c1a3 Mon Sep 17 00:00:00 2001 From: JordanL8 Date: Wed, 9 Sep 2020 12:01:08 +0100 Subject: [PATCH 4/5] Update Reflection-Probe-Usage.md --- .../Documentation~/Reflection-Probe-Usage.md | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/com.unity.render-pipelines.high-definition/Documentation~/Reflection-Probe-Usage.md b/com.unity.render-pipelines.high-definition/Documentation~/Reflection-Probe-Usage.md index d5b5b51b7f4..dc5e6a1ec1f 100644 --- a/com.unity.render-pipelines.high-definition/Documentation~/Reflection-Probe-Usage.md +++ b/com.unity.render-pipelines.high-definition/Documentation~/Reflection-Probe-Usage.md @@ -22,25 +22,25 @@ There are 3 tools to control the influence on a pixel: Use this volume to include or exclude pixels from the probe's influence. -Note: When a pixel is inside an influence volume, the probe still _processes_ it even if the specular value provided by the probe is not significant. This is important to handle the performance of probes. +Note: When a pixel is inside an influence volume, the probe still processes it even if the specular value the probe provides is not significant. This is important to handle the performance of probes. -![img](Images/ReflectionProbe_Influence.svg) +![](Images/ReflectionProbe_Influence.svg) ### Blend influence -Unity weights the specular lighting value provided by the probe linearly between the influence volume and the blend volume. +Unity linearly weights the specular lighting value the probe provides between the influence volume and the blend volume. Use blending to create smooth transitions at the border of the probe's influence, or when probes overlap. -![img](Images/ReflectionProbe_InfluenceBlend.svg) -![img](Images/ReflectionProbe_InfluenceBlendOverlap.svg) +![](Images/ReflectionProbe_InfluenceBlend.svg) +![](Images/ReflectionProbe_InfluenceBlendOverlap.svg) ### Blend normal influence In some cases, a probe can influence a pixel that is not consistent with the scene layout. -For example, when a light ray cannot reach a pixel due to occlusion but is inside the influence volume. +For example, when a light ray cannot reach a pixel due to occlusion, but the pixel is inside the influence volume. You can set a blend normal distance similarly to a blend distance. The probe does not influence pixels that are inside the influence volume, but outside of the blend normal distance, if their normal points away from the probe. -![img](Images/ReflectionProbe_InfluenceBlendNormal.svg) \ No newline at end of file +![](Images/ReflectionProbe_InfluenceBlendNormal.svg) From e0ba29d5498bd1b2dd818ba78500d587c6b8c715 Mon Sep 17 00:00:00 2001 From: Lewis Jordan Date: Wed, 9 Sep 2020 12:07:24 +0100 Subject: [PATCH 5/5] Updated table of contents to point to new doc --- .../Documentation~/TableOfContents.md | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/com.unity.render-pipelines.high-definition/Documentation~/TableOfContents.md b/com.unity.render-pipelines.high-definition/Documentation~/TableOfContents.md index 665519390d7..0e5572e2ac3 100644 --- a/com.unity.render-pipelines.high-definition/Documentation~/TableOfContents.md +++ b/com.unity.render-pipelines.high-definition/Documentation~/TableOfContents.md @@ -89,11 +89,12 @@ * Lighting * [Reflection in HDRP](Reflection-in-HDRP) * [Refraction in HDRP](Refraction-in-HDRP) - * Reflection Probes - * [Reflection Probes Introduction](Reflection-Probes-Intro) - * [Reflection Probe](Reflection-Probe) - * [Planar Reflection Probe](Planar-Reflection-Probe) - * [Reflection Proxy Volume](Reflection-Proxy-Volume) + * [Reflection Probes](Reflection-Probes-Intro) + * [Using Reflection Probes](Reflection-Probe-Usage) + * Components + * [Reflection Probe](Reflection-Probe) + * [Planar Reflection Probe](Planar-Reflection-Probe) + * [Reflection Proxy Volume](Reflection-Proxy-Volume) * [Light](Light-Component) * [Environment Lighting](Environment-Lighting) * [Atmospheric Scattering](Atmospheric-Scattering)