Radiosity : RadiosityEffect

Radiosity - superclass: RadiosityEffect; super-superclass:MAXWrapper - classID: #(2036089192, 1721374773) 
 

   

Lighting And Rendering - Quick Navigation

This RadiosityEffect was first implemented in Autodesk VIZ 4 and is available in 3ds Max 5 and higher.

3ds Max Constructors

Radiosity... 	 
Discreet_Radiosity ... 

Autodesk VIZ Constructors

Discreet_Radiosity ... VIZ_Radiosity... 
NOTE:The constructor Discreet_Radiosity must be used in scripts to ensure compatibility.

   

Properties

<Radiosity>.lightUnitsUsed Integer default: 0 -- integer; Light_Units_in_Use 

Gets/Sets the Light Units used by the Radiosity.

Possible values are:

0 - International

1 - American

NOTE:

Changing the Light Units in the Customize > Units Setup dialog affects the currently assigned RadiosityEffect. Setting the value using MAXScript changes the units used by the currently assigned RadiosityEffect, but will not affect the Customize Units Setup dialog.

   

<Radiosity>.radProcessInRenderOnly Boolean default: false -- boolean; Process_in_Radiosity_Only 

Gets/Sets the state of the "Start" button in the "Radiosity Processing Parameters" dialog. When the value is set to true , the button will be disabled and the radiosity processing can be initiated by the renderer only. When set to false , the user can initiate the processing manually by pressing the button.

Radiosity Processing Parameters Rollout

   

<Radiosity>.radInitialQuality Float default: 85.0 -- float; Initial_Quality 

Gets/Sets the Initial Quality value in percent.

   

<Radiosity>.radGlobalRefineSteps Integer default: 0 -- integer; Refine_Iterations_Done 

Gets/Sets the Refine Iterations (All Objects) value.

   

<Radiosity>.radSelectionRefineSteps Integer default: 0 -- integer; Selection_Refine_Steps 

Gets/Sets the "Refine Iterations (Selected Objects)" value.

   

<Radiosity>.radProcessObjectRefineSteps Boolean default: true -- boolean; processObjectRefineSteps 

Gets/Sets the state of the "Process Refine Iterations Stored in Object" checkbox. When set to true , the Refine Iterations set in the Object Properties > Radiosity Tab > Refine Iterations. When false, these object-specific settings will be ignored.

   

<Radiosity>.radFiltering Integer default: 0 -- integer; Filtering 

Gets/Sets the "Indirect Light Filtering" value in the "Interactive Tools" group of controls.

   

<Radiosity>.radDirectFiltering Integer default: 0 -- integer; Filtering 

Gets/Sets the value of the "Direct Light Filtering" spinner in the "Interactive Tools" group of controls. Available in 3ds Max 8 and higher.

   

<Radiosity>.radDisplayInViewport Boolean default: true -- boolean; Display_in_Viewport 

Gets/Sets the "Display Radiosity in Viewport" checkbox state in the "Interactive Tools" group of controls. Enables the interactive display of the radiosity in the viewport.

Radiosity Meshing Parameters Rollout

   

<Radiosity>.meshingEnabled Boolean default: false -- boolean; Enable_Meshing 

Gets/Sets the state of the "Enabled" checkbox in the "Global Subdivision Settings" group of controls. When set to true, enables the user-defined global meshing size, or the adaptive subdivision if .useAdaptiveMeshing is set to true.

   

<Radiosity>.useAdaptiveMeshing BooleanClass default: true -- boolean; Use_Adaptive_Meshing 

Toggle the Use Adaptive Subdivisions checkbox on and off. When set to true and the "Global Subdivision Settings" > "Enabled" checkbox ( . meshingEnabled ) is on, Adaptive Subdivisions will be used. Available in 3ds Max 8 and higher.

   

<Radiosity>.meshingSize Float default: 36.0 -- animatable; world units; Meshing_Size 

Gets/Sets the Maximum Meshing Size value in the "Mesh Settings" group of controls. In versions prior to 3ds Max 8, the value was called "Mesh Size".

   

