Article directory
1. Achieve goals
Based on the SphereMask material node, the color highlight effect of the character within a certain range on the ground is realized.
2. Implementation process
The realization principle is to pass through first,
SphereMask材质节点
and then calculate and output the Mask value, where the input 1 is input within the radius of the sphere, and the output is 0 outside. Then update the input parameters of the material node according to the real-time position of the character.
2.1 SphereMask
The input parameters of the nodes are: ①A: the position of the check point, the Absolute World Postion node is commonly used; ②B: the center point of the sphere; ③Radius: the attenuation radius; ④Hadrness: the edge hardness, which refers to the size of the transition area.