Skip to content
This repository was archived by the owner on Nov 30, 2020. It is now read-only.

Commit 2af0cf9

Browse files
authored
Merge pull request #1 from Unity-Technologies/Documentation
Documentation update
2 parents d4432b6 + f812b88 commit 2af0cf9

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

63 files changed

+1200
-0
lines changed

Documentation/(v2)-Adobe-Photoshop.md

Lines changed: 42 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,42 @@
1+
Please note that using Photoshop for grading isn't recommended as it only has very limited capabilities when it comes to 32bit editing.
2+
3+
### Step 1
4+
5+
Export the current frame in Log as EXR without color grading applied.
6+
7+
![Export Log EXR](images/export-exr-log.png)
8+
9+
10+
11+
### Step 2
12+
13+
Open the previously exported EXR file in Photoshop. It should look like a Log footage.
14+
15+
### Step 3
16+
17+
Add a non-destructive color lookup adjustment layer to your image and use the `Unity Log To Linear` LUT that you'll find in `/PostProcessing/Textures/Cubes/`.
18+
19+
![Photoshop Log to Linear LUT](images/photoshop-log-lut.png)
20+
21+
22+
### Step 4
23+
24+
You can now start grading your image. Make sure you only do global color operation through the use of non-destructive adjustment layers. Local operators, filters or any effect that has an effect on neighbor pixels (e.g. blur) can't be stored in LUTs.
25+
26+
### Step 5
27+
28+
Once you're done, export a CUBE by going to `File -> Export -> Color Lookup Tables` and use the following settings:
29+
30+
![Photoshop Generate LUT](images/photoshop-gen-lut.png)
31+
32+
Save the resulting file somewhere in your `Assets` folder.
33+
34+
### Step 6
35+
36+
Back in Unity, it will detect the CUBE and automatically convert it to a `Texture3D` asset. Grab this texture and populate the `Lookup Texture` field in the color grading effect.
37+
38+
![Color Grading LUT](images/color-grading-external-lut.png)
39+
40+
And you're done. You can keep grading in Photoshop and override the previously saved CUBE file, Unity will automatically update the `Texture3D` used for real-time grading.
41+
42+
Volume blending with external LUTs is, of course, supported out-of-the-box.

Documentation/(v2)-DaVinci-Resolve.md

Lines changed: 41 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,41 @@
1+
Before you can work in Resolve you'll need a one-time setup step: copy all the CUBE files from `/PostProcessing/Textures/Cubes/` to Resolve's LUT folder. You can find this folder by opening Resolve, going to `Project Settings -> Color Management` and clicking `Open LUT Folder`. We recommend you put them into a separate folder, say `Unity`, for easier access later on. Don't forget to click on `Update List` after you've copied the LUTs.
2+
3+
Let's go over the workflow to grade Unity scenes in Resolve.
4+
5+
### Step 1
6+
7+
Export the current frame in Log as EXR without color grading applied.
8+
9+
![Export Log EXR](images/export-exr-log.png)
10+
11+
### Step 2
12+
13+
Open the previously exported EXR file in Resolve. It will look wrong, but that's expected. Resolve, by default, will display EXR files in linear mode. Go to `Project Settings -> Color Management` and set the `3D Video Monitor Lookup Table` to `Linear to sRGB`. The EXR should now look like a Log footage.
14+
15+
![Resolve Project Settings](images/resolve-project-settings.png)
16+
17+
### Step 3
18+
19+
In the node view or the color editing panel, right-click the only color grading node there is and assign the `Unity Log To Linear` 3D LUT to it. It should now look exactly like it does in the Editor.
20+
21+
![Resolve Log to Linear](images/resolve-log-lut.png)
22+
23+
### Step 4
24+
25+
You can now start grading your image. Use as many node as you'd like to move between color spaces but make sure you only do global color operations. Local operators & filters can't be store in LUTs.
26+
27+
### Step 5
28+
29+
Once you're done, export a CUBE by right-clicking the clip and choosing `Generate 3D LUT (CUBE)`. Save the resulting file somewhere in your `Assets` folder.
30+
31+
![Resolve Generate LUT](images/resolve-gen-lut.png)
32+
33+
### Step 6
34+
35+
Back in Unity, it will detect the CUBE and automatically convert it to a `Texture3D` asset. Grab this texture and populate the `Lookup Texture` field in the color grading effect.
36+
37+
![Color Grading LUT](images/color-grading-external-lut.png)
38+
39+
And you're done. You can keep grading in Resolve and override the previously saved CUBE file, Unity will automatically update the `Texture3D` used for real-time grading.
40+
41+
Volume blending with external LUTs is, of course, supported out-of-the-box.
Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
The color grading effect has been improved a lot in v2. One of its new feature is the ability to author 3D LUTs in external DCC tools like Adobe's Photoshop, DaVinci's Resolve, The Foundry's Nuke etc and import CUBE LUTs straight into Unity.
2+
3+
This feature requires support for Texture3D and compute shaders.
4+
5+
This guide won't go over color grading theory so you should already be familiar with at least one of the softwares in this guide. We'll only focus on the proper setup for creating CUBEs in external software (with sRGB displays as target), importing & using them into Unity.
6+
7+
* [[DaVinci Resolve|(v2)-DaVinci-Resolve]]
8+
* [[Adobe Photoshop|(v2)-Adobe-Photoshop]]

