GAMGI Formats: Light Create

# Light Create

- Type
- Color
- Attenuation

### direction_x, direction_y, direction_z

Required for directional and spot lights, indicate the direction vector pointing from the light source to the light target. The length of the vector is unimportant, as it does not carry further information. If both direction and position parameters are missing when creating a light, an error is shown.

    Example: <light ... direction_x="0.0" direction_y="0.0" direction_z="-1.0"/> (default)
    (Defined in GAMGI_MESA_LIGHT_DIRECTION_X, GAMGI_MESA_LIGHT_DIRECTION_Y
    and GAMGI_MESA_LIGHT_DIRECTION_Z)
    Allowed values: real (required, coupled)

### position_x, position_y, position_z

Required for positional and spot lights, indicate the position coordinates from where the light is emitting. If both direction and position parameters are missing when creating a light, an error is shown.

    Example: <light ... position_x="0.0" position_y="0.0" position_z="10.0"/> (default)
    (Defined in GAMGI_MESA_LIGHT_POSITION_X, GAMGI_MESA_LIGHT_POSITION_Y
    and GAMGI_MESA_LIGHT_POSITION_Z)
    Allowed values: real (required, coupled)

### angle

Required for spot lights, indicates the angle from the spot direction to the outer surface of the conic beam.

    Example: <light ... angle="90.0"/> (default)
    (Defined in GAMGI_MESA_LIGHT_ANGLE)
    Allowed values: 0.0 < real <= 90.0 (optional)

Home