You can color spline primitives along their length by setting root and tip colors using custom shader parameters. Root and tip colors appear in the rendered Description, but not in the XGen preview.
- Click the
Preview/Output tab, and in the
Custom Shader Parameters section, do the following:
- In the space beside Name, type tip_color.
- From the drop-down list beside
Name, select
color.
- Click
to create the parameter.
The
tip_color parameter appears in the
Custom Shader Parameters.
- Repeat step
1 to create a parameter named
root_color.
Use an expression to add color for the tip and root color.
- Click this icon
beside the parameters to open the
XGen Expression Editor.
- In the
XGen Expression Editor, click the
Samples tab.
- Click the
+
beside
Global and then
+
beside
UI.
- From the expression list that appears, click a color-related expression such as
color_green.
- Click
Accept.
The
tip_color parameter is now set to green.
- Click the color swatch to set a new color.
- Repeat steps 4 to 8 for
root_color.
- Launch a renderer to render your Description.