Allows an object to change colour based upon value applied to a colour gradient.
This behaviour allows direct creation of the colour gradient in the details panel, which allows you to quickly make simple gradients with equal intervals between the colour stops.
The DS BC Curve Colour Gradient behaviour allows the use of an Unreal Colour Curve asset instead, edited through the UE native colour curve editor. The curve allows more complex non-linear gradients and the curve asset can be reused for other object gradients.
Step-by-Step: Colour Gradient Setup
- Pre-requisite: You have added the component and set up the common behaviour parameters
- Click the DS BC Colour Gradient component
- In the Data-Driven Behaviours section find Gradient Colours and click the + to the right of it at least twice. Each click will add a colour stop, and you need a minimum of two. The first two will be at 0 and 100% of the incoming value. If you add 3, the middle one will be at 50%. If you add 4, the middle two will be at 33 and 66% respectively etc.
- Click the colour swatch panel next to each of the entries (labelled 0, 1 etc) to open the Unreal Editor colour picker.
- Select each colour here. Ensure you set the alpha value (A) to the desired level – it is set to 0 by default and therefore the default colours will not be visible!
You can use the default material or you can duplicate or instance it. The default material is a translucent material to support opacity of less than 1 but this can be changed. It’s advisable to duplicate the material rather than edit it directly to avoid unintentionally affecting other components that might be using the same material elsewhere in the project.
Post your comment on this topic.