Skip to content

Commit 086b321

Browse files
julienf-unityEvergreen
authored andcommitted
[VFX][Doc] VFX Graph documentation improvement (first pass)
This PR is the first pass of an initiative to improve VFX Graph documentation for Unity 6. It is doc only and does not modify the code. This PR contains the following addition/improvements to doc - [volumetric output](https://github.cds.internal.unity3d.com/unity/unity/pull/43553) - [what's new](https://github.cds.internal.unity3d.com/unity/unity/pull/44163) - [type color scheme](https://github.cds.internal.unity3d.com/unity/unity/pull/44081) - [activation ports](https://github.cds.internal.unity3d.com/unity/unity/pull/44450) - [experimental feature](https://github.cds.internal.unity3d.com/unity/unity/pull/38982) - [shader graph output](https://github.cds.internal.unity3d.com/unity/unity/pull/43637) - [instancing](https://github.cds.internal.unity3d.com/unity/unity/pull/44241) - [Getting started improvements](https://github.cds.internal.unity3d.com/unity/unity/pull/44228) - [in graph profiling](https://github.cds.internal.unity3d.com/unity/unity/pull/44453) - [Update graph logic and philosophy](https://github.cds.internal.unity3d.com/unity/unity/pull/44867)
1 parent 0380dc6 commit 086b321

File tree

90 files changed

+849
-205
lines changed

Some content is hidden

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

90 files changed

+849
-205
lines changed

Packages/com.unity.visualeffectgraph/Documentation~/Block-SetAttribute.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -29,15 +29,15 @@ This Block is compatible with the following Contexts:
2929
| --------------- | -------------------------- | ------------------------------------------------------------ |
3030
| **Attribute** | Attribute (Inspector Only) | **(Inspector)** Specifies the attribute to write to. |
3131
| **Composition** | Enum (Inspector Only) | **(Inspector)** Specifies how this Block composes the attribute. The options are:<br/>&#8226; **Set**: Overwrites the position attribute with the new value.<br/>&#8226; **Add**: Adds the new value to the position attribute value.<br/>&#8226; **Multiply**: Multiplies the position attribute value by the new value.<br/>&#8226; **Blend**: Interpolates between the position attribute value and the new value. You can specify the blend factor between 0 and 1. |
32-
| **Source** | Enum (Inspector Only) | **(Inspector)** Specifies the source of the attribute. The options are:<br/>&#8226; **Slot**: Calculates the value from the Block’s input property ports.<br/>&#8226; **Source**: Takes the value from the source attribute of the same name. |
32+
| **Source** | Enum (Inspector Only) | **(Inspector)** Specifies the source of the attribute. The options are:<br/>&#8226; **Port**: Calculates the value from the Block’s input property ports.<br/>&#8226; **Source**: Takes the value from the source attribute of the same name. |
3333
| **Random** | Enum | **(Inspector)** Specifies how the Block calculates the value to compose to the attribute. The options are:<br/>&#8226; **Off** : Does not calculate a random value for the attribute. Uses the value you provide in the input directly.<br/>&#8226; **PerComponent**: Calculates a random value for each of the attribute's components.<br/>&#8226; **Uniform** : Calculates a single random value and uses it for each of the attribute's components. |
3434
| **Channels** | Enum | Specifies which channels of the attribute to affect. This Operator has no effect on channels you do not specify with this setting. This setting is only visible if the **Attribute** you set is one with channels. |
3535

3636
## Block properties
3737

3838
| **Input** | **Type** | **Description** |
3939
| ---------------- | ------------------------ | ------------------------------------------------------------ |
40-
| **\<Attribute>** | Depends on the attribute | The value to compose to the attribute.<br/>This property only appears if you set **Source** to **Slot** and **Random** to **Off**. |
41-
| **A** | Depends on the attribute | The first end of the random range the Block uses to calculate the value for the attribute.<br/>This property only appears if you set **Source** to **Slot** and **Random** to **PerComponent** or **Uniform**. |
42-
| **B** | Depends on the attribute | The other end of the random range the Block uses to calculate the value for the attribute.<br/>This property only appears if you set **Source** to **Slot** and **Random** to **PerComponent** or **Uniform**. |
40+
| **\<Attribute>** | Depends on the attribute | The value to compose to the attribute.<br/>This property only appears if you set **Source** to **Port** and **Random** to **Off**. |
41+
| **A** | Depends on the attribute | The first end of the random range the Block uses to calculate the value for the attribute.<br/>This property only appears if you set **Source** to **Port** and **Random** to **PerComponent** or **Uniform**. |
42+
| **B** | Depends on the attribute | The other end of the random range the Block uses to calculate the value for the attribute.<br/>This property only appears if you set **Source** to **Port** and **Random** to **PerComponent** or **Uniform**. |
4343
| **Blend** | Float (Range 0..1) | The blend percentage between the current position attribute value and the newly calculated position value.<br/>This property only appears if you set **Composition** to **Blend**. |

Packages/com.unity.visualeffectgraph/Documentation~/Blocks.md

Lines changed: 34 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
Blocks are Nodes that define the behavior of a [Context](Contexts.md). You can create and reorder Blocks within a Context and, when Unity plays a visual effect, Blocks execute from top to bottom.
44

5-
![](Images/BlockUI.png)
5+
![](Images/Block-Anatomy.png)
66

77
You can use Blocks for many purposes, from simple value storage (for example, a random Color) to high-level complex operations such as Noise Turbulence, Forces, or Collisions.
88

@@ -23,24 +23,42 @@ Blocks are essentially Nodes that have a different workflow logic. Blocks are al
2323

2424
* To reorder a Block, click the Block's header and drag it to a different position in the same Context.
2525

26-
* You can also cut, copy, paste, and duplicate Blocks. To do this:
27-
* Right click on the Block and select the command from the context menu.
28-
* Select the Block and use the following Keyboard shortcuts:
29-
* On Windows
30-
* **Copy**: Ctrl+C.
31-
* **Cut**: Ctrl+X.
32-
* **Paste**: Ctrl+V.
33-
* **Duplicate**: Ctrl+D.
34-
* On OSX
35-
* **Copy**: Cmd+C.
36-
* **Cut**: Cmd+X.
37-
* **Paste**: Cmd+V.
38-
* **Duplicate**: Cmd+D.
39-
40-
* To disable a Block, disable the checkbox to the right of the Block's header. This requires you to recompile the graph.
26+
- You can perform various actions on Blocks, such as cutting, copying, pasting, and duplicating. To do this:
27+
28+
- Right-click on the Block and select the command from the context menu.
29+
30+
- Select the Block and use the following keyboard shortcuts:
31+
32+
- **On Windows:**
33+
- **Copy:** Ctrl+C.
34+
- **Cut:** Ctrl+X.
35+
- **Paste:** Ctrl+V.
36+
- **Duplicate:** Ctrl+D.
37+
38+
- **On macOS:**
39+
- **Copy:** Cmd+C.
40+
- **Cut:** Cmd+X.
41+
- **Paste:** Cmd+V.
42+
- **Duplicate:** Cmd+D.
43+
44+
* To disable a Block, disable the checkbox to the left of the Block's header. This requires you to recompile the graph.
4145

4246
## Configuring Blocks
4347

4448
To change the way that the Block looks and behaves, adjust the Block's [Settings](GraphLogicAndPhilosophy.md#settings) in the Node UI or the Inspector.
4549

4650
For example, if, in the Inspector, you change the Composition Settings of a **Set Velocity** Block from **Overwrite** to **Blend**, this changes the title of the Node to **Blend Velocity** and adds a **Blend** property to the Node UI.
51+
52+
## Activation port
53+
54+
In addition to its [property](Properties.md) ports, a Block has a special port called the activation port. It is located on the top left of a Block, next to its name.
55+
56+
The activation port is linked to a boolean property and allows the user to control if a Block is active.
57+
58+
You can use the toggle next to the port to manually activate or deactivate a Block.
59+
60+
You can connect a graph logic to the activation port to accurately control under which conditions a Block is active per invocation. This allows you to implement different behaviors or states per particle within the same system.
61+
62+
Unity is able to determine if a Block is statically inactive. An inactive Block appears greyed out, and Unity removes it during compilation so it has zero runtime cost.
63+
64+
**Note**: Subgraph Blocks don't have activation ports. To emulate an activation port, you can expose a boolean exposed property from the subgraph, and connect the property to the activation ports of the subgraph's internal Blocks.

Packages/com.unity.visualeffectgraph/Documentation~/Context-OutputForwardDecal.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ Menu Path : **Context > Output Particle Forward Decal**
44

55
The **Output Particle Forward Decal** Context renders a particle system using a decal. A decal is a box into which the Visual Effect Graph projects a texture. Unity then renders the texture on any intersecting geometry along its xy plane. This means decal particles that don’t intersect any geometry are not visible. Note that although they are not visible, they still contribute to the resource intensity required to simulate and render the system.
66

7-
This output implements the simplest form of decals. It is limited to blending a single albedo texture and is not lit. This output does not support [Shader Graph](https://docs.unity3d.com/Packages/com.unity.shadergraph@latest).
7+
This output implements the simplest form of decals. It is limited to blending a single albedo texture and is not lit.
88

99
More decal features are planned for future versions of the Visual Effect Graph.
1010

Packages/com.unity.visualeffectgraph/Documentation~/Context-OutputLine.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ Two modes are available to set the end point of the line. The first point is alw
99
* Using target offset in particle space. Specifies the second point via an offset defined in the particle space.
1010
* Using target position attribute. Specifies the second point with the target position attribute.
1111

12-
This output does not support texturing or [Shader Graph](https://docs.unity3d.com/Packages/com.unity.shadergraph@latest).
12+
This output does not support texturing.
1313

1414
Below is a list of settings and properties specific to the Output Particle Line Context. For information about the generic output settings this Context shares with all other Contexts, see [Global Output Settings and Properties](Context-OutputSharedSettings.md).
1515

Packages/com.unity.visualeffectgraph/Documentation~/Context-OutputParticleHDRPLitDecal.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
The **Output Particle HDRP Lit Decal** Context uses a decal to render a particle system. A decal is a box that the Visual Effect Graph projects a texture into. Unity renders that texture on any geometry that intersects the decal along its xy plane. This means decal particles that don’t intersect any geometry are not visible. When a decal is not visible, it still contributes to the resource intensity required to simulate and render the system.
44

5-
This Context can project its properties onto a surface using a Base Color map (albedo), a Normal Map, or a Mask Map. It does not support [Shader Graph](https://docs.unity3d.com/Packages/com.unity.shadergraph@latest). To use this context, enable **Decals** in the [HDRP Asset](https://docs.unity3d.com/Packages/com.unity.render-pipelines.high-definition@latest/index.html?subfolder=/manual/HDRP-Asset.html) and in the [HDRP Settings](https://docs.unity3d.com/Packages/com.unity.render-pipelines.high-definition@latest?subfolder=/manual/Frame-Settings.html).
5+
This Context can project its properties onto a surface using a Base Color map (albedo), a Normal Map, or a Mask Map. To use this Context, enable **Decals** in the [HDRP Asset](https://docs.unity3d.com/Packages/com.unity.render-pipelines.high-definition@latest/index.html?subfolder=/manual/HDRP-Asset.html) and in the [HDRP Settings](https://docs.unity3d.com/Packages/com.unity.render-pipelines.high-definition@latest?subfolder=/manual/Frame-Settings.html).
66

77
Menu Path : **Context > Output Particle HDRP Lit Decal**
88

Lines changed: 41 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,41 @@
1+
# Output Particle HDRP Volumetric Fog
2+
3+
The **Output Particle HDRP Volumetric Fog** Context allows for the injection of fog directly into HDRP's volumetric lighting system, resulting in dynamic fog effects created with the VFX graph simulation.
4+
5+
Prior to using this output, ensure that volumetric fog is enabled within your project. Refer to the [HDRP Volumetric Lighting](https://docs.unity3d.com/Packages/com.unity.render-pipelines.high-definition@latest?subfolder=/manual/Volumetric-Lighting.html) documentation page for more information on this.
6+
7+
The **Output Particle HDRP Volumetric Fog** Context converts all the particles of the system into volumetric fog for HDRP. To do this, it converts each particle into a solid sphere. It sets the sphere's center as the particle's center, and determines the sphere's size based on the particle's size.
8+
9+
The particle color controls the color of the fog, and the particle alpha controls the density of the fog, making color and alpha the two primary inputs for this Context.
10+
11+
Menu Path : **Context > Output Particle HDRP Volumetric Fog**
12+
13+
# Context Settings
14+
15+
| **Input** | **Type** | **Description** |
16+
|------------------------------|----------|-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
17+
| **Fog Blend Mode** | Enum | Determines how the particle's fog is blended with the existing fog in the scene. This mode works well with the [Renderer priority](https://docs.unity3d.com/Packages/com.unity.visualeffectgraph@latest?subfolder=/manual/VisualEffectComponent.html#rendering-properties) as it allows to control the order of fog blending when commutative blending modes are used. This property is similar to the **priority** in the [Local Volumetric Fog](https://docs.unity3d.com/Packages/com.unity.render-pipelines.high-definition@latest?subfolder=/manual/Local-Volumetric-Fog.html#properties) component. |
18+
| **Falloff Mode** | Enum | Determines the type of falloff to apply on the **Fade Radius**, similar to the "Falloff Mode" in the [Local Volumetric Fog](https://docs.unity3d.com/Packages/com.unity.render-pipelines.high-definition@latest?subfolder=/manual/Local-Volumetric-Fog.html#properties) component. |
19+
| **Use Mask Map** | Bool | Exposes a 3D texture on the output Context, sampled in the particle's volume. Note that because the particle shape is a sphere, 3D texture corners are never sampled. |
20+
| **Use Distance Fading** | Bool | Exposes two ports to control the particle fading. Distance fade consists of a Start and End distance, where the particle alpha is interpolated to 0 (that is, when the particle center distance from the camera equals **Distance Fade Start** the alpha is multiplied by 1, and when the distance reaches **Distance Fade End** it is multiplied by 0). Distance Fading can help prevent small fog particles from flickering. |
21+
22+
23+
# Context Properties
24+
25+
| **Input** | **Type** | **Description** |
26+
|-----------------------|----------|-------------------|
27+
| **Fade Radius** | Float | A value between 0 and 1 indicating the level of softness for the sphere border. Lower values create harder edges and more visible aliasing, so it is recommended to keep this value fairly high when fog particles are small. |
28+
| **Density** | Float | Determines the density of fog inside the particle. Higher density results in more opaque fog. |
29+
| **Mask** | Texture3D | A 3D texture that adds detail inside fog particles. The RGB channels of the texture are multiplied by the particle color to create the final fog color. The alpha channel of the texture is multiplied by the density and the particle alpha to create the final fog density. |
30+
| **UV Scale** | Vector3 | Allows scaling of the UVs of the 3D texture. |
31+
| **UV Bias** | Vector3 | Allows adding an offset in the UVs of the texture. The offset is applied after scaling. |
32+
| **Distance Fade Start** | Float | Determines the distance from the camera to the particle center where the particle begins to fade. |
33+
| **Distance Fade End** | Float | Determines the distance from the camera to the particle center where the particle ends fading. |
34+
35+
36+
# Limitations
37+
38+
- This Output does not support [Shader Graph](https://docs.unity3d.com/Packages/com.unity.shadergraph@latest).
39+
- For this Context to work, enable Volumetric Fog in the HDRP Asset and in the HDRP Global Settings.
40+
- The quality of the fog is determined by the settings of the [Fog](https://docs.unity3d.com/Packages/com.unity.render-pipelines.high-definition@latest?subfolder=/manual/Override-Fog.html) volume component in your scene, so make sure to adjust these values for better visuals.
41+
- Only spheres are supported as the primitive to output fog.

Packages/com.unity.visualeffectgraph/Documentation~/Context-OutputParticleURPLitDecal.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
The **Output Particle URP Lit Decal** Context uses a decal to render a particle system. A decal is a box that the Visual Effect Graph projects a texture into. Unity renders that texture on any geometry that intersects the decal along its xy plane. This means decal particles that don’t intersect any geometry are not visible. When a decal is not visible, it still contributes to the resource intensity required to simulate and render the system.
44

5-
This Context can project its properties onto a surface using a Base Color map (albedo), a Normal Map, a Metallic Map and/or an Occlusion Map. It does not support [Shader Graph](https://docs.unity3d.com/Packages/com.unity.shadergraph@latest).
5+
This Context can project its properties onto a surface using a Base Color map (albedo), a Normal Map, a Metallic Map and/or an Occlusion Map.
66

77
To use this context, add the [URP Decal Renderer Feature](https://docs.unity3d.com/Packages/com.unity.render-pipelines.universal@latest?subfolder=/manual/renderer-feature-decal.html) to your Renderer. For more information, refer to [How to add a Renderer Feature](https://docs.unity3d.com/Packages/com.unity.render-pipelines.universal@latest?subfolder=/manual/urp-renderer-feature-how-to-add.html).
88

Packages/com.unity.visualeffectgraph/Documentation~/Context-OutputParticleURPLitDecal.md.meta

Lines changed: 0 additions & 3 deletions
This file was deleted.

Packages/com.unity.visualeffectgraph/Documentation~/Context-OutputPoint.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,6 @@ Menu Path : **Context > Output Particle Point**
33

44
The **Output Particle Point** Context uses points to render a particle system. It always draws points as single pixels regardless of the distance of the particle to the camera or each particle's size and scale attributes.
55

6-
This output does not support texturing or [Shader Graph](https://docs.unity3d.com/Packages/com.unity.shadergraph@latest).
6+
This output does not support texturing.
77

88
For information about the generic output settings this Context shares with all other Contexts, see [Global Output Settings and Properties](Context-OutputSharedSettings.md).

0 commit comments

Comments
 (0)