<Radiosity>.minimumMeshSize Float default: 3.0 -- animatable; worldUnits; Minimum_Mesh_Size 

Gets/Sets the Minimum Mesh Size value in the "Mesh Settings" group of controls. Available in 3ds Max 8 and higher.

   

<Radiosity>.contrastThreshold Float default: 75.0 -- animatable; percent; Contrast_Threshold 

Gets/Sets the Contrast Threshold value in the "Mesh Settings" group of controls. Available in 3ds Max 8 and higher.

   

<Radiosity>.initialMeshSize Float default: 12.0 -- animatable; worldUnits; Initial_Mesh_Size 

Gets/Sets the Initial Meshing Size value in the "Mesh Settings" group of controls. Available in 3ds Max 8 and higher.

   

<Radiosity>.shootDirectLights BooleanClass default: true -- boolean; Shoot_Direct_Lights 

Gets/Sets the state of the "Shoot Direct Lights" checkbox in the "Light Settings" group of controls. Available in 3ds Max 8 and higher.

   

<Radiosity>.includePointLights BooleanClass default: true -- boolean; Include_Point_Lights 

Gets/Sets the state of the "Include Point Lights in Subdivision" checkbox in the "Light Settings" group of controls. Available in 3ds Max 8 and higher.

   

<Radiosity>.includeLinearLights BooleanClass default: true -- boolean; Include_Linear_Lights 

Gets/Sets the state of the "Include Linear Lights in Subdivision" checkbox in the "Light Settings" group of controls. Available in 3ds Max 8 and higher.

   

<Radiosity>.includeAreaLights BooleanClass default: true -- boolean; Include_Area_Lights 

Gets/Sets the state of the "Include Area Lights in Subdivision" checkbox in the "Light Settings" group of controls. Available in 3ds Max 8 and higher.

   

<Radiosity>.includeSkylight BooleanClass default: false -- boolean; Include_Skylight 

Gets/Sets the state of the "Include Skylight" checkbox in the "Light Settings" group of controls. Available in 3ds Max 8 and higher.

   

<Radiosity>.includeSelfEmittingLights BooleanClass default: false -- boolean; Include_Self_Emitting_Faces 

Gets/Sets the state of the "Include Self-Emitting Faces in Subdivision" checkbox in the "Light Settings" group of controls. Available in 3ds Max 8 and higher.

   

<Radiosity>.minimumSelfEmittingSize Float default: 6.0 -- animatable; worldUnits; Minimum_Self_Emitting_Size 

Gets/Sets the value of the "Minimum Self-Emitting Size" spinner in the "Light Settings" group of controls. Available in 3ds Max 8 and higher.

Light Painting Rollout

   

<Radiosity>.lightPaintingIntensity Float default: 500.0 -- float; Light_Painting_Intensity 

Gets/Sets the Light Painting Intensity value in lux.

   

<Radiosity>.lightPaintingPressure Float default: 10.0 -- float; Light_Painting_Pressure 

Gets/Sets the Light Painting Pressure value in percent.

Rendering Parameters Rollout

   

<Radiosity>.rmReuseDirectIllumination Boolean default: false -- boolean; Re_Use_Direct_Illumination 

Gets/Sets the state of the "Re-Use Direct Illumination from Radiosity Solution/Render Direct Illumination" radio buttons. When set to true , the Direct Illumination from the Radiosity Solution will be reused. When false , the Direct Illumination will be rendered.

   

<Radiosity>.rmRegather Boolean default: false -- boolean; Regather 

Gets/Sets the state of the "Regather Indirect Illumination" checkbox. When set to true , Indirect Illumination will be regathered.

   

<Radiosity>.rmRaysPerSample Integer default: 64 -- integer; Rays_per_Sample 

Gets/Sets the Rays per Sample value.

   

<Radiosity>.rmFilterRadius Float default: 2.5 -- float; Filter_Radius 

Gets/Sets the Filter Radius value in pixels.

   

