Tint by Object
Overview
Tint by Object allows you to control the tint of a Forest Colour map based on the item's distance from an object. To use it:
- 
Make sure the source objects have a material that uses a Forest Colour map. 
- 
The Forest Colour map must have override turned Off in order to be controlled by an expression. 
- 
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. 
- 
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.   
Effect Script
vector v = Lookat.Position - fpItem.Position;
real tintStrength = easein(length(v),tintFalloff,0,0,1);
fpItem.tintColor = [tintStrength,tintStrength,tintStrength];
You can find this Effect within the Forest Effects Library.
This Effect Uses
Parameters
- 
lookAt Type: Object 
- 
tintFalloff Type: Scene Units 
Attributes
- 
fpItem.position Minimum Z rotation as set in the Transform rollout. 
- 
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.