Skip to content
David Cardinal edited this page Jan 29, 2022 · 9 revisions

Controlling the scene lighting

Light sources are essential in the scene. As of January 2022, they are treated as assets, which allows more flexibility. However, it does require some changes, so some previous code and documentation needs to change -- which is in process:

If you already have a recipe, you may need a few simple utilities

thisR.get('light print')              % List the lights
thisR.set('lights','all','delete');   % Clear all the lights
thisR.get('light',idx);               % Return the light structure of a particular index
thisR.get('light',lightName);         % If you know the name
piLightCreate('help');                % Lists all the valid types of lights
piLightCreate('list env lights');     % Lists the EXR files we have for environmental lights

Create

Environment (skymaps)

Environmental lights (meaning they surround the whole scene and are far away) are an important class. You can create them by setting your own parameters or using the @Recipe.set('skymap') functionality, as demonstrated in:

t_skymapDaylight.m

Spot lights

Add a light to a recipe

Modify light properties

Clone this wiki locally