Skip to content

Commit

Permalink
UNI-11984 - Lens Flare docs (Unity-Technologies#5640)
Browse files Browse the repository at this point in the history
* Updated lens flare screenshots for URP

* Updated docs for lens flare asset

* Updated toc with lens flare entries and changed image names

* Updated the lens flare component and lens flare asset pages

* Corrected links

* Updated HDRP version of the lens flare docs

* Shifted format for URP and HDRP to use the shared folders

* Corrected links and removed old docs from HDRP

* Update lens-flare-component.md

Co-authored-by: sebastienlagarde <sebastien@unity3d.com>
  • Loading branch information
JordanL8 and sebastienlagarde authored Sep 16, 2021
1 parent 2cd4a54 commit cd6a08d
Show file tree
Hide file tree
Showing 39 changed files with 88 additions and 65 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -172,7 +172,7 @@ HDRP supports the Illuminating Engineering Society's (IES) file format for descr
![](Images/LensFlareSamples2.png)

From HDRP 12.0, HDRP (and URP) introduces a new Lens Flare system. You can attach a Lens Flare (SRP) component to any GameObject.
Some Lens Flare properties only appear when you attach this component to a light. Each Lens Flare can have multiple elements that you can control individually. HDRP also provides a [new asset](lens-flare-data-driven-asset.md) and a [new component](lens-flare-data-driven-component.md) which you can attach to any GameObject.
Some Lens Flare properties only appear when you attach this component to a light. Each Lens Flare can have multiple elements that you can control individually. HDRP also provides a [new asset](shared/lens-flare/lens-flare-asset.md) and a [new component](shared/lens-flare/lens-flare-component.md) which you can attach to any GameObject.

### Reflection probes

Expand Down

This file was deleted.

This file was deleted.

This file was deleted.

Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Original file line number Diff line number Diff line change
Expand Up @@ -184,6 +184,8 @@
* [Debugging Ray-Traced Effects](Ray-Tracing-Debug.md)
* Components
* [Decal Projector](Decal-Projector.md)
* [Lens Flare](shared/lens-flare/lens-flare-component.md)
* [Lens Flare asset](shared/lens-flare/lens-flare-asset.md)
* Tools
* [Look Dev](Look-Dev.md)
* [Compositor](Compositor-Main.md)
Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
[comment]: # (If you modify this file make sure you modify the copy/paste file: com.unity.render-pipelines.universal and com.unity.render-pipelines.core\Documentation~\Common\lens-flare-data-driven-asset.md)
# Lens Flare (SRP) Data Asset

# Lens Flare (SRP) Asset
Unity’s [Scriptable Render Pipeline (SRP)](https://docs.unity3d.com/Manual/ScriptableRenderPipeline.html) includes the **Lens Flare Data** asset. You can use this asset to control the appearance of [Lens Flares](lens-flare-component.md) in your scene. This is the SRP equivalent of the Built-in Render Pipeline's [Flare](https://docs.unity3d.com/Manual/class-Flare.html) asset, which is incompatible with SRPs.

Unity’s [Scriptable Render Pipeline (SRP)](https://docs.unity3d.com/Manual/ScriptableRenderPipeline.html) includes the **Lens Flare Element** asset. You can use this asset to create lens flares in your scene and control their appearance. <br/>To create a Lens Flare Element asset, navigate to **Assets > Create > SRP Lens Flare**. To use this asset, assign it to the **Lens Flare Data** property of an [SRP Lens Flare Override Component](srp-lens-flare-component.md).
To create a Lens Flare Data asset, select **Assets > Create > Lens Flare (SRP)**. To use this asset, assign it to the **Lens Flare Data** property of a [Lens Flare (SRP) component](lens-flare-component.md).

## Properties

Expand Down Expand Up @@ -32,7 +32,7 @@ The Lens Flare Element asset has the following properties:

#### Image

![](images/LensFlareShapeImage.png)
![](../../images/shared/lens-flare/lens-flare-shape-image.png)

| **Property** | **Description** |
| --------------------- | ------------------------------------------------------------ |
Expand All @@ -43,7 +43,7 @@ The Lens Flare Element asset has the following properties:

#### Circle

![](images/LensFlareShapeCircle.png)
![](../../images/shared/lens-flare/lens-flare-shape-circle.png)

| **Property** | **Description** |
| ------------ | ------------------------------------------------------------ |
Expand All @@ -55,7 +55,7 @@ The Lens Flare Element asset has the following properties:

#### Polygon

![](images/LensFlareShapePolygon.png)
![](../../images/shared/lens-flare/lens-flare-shape-polygon.png)

| **Property** | **Description** |
| ------------ | ------------------------------------------------------------ |
Expand All @@ -69,20 +69,20 @@ The Lens Flare Element asset has the following properties:

## Color

![](images/LensFlareColor.png)
![](../../images/shared/lens-flare/lens-flare-Color.png)

| **Property** | **Description** |
| ----------------------- | ------------------------------------------------------------ |
| Tint | Changes the tint of the lens flare. If this asset is attached to the light, this property is based on the light tint. |
| Modulate By Light Color | Allows light color to affect this Lens Flare Element. This only applies when the asset is used in a [SRP Lens Flare Override Component](srp-lens-flare-component.md) that is attached to a point, spot, or area light. |
| Modulate By Light Color | Allows light color to affect this Lens Flare Element. This only applies when the asset is used in a [Lens Flare (SRP) component](lens-flare-component.md) that is attached to a point, spot, or area light. |
| Intensity | Controls the intensity of this element. |
| Blend Mode | Select the blend mode of the Lens Flare Element this asset creates:<br />• Additive <br />• Screen <br />• Premultiplied <br />• Lerp |

<a name="Transform"></a>

## Transform

![](images/LensFlareTransform.png)
![](../../images/shared/lens-flare/lens-flare-Transform.png)

| **Property** | **Description** |
| ----------------------- | ------------------------------------------------------------ |
Expand All @@ -97,7 +97,7 @@ The Lens Flare Element asset has the following properties:

## AxisTransform

![](images/LensFlareAxisTransform.png)
![](../../images/shared/lens-flare/lens-flare-axis-transform.png)

| **Property** | **Description** |
| ----------------- | ------------------------------------------------------------ |
Expand All @@ -109,7 +109,7 @@ The Lens Flare Element asset has the following properties:

## Distortion

![](images/LensFlareRadialDistortion.png)
![](../../images/shared/lens-flare/lens-flare-radial-distortion.png)

| **Property** | **Description** |
| --------------- | ------------------------------------------------------------ |
Expand All @@ -131,7 +131,7 @@ The Lens Flare Element asset has the following properties:
| Relative To Center | If true the distortion is relative to center of the screen otherwise relative to lensFlare source screen position. |

### Uniform
![](images/LensFlareMultileElementUniform.png)
![](../../images/shared/lens-flare/lens-flare-multiple-elements-uniform.png)

| **Property** | **Description** |
| --------------- | ------------------------------------------------------------ |
Expand All @@ -142,7 +142,7 @@ The Lens Flare Element asset has the following properties:

### Curve

![](images/LensFlareMultileElementCurve.png)
![](../../images/shared/lens-flare/lens-flare-multiple-elements-curve.png)

| **Property** | **Description** |
| ---------------- | ------------------------------------------------------------ |
Expand All @@ -155,7 +155,7 @@ The Lens Flare Element asset has the following properties:

### Random

![](images/LensFlareMultileElementRandom.png)
![](../../images/shared/lens-flare/lens-flare-multiple-elements-random.png)

| **Property** | **Description** |
| ------------------- | ------------------------------------------------------------ |
Expand Down
Original file line number Diff line number Diff line change
@@ -1,21 +1,31 @@
[comment]: # (If you modify this file make sure you modify the copy/paste file: com.unity.render-pipelines.universal and com.unity.render-pipelines.core\Documentation~\Common\lens-flare-data-driven-component.md)
# Lens Flare (SRP) component

# Lens Flare (SRP) Component
![](../../images/shared/lens-flare/lens-flare-header.png)

![](images/LensFlareHeader.png)
Unity’s Scriptable Render Pipeline (SRP) includes the Lens Flare (SRP) component which renders a lens flare in your scene. This is the SRP equivalent of the Built-in Render Pipeline's [Lens Flare](https://docs.unity3d.com/Manual/class-LensFlare.html) component, which is incompatible with SRPs. You can attach a Lens Flare (SRP) component to any GameObject, but some properties only appear when you attach a Lens Flare (SRP) component to a light.

Unity’s Scriptable Render Pipeline (SRP) includes the SRP Lens Flare Override component to control a [Lens Flare (SRP) Data](lens-flare-data-driven-asset.md) asset. You can attach an Lens Flare (SRP) Component to any GameObject.
Some properties only appear when you attach this component to a light.
![](../../images/shared/lens-flare/lens-flare-comp.png)

![](images/LensFlareComp.png)
## Creating lens flares in SRP

The Lens Flare (SRP) component controls where the lens flare is as well as properties such as attenuation and whether the lens flare considers occlusion. For properties that define how the lens flare looks, SRP uses the [Lens Flare (SRP) Data](lens-flare-asset.md) asset. Each Lens Flare (SRP) component must reference a Lens Flare (SRP) data asset to display a lens flare on-screen.

To create a lens flare in a scene:

1. Create or select a GameObject to attach the lens flare to.
2. In the Inspector, click **Add Component**.
3. Select **Rendering** > **Lens Flare (SRP)**. Currently, the lens flare doesn't render in the scene because the component doesn't reference a Lens Flare (SRP) Data asset in its **Lens Flare Data** property.
4. Create a new Lens Flare (SRP) Data asset (menu: **Assets** > **Create** > **Lens Flare (SRP)**).
5. In the Lens Flare (SRP) component Inspector, assign the new Lens Flare (SRP) Data asset to the **Lens Flare Data** property.
6. Select the Lens Flare (SRP) Data asset and, in the Inspector, add a new element to the **Elements** list. A default white lens flare now renders at the position of the Lens Flare (SRP) component. For information on how to customize how the lens flare looks, see [Lens Flare (SRP) Data](lens-flare-asset.md).

## Properties

### General

| **Property** | **Description** |
| --------------- | ------------------------------------------------------------ |
| Lens Flare Data | Select the [Lens Flare (SRP) Asset](lens-flare-data-driven-asset.md) asset this component controls. |
| Lens Flare Data | Select the [Lens Flare (SRP) Data](lens-flare-asset.md) asset this component controls. |
| Intensity | Multiplies the intensity of the lens flare. |
| Scale | Multiplies the scale of the lens flare. |
| Attenuation by Light Shape | Enable this property to automatically change the appearance of the lens flare based on the type of light you attached this component to.<br/>For example, if this component is attached to a spot light and the camera is looking at this light from behind, the lens flare will not be visible. <br/>This property is only available when this component is attached to a light. |
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ For detailed steps on how to create custom clouds in your scene, see [creating c

HDRP 12.0 includes a new Lens Flare system. You can attach a Lens Flare (SRP) component to any GameObject.

Some Lens Flare properties only appear when you attach a Lens Flare (SRP) component to a light. Each Lens Flare has optional multiple elements that you can control individually. HDRP also provides a [new lens flare asset](lens-flare-data-driven-asset.md) and a [new lens flare component](lens-flare-data-driven-component.md) that you can attach to any GameObject.
Some Lens Flare properties only appear when you attach a Lens Flare (SRP) component to a light. Each Lens Flare has optional multiple elements that you can control individually. HDRP also provides a [new lens flare asset](shared/lens-flare/lens-flare-asset.md) and a [new lens flare component](shared/lens-flare/lens-flare-component.md) that you can attach to any GameObject.

### Light Anchor

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -36,4 +36,4 @@ These are the post-processing effects that are available in the Universal Render

* [White Balance](Post-Processing-White-Balance.md)

* [Lens Flare Data Driven](lens-flare-data-driven-component.md)
* [Lens Flare](lens-flare-component.md)

This file was deleted.

This file was deleted.

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,7 @@
* [The Universal Additional Light Data component](universal-additional-light-data.md)
* [Shadows in the Universal Render Pipeline](Shadows-in-URP.md)
* [Reflection probes](lighting/reflection-probes.md)
* [Lens Flare asset](shared/lens-flare/lens-flare-asset.md)
* [Cameras](cameras.md)
* [The Universal Additional Camera Data component](universal-additional-camera-data.md)
* [Render Type](camera-types-and-render-type.md)
Expand Down Expand Up @@ -72,7 +73,7 @@
* [Tonemapping](post-processing-tonemapping.md)
* [Vignette](post-processing-vignette.md)
* [White Balance](Post-Processing-White-Balance.md)
* [Lens Flare Data Driven](lens-flare-data-driven-component.md)
* [Lens Flare](shared/lens-flare/lens-flare-component.md)

* [Shaders and Materials](shaders-in-universalrp.md)
* [Shading Models](shading-model.md)
Expand Down
Loading

0 comments on commit cd6a08d

Please sign in to comment.