Skip to content

Commit 19b6339

Browse files
committed
Reviewed changes to path tracing documentation
As per #5551.
1 parent 05eb3c8 commit 19b6339

File tree

1 file changed

+19
-14
lines changed

1 file changed

+19
-14
lines changed

com.unity.render-pipelines.high-definition/Documentation~/Ray-Tracing-Path-Tracing.md

Lines changed: 19 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -54,35 +54,40 @@ Path tracing uses the [Volume](Volumes.md) framework, so to enable this feature,
5454

5555
## Materials parameterization
5656

57-
Some phenomena like refraction, absorption in transmissive objects, or subsurface scattering, can be expressed more naturally in a path tracing setting than in its rasterized counterpart, and as such require less material parameters (e.g. additional thickness information, expected shape of the refractive object, ...). For that reason, some parameters have no effect in path tracing, while others bear a slightly different meaning.
57+
HDRP can perform effects like light refraction and absorption in transmissive objects, or subsurface scattering, more easily when you use path tracing setting than in rasterization . This means they need fewer Material parameters (e.g. additional thickness information, expected shape of the refractive object, ...). For that reason, some parameters have no effect in path tracing, and some parameters change behaviour. For more information, see [Refraction models](#).
5858

59-
### Refraction model
59+
<a name="Refraction-models"></a>
6060

61-
In the Lit family of materials, when the surface type is set to *Transparent*, you can select between *None*, *Box*, *Sphere* or *Thin* refraction models.
61+
### Refraction models
6262

63-
For path tracing, the distinction between *Box* or *Sphere* makes no sense (as rays can intersect the real objects in the scene), and both effectively carry the common meaning of a *thick* mode, to be used on solid objects represented by a closed surface. On the other hand, *Thin* conveys the same idea as its rasterized version, and *None* is a special case of thin refractive surface, hardcoded to be fully smooth to simulate alpha blending. Additionally, transparent surfaces should be *Double-Sided*, so that they get intersected from both sides, and normal mode should be selected appropriately for each situation, as described right below.
63+
Path tracing changes the way refraction models behave. The table below describes how each refraction model behaves when you enable path tracing. To change the type of refraction model a Lit Material uses, set its **Surface type** to **Transparent** then select a method from the **Refraction model** drop down.
6464

65-
| Refraction model | Path tracing meaning | Surface sidedness |
66-
|-------------------|---------------------------------------------------|---------------------------------------------------|
67-
| *Box* or *Sphere* | *Thick* object (e.g magnifying paperweight) | Double sided, with *None* normal mode |
68-
| *Thin* | *Thin* object (e.g soap bubble or window) | Double sided, with *Flip* or *Mirror* normal mode |
69-
| *None* | *Thin* object, with smoothness = 1 and no Fresnel | Double sided, with *Flip* or *Mirror* normal mode |
65+
| Refraction model | Path tracing behavior | Compatible Surface sides |
66+
| ---------------- | ------------------------------------------------------------ | ------------------------------------------------------------ |
67+
| **Box** | A box-shaped model where incident light enters through a flat surface and leaves through a flat surface.<br/><br/>Suitable for thick objects like a paperweight or a crystal ball. | A double-sided Material that has its **Normal mode** set to **None**. |
68+
| **Sphere** | A sphere-shaped model that produces a magnifying glass-like effect to refraction. <br/><br/>Suitable for thick objects like a paperweight or a crystal ball. | A double-sided Material that has its **Normal mode** set to **None**. |
69+
| **Thin** | A thin box surface type, similar to **Box** with a fixed thickness of 5cm. Select this for thin window-like surfaces. <br/>The behaviour of the **Thin** refraction model does not change with path tracing enabled .<br/><br/>Suitable for thin objects like a soap bubble or a window. | A double-sided Material that has its **Normal mode** set to **Flip** or **Mirror**. |
70+
| **None** | A thin refractive surface, hardcoded to be fully smooth to simulate alpha blending.<br/>The behaviour of the **None **refraction model does not change with path tracing enabled .<br/><br/>Suitable for thin objects like a soap bubble or a window. | A double-sided Material that has its **Normal mode** set to **Flip** or **Mirror**. |
7071

71-
The reason why normal mode should be set to *None* for *thick* objects, is that we want the intersection with a front normal to represent entering the medium (say, from air into glass), but also the back normal to represent leaving it.
72+
##### **Notes:**
73+
74+
- When you enable path tracing there is no practical difference between the **Box** and **Sphere** models. This is because rays can intersect GameObjects in the scene.
75+
- Assign a double-sided Material to transparent surfaces so that rays intersect them from both sides.
76+
- **Normal mode** should be set to **None** for thick objects. This is so the ray can intersect with a front normal to represent entering the medium (for example, from air into glass), and the back normal to represent leaving it.
7277

7378
### Subsurface scattering
7479

75-
In path tracing, the *Transmission* option of subsurface scattering will only take effect if the surface is also set to be *Double-Sided* (any normal mode will do), in which case it will receive light from both sides.
80+
When you use path tracing, the **Transmission** option of subsurface scattering only takes effect if the surface Material is also set to be **Double-Sided**. This means the surface can receive light from both sides.
7681

77-
Here is an example of a sheet of fabric, lit from below by a point light:
82+
The following example images display the difference between of a sheet of fabric lit from below by a point light with a single-sided surface and double-sided surface:
7883

7984
![](Images/Path-traced-SSS-Single-sided.png)
8085

81-
Single-sided or no Transmission
86+
Single-sided with no Transmission.
8287

8388
![](Images/Path-traced-SSS-Double-sided.png)
8489

85-
Double-sided + Transmission
90+
Double-sided with Transmission.
8691

8792
## Limitations
8893

0 commit comments

Comments
 (0)