<Radiosity>.rmClampEnabled Boolean default: false -- boolean; Clamp_Enabled 

Gets/Sets the state if the Clamp Values checkbox.

   

<Radiosity>.rmClampValue Float default: 10000.0 -- float; Clamp_Value 

Gets/Sets the value of the Clamp Values (cd/m^2) parameter. When rmClampEnabled is set to true, values above rmClampValue will be clamped.

   

<Radiosity>.rmAdaptiveEnabled Boolean default: false -- boolean; Adaptive_Enabled 

Gets/Sets the state of the Adaptive Sampling checkbox.

   

<Radiosity>.rmSampleSpacing Integer default: 3 -- integer; Sample_Spacing 

Gets/Sets the Sample Spacing value.

Possible values are:

0 - 2x2

1 - 4x4

2 - 8x8

3 - 16x16

4 - 32x32

   

<Radiosity>.rmSubdivisionContrast Float default: 5.0 -- float; Subdivision_Contrast 

Gets/Sets the Subdivision Contrast value.

   

<Radiosity>.rmMinSampleSpacing Integer default: 1 -- integer; Minimum_Sample_Spacing 

Gets/Sets the Min. Sample Spacing.

Possible values are:

0 - 1x1

1 - 2x2

3 - 8x8

4 - 16x16

5 - 32x32

6- 64x64

   

<Radiosity>.rmShowSamples Boolean default: false -- boolean; Show_Samples 

Gets/Sets the state of the Show Samples checkbox.

Statistics Rollout

   

<Radiosity>.statSolutionQuality Float default: 0.0 -- float; Solution_Quality 

Contains the Solution Quality value from the Statistics rollout. Read-only.

   

<Radiosity>.statRefineIterations Integer default: 0 -- integer; Refine_Iterations_Done 

Contains the Refine Iterations value from the Statistics rollout. Read-only.

   

<Radiosity>.elapsedTime Integer default: 0 -- integer; Elapsed_Time 

The time in seconds used to process the radiosity solution. Read-only.

   

<Radiosity>.statNumGeomObjects Integer default: 0 -- integer; Number_of_Geometric_Objects 

Contains the Geometric Objects value from the Statistics rollout. Read-only.

   

<Radiosity>.statMeshSize Float default: 36.0 -- float; Meshing_Size 

Contains the Meshing Size value from the Statistics rollout. Read-only.

   

<Radiosity>.statNumLightObjects Integer default: 0 -- integer; Number_of_Light_Objects 

Contains the Light Objects value from the Statistics rollout. Read-only.

   

<Radiosity>.statNumFaces Integer default: 0 -- integer; Radiosity_scene_faces 

Contains the Mesh Elements value from the Statistics rollout. Read-only.

Radiosity interfaces:

   

Interface:srrOps 

Methods:

   

<void>Start () 

Start Radiosity calculation.

   

<void>Stop () 

Start Radiosity calculation.

   

<void>Reset <boolean>resetGeometry <boolean>noWarningDialog 

Reset the Radiosity solution. The resetGeometry parameter controls whether the geometry must be reset too. The noWarningDialog controls whether the reset warning dialog must be displayed.

   

<void>GatherObjects <&node array>Nodes <integer>GatherSteps 

   

Nodes is In parameter GatherSteps Validated by Range: 0 to 1000000 

   

<boolean>ShowLightingStatistics () 

Displays the Lighting Analysis dialog. Returns true if successful, false if there is no Radiosity Solution in the scene.

   

<void>AbortLightingStatistics () 

Close the Lighting Analysis dialog if open.

   

<boolean>CanShowLightingStatistics () 

Returns true if the Lighting Analysis dialog can be displayed, false if not.

   

<bool>GetPointIlluminance <&float>result <node>node <&point3>point <&point3>vertex0 <&point3>vertex1 <&point3>vertex2 

   

result is Out parameter point is In parameter vertex0 is In parameter vertex1 is In parameter vertex2 is In parameter 

