render
Creates a new image-based lighting pass and makes it the current
pass. You can use an image saved to disk by specifying the filename
in the Filename parameter, or use an image clip already created
(see CreateImageClip) by
specifying the name of the image clip in the ImageClip parameter.
If you pass empty parameters, a browser prompts the user to select
either an image clip or an image file.
To speed up the process of lighting your scene with an image, you
can use the Image Based Lighting render pass preset. Creating a new
render pass using this preset automatically applies the Environment
shader to the pass and enables final gathering in the render
options. You can modify the pass to alter the image-based lighting
effect or limit the number of objects that it affects.
Note: This command uses output arguments. Some scripting languages
don't support arguments passed by reference (such as JScript and
Python). For more information on how to handle getting output
arguments through a return-value array, see Output Arguments, Return Values and
Output Value Arrays.
CreateImageBasedLightingPass( [Filename], Clip ); |
Parameter | Type | Description |
---|---|---|
Filename | String | Image filename to use for image-based lighting.
Default Value: "" |
Clip | String | Image clip to use for image-based lighting.
Default Value: If no value is specified, a browser asks the user whether they want to use an existing image clip or create one from an image file. |
' ' This example demonstrates how to create one pass from an image ' clip and another one from an image file saved on disk. ' ' First create the image clip to use in the lighting pass NewScene , false Set oClip = CreateImageClip( InstallationPath( siFactoryPath ) _ & "\Data\XSI_SAMPLES\Pictures\cloud.19.pic", "Jeremy" ) ' Then create the pass using that clip in the ImageClip parameter CreateImageBasedLightingPass , oClip ' Print out the new list of passes getPassInfo Application.LogMessage "------------------------------------------" ' ***************** ' Now create another image-based pass by specifying an image ' filename for the Filename parameter (here we are using a string ' variable to store the name, but you can also use the name itself) sImageFile = InstallationPath( siFactoryPath ) _ & "\Data\XSI_SAMPLES\Pictures\Aniso2.tga" CreateImageBasedLightingPass sImageFile ' Print out the new list of passes getPassInfo function getPassInfo() ' Loop through the passes and print their names SelectObj "Passes.*" Set oPasses = Selection For Each p In oPasses Application.LogMessage p.Name Next end function ' Output of the above script: 'INFO : "List" 'INFO : "Default_Pass" 'INFO : "HDRI" 'INFO : "------------------------------------------" 'INFO : "List" 'INFO : "Default_Pass" 'INFO : "HDRI" 'INFO : "HDRI1" |