Like the DS BC Material Scalar except it allows four separate values to be used from one behaviour, mapped to the RGBA channels of a vector node. To use this behaviour properly you need to leverage the Unreal materials system – see the Advanced section below and also consult the Unreal Engine documentation on Materials if you are not familiar with the Material system.

Example Usage: You want to make an object glow when its power consumption increases, and to turn from semi-transparent to opaque red when it becomes hot

Step-by-Step: Material Vector Setup – Basic

  1. Add the DS Material Vector component to an object (see setting up common behaviour parameters)
  2. In the Data Sources section select the Source Name.
  3. For each of the 4 dropdowns, select the desired Data Value name (XYZW map to RGBA in the material’s vector parameter node).
  1. In the Data-driven Behaviour section, set the Affected component dropdown to the component where you want the material to appear.
  2. In the Material slot, select M_DS_Vector.
  1. Double-click the M_DS_Vector thumbnail to open the material editor.
  1. The RGBA sockets on the DS_Colour node correspond to the data values set as XYZW in the Data Sources section. The target object component will now alter properties based on the values set in the XYZW dropdowns.

Step-by-Step: Material Vector Setup – Advanced

  1. To create your own data-driven material, open or duplicate the existing M_ DS_Vector material, open up an existing material or create a new one.
  2. If you have duplicated the existing DS material, there will be a Parameter node in the material called DS_Colour.
  3. If you have created a new material, right-click in an empty area of the material canvas and type into the search box ‘vector parameter’ then select the suggested node.
  4. The parameter can be named by clicking on the Parameter node you created and naming it in the Node Details panel. This name must match the name in the Behaviour Component’s Material Parameter Name field.
  1. The RGBA sockets on the DS_Colour node correspond to the data values set as XYZW in the Data Sources section. You can use these in the same way as any material parameter i.e. plug them into other nodes as input values to affect the material property controlled by that node.This can be used as the basis for an advanced data-driven material (See below)
  2. Ensure that the data range fed in from the behaviour will match the expected input range of the node. Use Data Transforms in the behaviour’s Data Transform section to alter the range if required.
Revision: 2
Last modified: 21 May 2021


Was this helpful?

Yes No
You indicated this topic was not helpful to you ...
Could you please leave a comment telling us why? Thank you!
Thanks for your feedback.

Post your comment on this topic.

Post Comment