Custom Vertex Streams and Custom Data Auto Setup
Last updated
Last updated
If you are more of a visual learner there’s also a video tutorial:
Some effects can use the Particle System Custom Data to control them. Those effects are both Fades, Texture Offset Custom Stream and Shape Weights Custom Stream. By using the Custom Data curves we have fine control over how much we want the particles to fade over time or scroll over time.
Let’s first see how to setup the effects and then we’ll take a look at how to use the Custom Data. To use this features on Fade From Noise Texture or Fade From Final Shape effects we’ll need to check the Fade Amount Driven By Vertex Stream Toggle:
As the toggle says when this is set to true the Custom Data of the Particle System will be responsible of changing the Fade Amount over time. If the toggle is set to false the alpha of the effect will drive the Fade Amount.
The Procedural Dissolve works just the same:
The Texture Offset effect will only be visible on Materials that are on a Particle System and will only show the shapes that are enabled, in this case all 3 shapes are enabled:
We’ll then choose how much each shape gets affected by changing the multiplier property of each shape. But on the Custom Data we’ll have only 1 property to control all 3 shapes, the only way of having the offset be different for each shape is by changing the multiplier properties.
The Shape Weights Custom Stream is similar to the Texture Offset one that we just saw. It will only appear in the Material Inspector when used on Particle Systems and also will only show Shapes that are enabled:
Negative values will make the corresponding Shape less visible while positive values will make the corresponding Shape. This can be used to fade partial parts of the particles in and out.
To set the Custom Data that you need for any particular Material you can use the Particle System Component and press the “Custom Data Auto Setup” button to automatically add the needed vertex stream channels:
After pressing the button the Custom Data setup of the Particle System will look like this (if a row is missing it means that the effect that uses it is disabled):
The row numbered with a red number 1 is the random timing seed explained in the Random Seed section.
The row numbered with a red number 2 is the Fade Amount of both Fade effects (it’s shared, but you’ll be using one or the other, not both at the same time).
The row numbered with a red number 3 and 4 are the Texture Offset amount in the X and Y axis respectively. This effect is very useful to scroll a particle texture in a very controlled way, for example for a sword slash. Remember to use the Texture Offset mult properties to choose how much each shape gets affected by these values.
Finally, row 5 corresponds to the Shape Weight Offset. This value will be added to the Shape Weights that you can find in the Shape Result part of the Material Inspector (it will only appear when 2 or more Shapes are present):
Use the Shape Weight Offset properties to choose how much each Shape will get affected by the values on row 5.