Radiosity - superclass: RadiosityEffect; super-superclass:MAXWrapper - classID: #(2036089192, 1721374773)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...Discreet_Radiosity must be used in scripts to ensure compatibility.Properties
<Radiosity>.lightUnitsUsed Integer default: 0 -- integer; Light_Units_in_UseGets/Sets the Light Units used by the Radiosity.
Possible values are:
0 - International
1 - American
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_OnlyGets/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>.radInitialQuality Float default: 85.0 -- float; Initial_QualityGets/Sets the Initial Quality value in percent.
<Radiosity>.radGlobalRefineSteps Integer default: 0 -- integer; Refine_Iterations_DoneGets/Sets the Refine Iterations (All Objects) value.
<Radiosity>.radSelectionRefineSteps Integer default: 0 -- integer; Selection_Refine_StepsGets/Sets the "Refine Iterations (Selected Objects)" value.
<Radiosity>.radProcessObjectRefineSteps Boolean default: true -- boolean; processObjectRefineStepsGets/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; FilteringGets/Sets the "Indirect Light Filtering" value in the "Interactive Tools" group of controls.
<Radiosity>.radDirectFiltering Integer default: 0 -- integer; FilteringGets/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_ViewportGets/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>.meshingEnabled Boolean default: false -- boolean; Enable_MeshingGets/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_MeshingToggle 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_SizeGets/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_SizeGets/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_ThresholdGets/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_SizeGets/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_LightsGets/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_LightsGets/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_LightsGets/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_LightsGets/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_SkylightGets/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_FacesGets/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_SizeGets/Sets the value of the "Minimum Self-Emitting Size" spinner in the "Light Settings" group of controls. Available in 3ds Max 8 and higher.
<Radiosity>.lightPaintingIntensity Float default: 500.0 -- float; Light_Painting_IntensityGets/Sets the Light Painting Intensity value in lux.
<Radiosity>.lightPaintingPressure Float default: 10.0 -- float; Light_Painting_PressureGets/Sets the Light Painting Pressure value in percent.
<Radiosity>.rmReuseDirectIllumination Boolean default: false -- boolean; Re_Use_Direct_IlluminationGets/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; RegatherGets/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_SampleGets/Sets the Rays per Sample value.
<Radiosity>.rmFilterRadius Float default: 2.5 -- float; Filter_RadiusGets/Sets the Filter Radius value in pixels.
<Radiosity>.rmClampEnabled Boolean default: false -- boolean; Clamp_EnabledGets/Sets the state if the Clamp Values checkbox.
<Radiosity>.rmClampValue Float default: 10000.0 -- float; Clamp_ValueGets/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_EnabledGets/Sets the state of the Adaptive Sampling checkbox.
<Radiosity>.rmSampleSpacing Integer default: 3 -- integer; Sample_SpacingGets/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_ContrastGets/Sets the Subdivision Contrast value.
<Radiosity>.rmMinSampleSpacing Integer default: 1 -- integer; Minimum_Sample_SpacingGets/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_SamplesGets/Sets the state of the Show Samples checkbox.
<Radiosity>.statSolutionQuality Float default: 0.0 -- float; Solution_QualityContains the Solution Quality value from the Statistics rollout. Read-only.
<Radiosity>.statRefineIterations Integer default: 0 -- integer; Refine_Iterations_DoneContains the Refine Iterations value from the Statistics rollout. Read-only.
<Radiosity>.elapsedTime Integer default: 0 -- integer; Elapsed_TimeThe time in seconds used to process the radiosity solution. Read-only.
<Radiosity>.statNumGeomObjects Integer default: 0 -- integer; Number_of_Geometric_ObjectsContains the Geometric Objects value from the Statistics rollout. Read-only.
<Radiosity>.statMeshSize Float default: 36.0 -- float; Meshing_SizeContains the Meshing Size value from the Statistics rollout. Read-only.
<Radiosity>.statNumLightObjects Integer default: 0 -- integer; Number_of_Light_ObjectsContains the Light Objects value from the Statistics rollout. Read-only.
<Radiosity>.statNumFaces Integer default: 0 -- integer; Radiosity_scene_facesContains the Mesh Elements value from the Statistics rollout. Read-only.
Interface:srrOpsMethods
<void>Start ()Start Radiosity calculation.
<void>Stop ()Start Radiosity calculation.
<void>Reset <boolean>resetGeometry <boolean>noWarningDialogReset 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
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.
<boolean>GetPointIlluminance <&float>result <node>node <point3>point <point3>vertex0 <point3>vertex1 <point3>vertex2
result is Out parameterReturns 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 )
<boolean>GetPointLuminance <&float>result <node>node <point3>point <point3>vertex0 <point3>vertex1 <point3>vertex2
result is Out parameterReturns 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.
<boolean>GetPointReflectance <&float>result <node>node <point3>point <point3>vertex0 <point3>vertex1 <point3>vertex2
result is Out parameterReturns 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.
<boolean>GetPointTransmittance <&float>result <node>node <point3>point <point3>vertex0 <point3>vertex1 <point3>vertex2
result is Out parameterReturns 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: srrRadiosityMeshMethods
<boolean>doesSolutionExist ()Returns true if a radiosity solution exists.
<boolean>doesMeshExist <node>nodeReturns true if the specified node has a radiosity mesh.
<boolean>isMeshValid <node>nodeReturns true if the specified node has a valid radiosity mesh.
<interval by value>getMeshValidity <node>nodeReturns the validity interval of the specified node's radiosity mesh.
<mesh by value>getMesh <node>nodeReturns the node's radiosity mesh.
<interval by value>getMeshTMValidity <node>nodeReturns the validity interval of the radiosity mesh's transformation matrix.
<matrix3 by value>getMeshTM <node>nodeReturns the transformation matrix of the radiosity mesh of the specified node.