Skip to content

Commit 7a05741

Browse files
peeweeksebastienlagarde
authored andcommitted
Visual Effect Graph Documentation (#4601)
* Delete Old Documentation * Base Commit * Updated Documentation * Updated Documentation * Work on Blocks/Systems/Subgraphs * Fixed link in Table of Contents * Updated Structure * Work on Properties + System Spaces * More work (SpawnerCallbacks, Attributes, Events) * Work on Operators documentation * Explanations on Settings + Property Binders Base work * Component API + Split ExposedProperty Helper * Cleaned up Layout * Visual Effect Graph Asset Documentation + Base Files for Preferences / Project Settings * Added Content for Visual Effect Preferences / Project Settings * Adding information about Standard Attributes * Event Binders Documentation * Added Disclaimer / Play Controls * Updated Documentation : Added Timeline, Point Caches, Point Cache Bake Tool, Vector Fields. Property Binders * Added Experimental Tags + GPUEvents Paragraph * Changes for PR * Fixes for PR * Fixes for PR * Fixes for PR * Fixes for PR * Fixes for Documentation PR * Fixes for PR * Fixes for PR
1 parent f386acd commit 7a05741

147 files changed

Lines changed: 1835 additions & 1273 deletions

File tree

Some content is hidden

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

com.unity.visualeffectgraph/Documentation~/Attributes-Properties-and-Settings.md

Lines changed: 0 additions & 143 deletions
This file was deleted.
Lines changed: 63 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,63 @@
1+
<div style="border: solid 1px #999; border-radius:12px; background-color:#EEE; padding: 8px; padding-left:14px; color: #555; font-size:14px;"><b>Draft:</b> The content on this page is complete, but it has not been reviewed yet.</div>
2+
# Attributes
3+
4+
Attributes are data attached to elements present in Systems. For instance, the color of a particle, its position, or the amount of particles that a spawn system need to create.
5+
6+
Attributes can be read or written in systems in order to perform custom behavior and differentiate elements.
7+
8+
Attributes are stored in systems whenever needed so only the necessary data are stored in order to save memory.
9+
10+
## Accessing Attributes
11+
12+
### Writing Attributes
13+
14+
Attributes can be written using [Blocks](Blocks.md). Blocks are the only graph elements that can write attributes to the system.
15+
16+
Attributes, when written, are stored into simulation data if needed in another, later context :
17+
18+
* Attributes written in Initialize / Update contexts will be stored only if read in Update / Output Contexts.
19+
* Attributes written in Output Contexts do not store into simulation data and are only used for rendering.
20+
21+
### Reading Attributes
22+
23+
Reading attributes can be done through Operators and Blocks:
24+
25+
* Using a Get [Attribute] Operator.
26+
* Using Different Composition Modes in Set [Attribute] Blocks (Add, Multiply, Blend) that depends on the previous value of the attribute.
27+
28+
> Reading an attribute that is not stored into the simulation will result in reading its default, constant value.
29+
30+
> **WARNING**: It is currently only possible to read attributes in Particle and ParticleStrip Systems. Reading attributes in Spawn Systems can only be achieved using [Spawner Callbacks](SpawnerCallbacks.md) .
31+
32+
## Attribute Locations
33+
34+
Attributes are stored in data containers specific to every system. However, Reading an attribute can be achieved on the current simulation data pool or in another data pool if the system depends on.
35+
36+
### Current
37+
38+
Current Attribute Location refers to the **current** system data where the value is read from.
39+
40+
* Particle Data from a Particle System
41+
* ParticleStrip Data from a ParticleStrip System
42+
* SpawnEvent Data from a Spawn context or sent through [SendEvent](https://docs.unity3d.com/2019.3/Documentation/ScriptReference/VFX.VisualEffect.SendEvent.html) [EventAttribute](https://docs.unity3d.com/2019.3/Documentation/ScriptReference/VFX.VFXEventAttribute.html) Payload.
43+
44+
### Source
45+
46+
Source Attribute Location refers to the **previous system** data where the value is read from.
47+
48+
Source attributes can be **read only in the first context of a system, after a system data change**. (For instance : EventAttributes and GPU EventAttributes can only be accessed in Particle / ParticleStrip System Initialize Contexts).
49+
50+
* In Initialize Particle / Initalize Particle Strips Contexts:
51+
* From incoming Spawn Contexts.
52+
* From other Particle Systems, through GPUEvent spawn.
53+
54+
## Variadic Attributes
55+
56+
Some attributes possess **Variadic** Properties : these attributes can be a scalar or a vector of different dimensions depending on the components you require for simulating and/or rendering.
57+
58+
In the case of a variadic attribute, all other implicit components will be read using their default values.
59+
60+
> For instance, the `scale` of a Quad particle can be expressed as a `Vector2` (width, and length of the quad), whereas the `scale` of a Box particle will be expressed as a `Vector3` (width, length and depth of the cube). When setting variadic attributes, a Drop Down of all channel combinations will enable you to write only the necessary channels.
61+
62+
> Another example is for the Rotation of a sprite around its normal, only the Z component of the angle attribute (`angleZ`) would be used, so `angleX`, and `angleY` are not stored.
63+
Lines changed: 79 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,79 @@
1+
<div style="border: solid 1px #999; border-radius:12px; background-color:#EEE; padding: 8px; padding-left:14px; color: #555; font-size:14px;"><b>Draft:</b> The content on this page is complete, but it has not been reviewed yet.</div>
2+
# Blackboard
3+
4+
The Blackboard panel is an utility panel in the [Visual Effect Graph Window](VisualEffectGraphWindow.md) that enables managing local and exposed **properties**.
5+
6+
Properties you define in blackboard are global variables that can be used throughout the graph in order to factorize usage of the same values. For example a bounding box property can be set once and used for many particle systems. Properties can be defined, ordered and categorized in a blackboard window.
7+
8+
![Blackboard-Properties](Images/Blackboard-Properties.png)
9+
10+
You can use properties as **local constants** or **exposed**. Exposed properties are visible on the [Visual Effect Component](VisualEffectComponent.md) and can be accessed via the C# API.
11+
12+
Exposed Properties display a green dot left to their label while local constants do not display this dot.
13+
14+
## Properties in Blackboard
15+
16+
You can open the Blackboard panel using the **Blackboard** button located in the right side of the Visual Effect Graph window's toolbar.
17+
18+
### How to Create Properties
19+
20+
You can create properties by clicking the + button located in the top-right corner of the blackboard, then select a property type in the menu.
21+
22+
You can also convert an inline operator to a property by right-clicking the node and selecting either:
23+
24+
- Convert to Property if you want to create a local variable
25+
- Convert to Exposed Property if you want to create an exposed property
26+
27+
> Regardless of the option you choose, you can edit the Exposed flag at a later time.
28+
29+
### How to Edit Properties
30+
31+
Properties can be edited in the blackboard by clicking the folding arrow left to them. It expands the following property options:
32+
33+
* Exposed : Whether the property is exposed and visible to the Visual Effect Inspector.
34+
* Value : The default Property value.
35+
* Tooltip : A tooltip string that appears when hovering the property in the Visual Effect Inspector.
36+
37+
> Some property types display additional options, for instance a Range option for float properties.
38+
39+
### How to Arrange Properties
40+
41+
- You can **rename** a property by right-clicking it, then select rename from the context menu. You can also start renaming by double clicking the property name. You can then type the name in the editable field and validate by pressing enter or clicking somewhere else.
42+
- You can **drag and drop** properties in the blackboard panel to reorder them.
43+
- You can **delete** a property by right-clicking it, then select delete from the context menu, or select the property and use the **Delete** key (Cmd + Delete key on macOS).
44+
45+
### Property Categories
46+
47+
Categories enable sorting properties in groups, so they appear in a more tidy way:
48+
49+
- You can **create** a category by clicking the + button located in the top-right corner of the blackboard, then select **Category**.
50+
- You can **rename** a category by right-clicking its title, then select rename from the context menu. You can also start renaming by double clicking the category title. You can then type the name in the editable field and validate by pressing enter or clicking somewhere else.
51+
- You can **delete** a category by right-clicking its title, then select delete from the context menu, or select the category and use the **Delete** key. Deleting a category will also delete all the properties contained in it.
52+
- You can drag and drop a category to **reorder** them by dragging its header.
53+
- You can **drag and drop properties** from a category to another, or at the top of the window if you want this property to not be part of a category.
54+
55+
## Property Nodes
56+
57+
Property nodes have a slightly different visual than standard nodes : They display the Property Name and an optional green dot if the property is exposed.
58+
59+
They can be expanded to use a sub-member of the property value.
60+
61+
![PropertyNode](Images/PropertyNode.png)
62+
63+
## Exposed Properties in Inspector
64+
65+
Exposed properties become visible on a [Visual Effect Inspector](VisualEffectComponent.md), in the Properties area, if their Exposed flag is checked in the blackboard. They appear in the same order and categories as they are defined in the blackboard.
66+
67+
![Properties-Inspector](Images/Properties-Inspector.png)
68+
69+
### Overriding Property Values
70+
71+
You can override a property value from its default by ticking the checkbox in the left part of the inspector.
72+
73+
- Once overridden, the value can be changed for this instance.
74+
- You can revert back to the default value by toggling off the override checkbox.
75+
76+
### Editing Properties using Gizmos
77+
78+
Some advanced property types can be edited using gizmos. In order to enable Gizmo editing, click the **Show Property Gizmos** button to enable advanced editing, then click the Edit button next to every compatible property in order to use its editing gizmo.
79+

0 commit comments

Comments
 (0)