Documentation/Ambient-Occlusion.md

Lines changed: 63 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,63 @@
1+
The **Ambient Occlusion** post-processing effect approximates [Ambient Occlusion](http://en.wikipedia.org/wiki/Ambient_occlusion) in real time as a full-screen post-processing effect. It darkens creases, holes, intersections and surfaces that are close to each other. In real life, such areas tend to block out or occlude ambient light, hence they appear darker.
2+
3+
Note that the **Ambient Occlusion** effect is quite expensive in terms of processing time and generally should only be used on desktop or console hardware. Its cost depends purely on screen resolution and the effects parameters and does not depend on scene complexity as true ambient occlusion would.
4+
5+
> **TODO:** before/after screenshot
6+
7+
The effect comes with two modes:
8+
9+
- Scalable Ambient Obscurance
10+
- Multi-scale Volumetric Occlusion
11+
12+
## Scalable Ambient Obscurance
13+
14+
This is a standard implementation of ambient obscurance that works on non modern platforms. If you target a compute-enabled platform we recommend that you use the **Multi-scale Volumetric Occlusion** mode instead.
15+
16+
![Scalable Ambient Obscurance](images/ssao-1.png)
17+
18+
### Properties
19+
20+
| Property | Function |
21+
| :------------ | :------------------------------------------------------------ |
22+
| Intensity | Degree of darkness produced by the effect. |
23+
| Radius | Radius of sample points, which affects extent of darkened areas. |
24+
| Quality | Defines the number of sample points, which affects quality and performance. |
25+
| Color | Tint of the ambient occlusion. |
26+
| Ambient Only | Enables the ambient-only mode in that the effect only affects ambient lighting. This mode is only available with the Deferred rendering path and HDR rendering. |
27+
28+
### Performances
29+
30+
Beware that this effect can be quite expensive, especially when viewed very close to the camera. For that reason it is recommended to favor a low `Radius` setting. With a low `Radius` the ambient occlusion effect will only sample pixels that are close, in clip space, to the source pixel, which is good for performance as they can be cached efficiently. With higher radiuses, the generated samples will be further away from the source pixel and won’t benefit from caching thus slowing down the effect. Because of the camera’s perspective, objects near the front plane will use larger radiuses than those far away, so computing the ambient occlusion pass for an object close to the camera will be slower than for an object further away that only occupies a few pixels on screen.
31+
32+
Dropping the `Quality` setting down will improve performances too.
33+
34+
Generally speaking, this effect should not be considered on mobile platforms and when running on consoles we recommend using the **Multi-scale Volumetric Occlusion** mode as it's much faster there and looks better in most cases.
35+
36+
### Requirements
37+
38+
- Depth & Normals textures
39+
- Shader model 3
40+
41+
See the [Graphics Hardware Capabilities and Emulation](https://docs.unity3d.com/Manual/GraphicsEmulation.html) page for further details and a list of compliant hardware.
42+
43+
## Multi-scale Volumetric Occlusion
44+
45+
This is a more modern version of ambient occlusion heavily optimized for consoles and desktop platforms. It generally looks better and runs faster than the other mode on these platforms but requires compute shader support.
46+
47+
![Multi-scale Volumetric Occlusion](images/ssao-2.png)
48+
49+
### Properties
50+
51+
| Property | Function |
52+
| :------------------ | :------------------------------------------------------------ |
53+
| Intensity | Degree of darkness produced by the effect. |
54+
| Thickness Modifier | Modifies the thickness of occluders. This increases dark areas but can potentially introduces dark halos around objects. |
55+
| Color | Tint of the ambient occlusion. |
56+
| Ambient Only | Enables the ambient-only mode in that the effect only affects ambient lighting. This mode is only available with the Deferred rendering path and HDR rendering. |
57+
58+
### Requirements
59+
60+
- Compute shader support
61+
- Shader model 4.5
62+
63+
See the [Graphics Hardware Capabilities and Emulation](https://docs.unity3d.com/Manual/GraphicsEmulation.html) page for further details and a list of compliant hardware.

Documentation/Anti-aliasing.md

Lines changed: 91 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,91 @@
1+
The **Anti-aliasing** effect offers a set of algorithms designed to prevent aliasing and give a smoother appearance to graphics. Aliasing is an effect where lines appear jagged or have a “staircase” appearance (as displayed in the left-hand image below). This can happen if the graphics output device does not have a high enough resolution to display a straight line.
2+
3+
**Anti-aliasing** reduces the prominence of these jagged lines by surrounding them with intermediate shades of color. Although this reduces the jagged appearance of the lines, it also makes them blurrier.
4+
5+
> **TODO:** before/after screenshot
6+
7+
The Anti-aliasing algorithms are image-based. This is very useful when traditional multisampling (as used in the Editor’s [Quality settings](https://docs.unity3d.com/Manual/class-QualitySettings.html)) is not properly supported or when working with specular-heavy PBR materials.
8+
9+
The algorithms supplied in the post-processing stack are:
10+
11+
- Fast Approximate Anti-aliasing (FXAA)
12+
- Subpixel Morphological Anti-aliasing (SMAA)
13+
- Temporal Anti-aliasing (TAA)
14+
15+
They are set per-camera on the **Post-process Layer** component.
16+
17+
## Fast Approximate Anti-aliasing
18+
19+
**FXAA** is the cheapest technique and is recommended for mobile and other platforms that don’t support motion vectors, which are required for **TAA**.
20+
21+
![Fast Approximate Anti-aliasing](images/aa-1.png)
22+
23+
### Properties
24+
25+
| Property | Function |
26+
| :--------- | :----------------------------------------------------------- |
27+
| Fast Mode | A slightly lower quality but faster variant of FXAA. Highly recommended on mobile platforms. |
28+
| Keep Alpha | Toggle this on if you need to keep the alpha channel untouched by post-processing. Else it will use this channel to store internal data used to speed up and improve visual quality. |
29+
30+
### Performances
31+
32+
`Fast Mode` should be enabled on mobile & Nintendo Switch as it gives a substantial performance boost compared to the regular mode on these platforms. PS4 and Xbox One slightly benefit from it as well but on desktop GPUs it makes no difference and the regular mode should be used for added visual quality.
33+
34+
### Requirements
35+
36+
- Shader Model 3
37+
38+
See the [Graphics Hardware Capabilities and Emulation](https://docs.unity3d.com/Manual/GraphicsEmulation.html) page for further details and a list of compliant hardware.
39+
40+
## Subpixel Morphological Anti-aliasing
41+
42+
**SMAA** is a higher quality anti-aliasing effect than **FXAA** but it's also slower. Depending on the art-style of your game it can work as well as **TAA** while avoiding some of the shortcomings of this technique.
43+
44+
![Subpixel Morphological Anti-aliasing](images/aa-2.png)
45+
46+
### Properties
47+
48+
| Property | Function |
49+
| :-------- | :------------------------------------------------ |
50+
| Quality | The overall quality of the anti-aliasing filter. |
51+
52+
### Performances
53+
54+
Lowering the `Quality` setting will make the effect run faster. Using **SMAA** on mobile platforms isn't recommended.
55+
56+
### Known issues and limitations
57+
58+
- SMAA doesn't support AR/VR.
59+
60+
### Requirements
61+
62+
- Shader Model 3
63+
64+
See the [Graphics Hardware Capabilities and Emulation](https://docs.unity3d.com/Manual/GraphicsEmulation.html) page for further details and a list of compliant hardware.
65+
66+
## Temporal Anti-aliasing
67+
68+
**TAA** is a more advanced anti-aliasing technique where frames are accumulated over time in a history buffer to be used to smooth edges more effectively. It is substantially better at smoothing edges in motion but requires motion vectors and is more expensive than **FXAA**. Due to this it is recommended for desktop and console platforms.
69+
70+
![Temporal Anti-aliasing](images/aa-3.png)
71+
72+
### Properties
73+
74+
| Property | Function |
75+
| :------------------- | :------------------------------------------------------------ |
76+
| Jitter Spread | The diameter (in texels) inside which jitter samples are spread. Smaller values result in crisper but more aliased output, whilst larger values result in more stable but blurrier output. |
77+
| Stationary Blending | The blend coefficient for stationary fragments. Controls the percentage of history sample blended into final color for fragments with minimal active motion. |
78+
| Motion Blending | The blending coefficient for moving fragments. Controls the percentage of history sample blended into the final color for fragments with significant active motion. |
79+
| Sharpness | TAA can induce a slight loss of details in high frequency regions. Sharpening alleviates this issue. |
80+
81+
### Known issues and limitations
82+
83+
- Not supported on GLES2 platforms.
84+
85+
### Requirements
86+
87+
- Motion vectors
88+
- Depth texture
89+
- Shader Model 3
90+
91+
See the [Graphics Hardware Capabilities and Emulation](https://docs.unity3d.com/Manual/GraphicsEmulation.html) page for further details and a list of compliant hardware.

Documentation/Auto-Exposure.md

Lines changed: 45 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,45 @@
1+
In ocular physiology, adaptation is the ability of the eye to adjust to various levels of darkness and light. The human eye can function from very dark to very bright levels of light. However, in any given moment of time, the eye can only sense a contrast ratio of roughly one millionth of the total range. What enables the wider reach is that the eye adapts its definition of what is black.
2+
3+
This effect dynamically adjusts the exposure of the image according to the range of brightness levels it contains. The adjustment takes place gradually over a period of time, so the player can be briefly dazzled by bright outdoor light when, say, emerging from a dark tunnel. Equally, when moving from a bright scene to a dark one, the “eye” takes some time to adjust.
4+
5+
Internally, this effect generates a histogram on every frame and filters it to find the average luminance value. This histogram, and as such the effect, requires [Compute shader](https://docs.unity3d.com/Manual/ComputeShaders.html) support.
6+
7+
> **TODO:** before/after screenshot
8+
9+
![Auto Exposure](images/autoexposure.png)
10+
11+
### Properties
12+
13+
**Exposure** settings:
14+
15+
| Property | Function |
16+
| :--------------------- | :------------------------------------------------------------ |
17+
| Filtering | These values are the lower and upper percentages of the histogram that will be used to find a stable average luminance. Values outside of this range will be discarded and wont contribute to the average luminance. |
18+
| Minimum | Minimum average luminance to consider for auto exposure (in EV). |
19+
| Maximum | Maximum average luminance to consider for auto exposure (in EV). |
20+
| Exposure Compensation | Middle-grey value. Use this to compensate the global exposure of the scene. |
21+
22+
**Adaptation** settings:
23+
24+
| Property | Function |
25+
| :---------- | :------------------------------------------------------------ |
26+
| Type | Use Progressive if you want the auto exposure to be animated. Use Fixed otherwise. |
27+
| Speed Up | Adaptation speed from a dark to a light environment. |
28+
| Speed Down | Adaptation speed from a light to a dark environment. |
29+
30+
### Details
31+
32+
Use the `Filtering` range to exclude the darkest and brightest part of the image. To compute an average luminance you generally don’t want very dark and very bright pixels to contribute too much to the result. Values are in percent.
33+
34+
`Minimum`/`Maximum` values clamp the computed average luminance into a given range.
35+
36+
You can also set the `Type` to `Fixed` if you don’t need the eye adaptation effect and it will behave like an auto-exposure setting.
37+
38+
It is recommended to use the **Light Meter** [monitor](https://github.com/Unity-Technologies/PostProcessing/wiki/Debugging) when setting up this effect.
39+
40+
### Requirements
41+
42+
- Compute shader
43+
- Shader model 5
44+
45+
See the [Graphics Hardware Capabilities and Emulation](https://docs.unity3d.com/Manual/GraphicsEmulation.html) page for further details and a list of compliant hardware.

Documentation/Bloom.md

Lines changed: 44 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,44 @@
1+
**Bloom** is an effect used to reproduce an imaging artifact of real-world cameras. The effect produces fringes of light extending from the borders of bright areas in an image, contributing to the illusion of an extremely bright light overwhelming the camera or eye capturing the scene.
2+
3+
**Lens Dirt** applies a fullscreen layer of smudges or dust to diffract the Bloom effect. This is commonly used in modern first person shooters.
4+
5+
> **TODO:** before/after screenshot
6+
7+
![Bloom](images/bloom.png)
8+
9+
### Properties
10+
11+
**Bloom** settings:
12+
13+
| Property | Function |
14+
| :---------------- | :------------------------------------------------------------ |
15+
| Intensity | Strength of the Bloom filter. |
16+
| Threshold | Filters out pixels under this level of brightness. This value is expressed in gamma-space. |
17+
| Soft Knee | Makes transition between under/over-threshold gradual (0 = hard threshold, 1 = soft threshold). |
18+
| Diffusion | Changes extent of veiling effects in a screen resolution-independent fashion. |
19+
| Anamorphic Ratio | Emulates the effect of an anamorphic lens by scaling the bloom vertically (in range [-1,0]) or horizontally (in range [0,1]). |
20+
| Color | Tint of the Bloom filter. |
21+
| Fast Mode | Boost performances by lowering the effect quality. |
22+
23+
**Dirtiness** settings:
24+
25+
| Property | Function |
26+
| --------- | ----------------------------------------------------- |
27+
| Texture | Dirtiness texture to add smudges or dust to the lens. |
28+
| Intensity | Amount of lens dirtiness. |
29+
30+
### Details
31+
32+
With properly exposed HDR scenes, `Threshold` should be set to ~1 so that only pixels with values above 1 leak into surrounding objects. You’ll probably want to drop this value when working in LDR or the effect won’t be visible.
33+
34+
### Performances
35+
36+
Lowering the `Diffusion` parameter will make the effect faster. The further away `Anamorphic Ratio` is from 0, the slower it will be. On mobile and low-end platforms it is recommended to enable `Fast Mode` as it gives a significant boost in performances.
37+
38+
Finally, smaller lens dirt textures will result is faster lookup and blending across volumes.
39+
40+
### Requirements
41+
42+
- Shader model 3
43+
44+
See the [Graphics Hardware Capabilities and Emulation](https://docs.unity3d.com/Manual/GraphicsEmulation.html) page for further details and a list of compliant hardware.

0 commit comments

Comments
 (0)