You are not allowed to perform this action
reference_guide:math_expression_language:functions_variables:input_functions:input_lights_mel

Lights Input Functions

The “Light” input of the ExpressionME-L Node, when used with the Light condition helper Node, allows for the evaluation of lights and illumination based on positions in 3D space. This can be useful for using lights to steer or control effects by  determining the intensity of illumination at specific points.

Global Variables

Variable Description
lights_in_countThe number of lights in the list.
lights_in_id returns the index of the input you created (starting with 0 excluding Time and On). 

 

lights_in_illum

Used to evaluate lights in a scene, this function does not support shadows (only a renderer can do that), but does support projection maps.

Calls:

lights_in_illum(in_light_id, in_position[3], out_color)\\
lights_in_illum(in_light_id, in_position[3], out_color, in_normal[3])\\
lights_in_illum(in_light_id, in_position[3], out_color, in_normal[3], in_side)

Parameters:

Parameter Description
in_light_idThe id of the light to evaluate, or a value less than 0 to evaluate all lights.
in_positionA world space position to illuminate.
out_color The color from the light.
in_normal The surface normal.
in_side Which normal side to use. A value greater than 0 for the front side, 0 for both front and back, and less than 0 for only the backside.

Return:

Return valueDescription
0 Fail.
< 0 Backside.
> 0 Frontside.

lights_in_illum_result

This function is only valid when a previous lights_in_illum call has been succcessful. This function returns specific information regrading illumination data of the lights.

Calls:

lights_in_illum_result(in_illum_data, out_scalar) \\
lights_in_illum_result(in_illum_data, out_vector) 

Parameters:

Parameter Description
in_illum_dataSelects the data to retrive from the illumination result
out_scalar stores the scalar data form the illumination result
out_vector Stores the information form the illumination result 

Light Illum Data:

Parameter Description
lights_illum_pos Returns the position of the illuminated point (world position)
lights_illum_norm Returns the normal of the illuminated point (world normal)
lights_illum_dir    Returns the direction towards the light as seen from the illuminated point (world normal)
lights_illum_dot    Returns the dot product of the normal and the direction (the angle between normal and light)
lights_illum_col Returns the color of the illuminated point 

Return:

Return valueDescription
0 Fail.
1 Succeed 

lights_in_info

Used to gather information about lights connected to the ME-LExpression Node through a light condition Node.

Calls:

lights_in_info(in_light_id, in_lights_info, out_vector)\\
lights_in_info(in_light_id, in_lights_info, out_scalar)

Parameters:

Parameter Description
in_light_id The id of the light to evaluate, or a value less than 0 to evaluate all lights.
in_lights_infoDefines which information to request from the light
out_vector Stores the infromation (color,position…)
out_scalar Used to store scalar value (mono values or intensity)

Light Info:

Parameter Description
lights_info_posGets the world positon of the light (vector)
lights_info_dirGet the light's direction (vector)
lights_info_colGets the color of the light color (vector for color or scalar for intensity …)

Return:

Return valueDescription
0 Fail.
1 Succeed 

 

©2024, cebas Visual Technology Inc.

reference_guide/math_expression_language/functions_variables/input_functions/input_lights_mel.txt · Last modified: 2024/01/24 18:34 by 127.0.0.1

Donate Powered by PHP Valid HTML5 Valid CSS Driven by DokuWiki