illuminance & illuminate

These constructs will tend to disapear with RSL 2.0. The Cl and L variables can now be accessed by querying the light() method of the light shaders. Nonetheless, I think it is important to be familiar with illuminance and illuminate.

Exercise I a surface and a light. The surface must take the color of the light (regardless of the angle, distance, etc.)
using: illuminance() and liiuminate()
Tips:

 

img

Exercise II

a simple directional light that emits shadows, raytraced or map-based
using: solar(), shadow() and transmission()
Tips:

-We find in old documentation a "from" and a "to" point variable as parameters of the lights. I consider this as an old way of doing it. I rather declare the from and the light direction in the body. It is much easier to use a 3d package to change the light direction.

img

Exercise III

a spotlight, which light color changes hue as angle moves away from the light directions, and desaturates with distance
using: dot product, ctransform() and illuminate
Tips:

 

img

Exercise IV

a surface that counts the number of lights in different categories. Say it goes 10% with additional light of a given category. Categories are "reg", "green" and "blue".
using: categories in illuminance() and lights
Tips:

 

img

Exercise V

a basic spotlight with cone angle and penumbra angle (in degrees)
using: illuminate(), radians()
Tips:

 

img

Exercise VI

create your own diffuse function in a surface shader
using: illuminance()
Tips:

 

img

 

 

 

 

- home - curriculum - competences - gallery -MEL scripts - shaders - contact - links -