Skip to main content

Tint by Boundary

Overview

Tint by Object allows you to control the tint of a Forest Colour map based on the item's distance from an include spline's boundary. To use it:

  1. Make sure the source objects have a material that uses a Forest Colour map.

  2. The Forest Colour map must have override turned Off in order to be controlled by an expression.

  3. In the Materials rollout the Random Strength value is still applicable - for the tint to work fully set the start and end to 100%. Use different values if you'd like to retain some randomisation.

  4. Forest colour can be used as a sub-map. For example, the example code below is blending between black and white based on distance and the Forest colour map is then being used in the Mix Amount slot of a Mix map.

  5. Use the tintFalloff parameter to set the size of the falloff effect.

Effect Script

vector v = fpItem.areaIncNearest - fpItem.Position;
real tintStrength = easein(fpItem.areaIncDistance,DistanceToEdge,0,0,1);
fpItem.tintColor = [tintStrength, tintStrength, tintStrength];

You can find this Effect within the Forest Effects Library.

This Effect Uses

Parameters

  • distanceToEdge

    Type: Scene Units

Attributes

  • fpItem.position

    Minimum Z rotation as set in the Transform rollout.

  • fpItem.areaIncNearest

    Position of the nearest point of include areas (splines only).

  • fpItem.tintColor

    Maximum Z rotation as set in the Transform rollout.

Functions

  • easeIn(x,x1,x2,y1,y2)

    Returns an ease-in interpolation between y1 and y2. Returns y1 when x < x1.

  • length(v)

    The length of v.