Returns true if the Illuminance value at the specified point can be retrieved. The result is passed by reference into the result Out parameter, the vertex0 , vertex1 , and vertex2 are passed by reference the vertex indices of the face the point resides on.

EXAMPLE

sceneRadiosity.radiosity = Radiosity()
obj = plane()
convertToMesh obj
for i in 1 to obj.numFaces do
(
myFace = getFace obj i
myverts = # ()
myverts[1] = getVert obj myFace.x
myverts[2] = getVert obj myFace.y
myverts[3] = getVert obj myFace.z
midPoint = (myverts[1] + myverts[2] + myverts[3])/3
PointVal = 0.0
sceneRadiosity.Radiosity.GetPointIlluminance &pointVal obj midPoint myverts[1] myverts[2] myverts[3]
format "Face %: %\n" i pointVal
)

   

<bool>GetPointLuminance <&float>result <node>node <&point3>point <&point3>vertex0 <&point3>vertex1 <&point3>vertex2 

   

result is Out parameter point is In parameter vertex0 is In parameter vertex1 is In parameter vertex2 is In parameter 

Returns true if the Luminance value at the specified point can be retrieved. The result is passed by reference into the result Out parameter, the vertex0 , vertex1 , and vertex2 are passed by reference the vertex indices of the face the point resides on.

   

<bool>GetPointReflectance <&float>result <node>node <&point3>point <&point3>vertex0 <&point3>vertex1 <&point3>vertex2 

   

result is Out parameter point is In parameter vertex0 is In parameter vertex1 is In parameter vertex2 is In parameter 

Returns true if the Reflectance value at the specified point can be retrieved. The result is passed by reference into the result Out parameter, the vertex0 , vertex1 , and vertex2 are passed by reference the vertex indices of the face the point resides on.

   

<bool>GetPointTransmittance <&float>result <node>node <&point3>point <&point3>vertex0 <&point3>vertex1 <&point3>vertex2 

   

result is Out parameter point is In parameter vertex0 is In parameter vertex1 is In parameter vertex2 is In parameter 

Returns true if the Transmittance value at the specified point can be retrieved. The result is passed by reference into the result Out parameter, the vertex0 , vertex1 , and vertex2 are passed by reference the vertex indices of the face the point resides on.

EXAMPLE

--Show the scene radiosity ReferenceTarget object:
sceneRadiosity.radiosity
--> ReferenceTarget:Radiosity
--Reset the Scene Radiosity solution completely, allow warning:
sceneRadiosity.radiosity.Reset true false
--> OK
--Start new Radiosity Processing:
sceneRadiosity.radiosity.Start ()
--> OK
--Stop the Radiosity Processing:
sceneRadiosity.radiosity.Stop ()
--> OK
--Check whether the Lighting Analysis dialog can be displayed
sceneradiosity.radiosity.CanShowLightingStatistics ()
--> true
--Display the Lighting Analysis dialog
sceneradiosity.radiosity.ShowLightingStatistics ()
--> true
--Close the Lighting Analysis dialog
sceneradiosity.radiosity.AbortLightingStatistics ()
--> OK

The following interface provides MAXScript access to the radiosity mesh in 3ds Max 6 and higher:

   

Interface: srrRadiosityMesh 

Methods:

   

<boolean>doesSolutionExist () 

Returns true if a radiosity solution exists.

   

<boolean>doesMeshExist <node>node 

Returns true if the specified node has a radiosity mesh.

   

<boolean>isMeshValid <node>node 

Returns true if the specified node has a valid radiosity mesh.

   

<interval by value>getMeshValidity <node>node 

Returns the validity interval of the specified node's radiosity mesh.

   

<mesh by value>getMesh <node>node 

Returns the node's radiosity mesh.

   

<interval by value>getMeshTMValidity <node>node 

Returns the validity interval of the radiosity mesh's transformation matrix.

   

<matrix3 by value>getMeshTM <node>node 

Returns the transformation matrix of the radiosity mesh of the specified node.

See Also