IMRPhysicalSkyInterface Class Reference

IMRPhysicalSkyInterface Class Referenceabstract

#include <imrPhysicalSkyLight.h>

Class Description

Access interface for the Mental Ray Physical Sky object.

This class represents the Mental Ray Physical Sky object implemented by 3ds Max. Given a pointer to a skylight object, one can get this interfaces as follows:

Object* skylight = // obtain a pointer to an object
IMRPhysicalSkyInterface* physSkyInterface = dynamic_cast<IMRPhysicalSkyInterface*>(skyInterface);
+ Inheritance diagram for IMRPhysicalSkyInterface:

Public Types

enum  SkyModel { eHaze = 0, ePerez, eCIE }
 
enum  CIEModel { eOvercastSky = 0, eClearSky }
 
- Public Types inherited from BaseInterface
enum  LifetimeType { noRelease, immediateRelease, wantsRelease, serverControlled }
 

Public Member Functions

virtual Interface_ID GetID ()
 Returns the Interface ID of this interface. More...
 
virtual ~IMRPhysicalSkyInterface ()
 A virtual destructor for the interface. More...
 
virtual void getPerezABCDE (float &A, float &B, float &C, float &D, float &E, TimeValue t, Interval &valid) const =0
 Get the current calculate Perez Params based upon the current illuminance (or possibly irradiance if coming from a weather file). More...
 
Multiplier

The multiplier for the value of the sky's brightness

virtual float getMultiplier (TimeValue &t, Interval &valid) const =0
 Gets the value of the multiplier for the sky's brightness. More...
 
virtual bool setMultiplier (TimeValue t, float multiplier)=0
 Sets the value of the multiplier for the sky's brightness. More...
 
Haze

The amount of particulate matter in the air.

Possible values range from 0.0 (a completely clear day) to 15.0 (extremely overcast, or a sandstorm in the Sahara). Default=0.0.

virtual float getHaze (TimeValue &t, Interval &valid) const =0
 Gets the haze value of the sky. More...
 
virtual bool setHaze (TimeValue t, float haze)=0
 Sets the haze value of the sky. More...
 
Red/Blue Shift

Provides artistic control over the redness of the sky light.

The default value of 0.0 is the physically correct value (calculated for a 6500K whitepoint), but can be changed with this parameter, which ranges from -1.0 (extremely blue) to 1.0 (extremely red).

virtual float getRedBlueShift (TimeValue &t, Interval &valid) const =0
 Gets the red/blue tint value of the sky. More...
 
virtual bool setRedBlueShift (TimeValue t, float redBlueShift)=0
 Sets the red/blue tint value of the sky. More...
 
Saturation

Provides artistic control over saturation of the sky light.

The default value of 1.0 is the physically calculated saturation level. Possible values range from 0.0 (black and white) to 2.0 (extremely high saturation).

virtual float getSaturation (TimeValue &t, Interval &valid) const =0
 Gets the saturation value of the sky. More...
 
virtual bool setSaturation (TimeValue t, float saturation)=0
 Sets the saturation value of the sky. More...
 
Ground Color

The color of the virtual ground plane.

Note that this is a diffuse reflectance value (that is, albedo). The ground appears as a Lambertian reflector with this diffuse color, lit by the sun and sky only, and does not receive any shadows.

virtual AColor getGroundColor (TimeValue &t, Interval &valid) const =0
 Gets the ground color. More...
 
virtual bool setGroundColor (TimeValue t, AColor groundColor)=0
 Sets the ground color. More...
 
Night Color

The minimum color of the sky: The sky will never become darker than this value.

It can be useful for adding things like moon, stars, high-altitude cirrus clouds that remain lit long after sunset, etc. As the sun sets and the sky darkens, the contribution from Night Color is unaffected and remains as the base light level.

virtual AColor getNightColor (TimeValue &t, Interval &valid) const =0
 Gets the night color of the sky. More...
 
virtual bool setNightColor (TimeValue t, AColor nightColor)=0
 Sets the night color of the sky. More...
 
Horizon Blur

The 'blurriness' with which the horizon is rendered.

Default=0.1.

virtual float getHorizonBlur (TimeValue &t, Interval &valid) const =0
 Gets the horizon blur value. More...
 
virtual bool setHorizonBlur (TimeValue t, float horizonBlur)=0
 Sets the horizon blur value. More...
 
Horizon Height

The vertical position of the horizon.

Default=0.0.

virtual float getHorizonHeight (TimeValue &t, Interval &valid) const =0
 Gets the horizon height value. More...
 
virtual bool setHorizonHeight (TimeValue t, float horizonHeight)=0
 Sets the horizon height value. More...
 
Aerial Perspective

How distant objects are perceived as hazier and tinted towards the blue end of the spectrum.

This is a boolean for enabling/disabling aerial perspective.

virtual bool getAerialPerspective (TimeValue &t, Interval &valid) const =0
 Gets whether or not aerial perspective is enabled. More...
 
virtual bool setAerialPerspective (TimeValue t, bool aerialPerspective)=0
 Sets whether or not aerial perspective is enabled. More...
 
Visibility Distance

The visibility distance of the aerial perspective.

When nonzero, it defines the the distance at which approximately 10% of haze is visible at a Haze level of 0.0.

virtual float getVisibilityDistance (TimeValue &t, Interval &valid) const =0
 Gets the visibility distance value. More...
 
virtual bool setVisibilityDistance (TimeValue t, float visibilityDistance)=0
 Sets the visibility distance value. More...
 
Sky Model

The type of internal sky model that will be used to determine the sky luminance distrubtion pattern.

virtual SkyModel getSkyModel (TimeValue &t, Interval &valid) const =0
 Gets the type of sky model being used. More...
 
virtual bool setSkyModel (TimeValue t, SkyModel skyModel)=0
 Sets the type of sky model being used. More...
 
Perez Diffuse Horizontal Illuminance

The diffuse horizontal illuminance value used by the Perez sky model

virtual float getPerezDiffuseHorizIlluminance (TimeValue &t, Interval &valid) const =0
 Gets the Perez diffuse horizontal illuminance value. More...
 
virtual bool setPerezDiffuseHorizIlluminance (TimeValue t, float perezDiffuseHorizIlluminance)=0
 Sets the Perez diffuse horizontal illuminance value. More...
 
Perez Direct Normal Illuminance

The direct normal illuminance value used by the Perez Sky Model.

This value will drive a MR Sun object if one exists in the same daylight system as the sky object

virtual float getPerezDirectNormalIlluminance (TimeValue &t, Interval &valid) const =0
 Gets the Perez direct normal illuminance value. More...
 
virtual bool setPerezDirectNormalIlluminance (TimeValue t, float perezDirectNormalIlluminance)=0
 Sets the Perez direct normal illuminance value. More...
 
CIE Diffuse Horizontal Illuminance

The diffuse horizontal illuminance value used by the CIE sky model

virtual float getCIEDiffuseHorizIlluminance (TimeValue &t, Interval &valid) const =0
 Gets the CIE diffuse horizontal illuminance value. More...
 
virtual bool setCIEDiffuseHorizIlluminance (TimeValue t, float cieDiffuseHorizIlluminance)=0
 Sets the CIE diffuse horizontal illuminance value. More...
 
CIE Model

The CIE sky type supports two models, an overcast sky model and a clear sky model.

virtual CIEModel getCIEModel (TimeValue &t, Interval &valid) const =0
 Get the CIE sky type model. More...
 
virtual bool setCIEModel (TimeValue t, CIEModel model)=0
 Set the CIE sky type model. More...
 
- Public Member Functions inherited from BaseInterface
virtual UtilExport ~BaseInterface ()
 Destructor. More...
 
UtilExport BaseInterfaceGetInterface (Interface_ID id)
 
virtual LifetimeType LifetimeControl ()
 
virtual bool RegisterNotifyCallback (InterfaceNotifyCallback *incb)
 
virtual void UnRegisterNotifyCallback (InterfaceNotifyCallback *incb)
 
virtual BaseInterfaceAcquireInterface ()
 
virtual void ReleaseInterface ()
 
virtual void DeleteInterface ()
 
virtual BaseInterfaceCloneInterface (void *remapDir=NULL)
 
- Public Member Functions inherited from InterfaceServer
virtual UtilExport ~InterfaceServer ()
 Destructor. More...
 

Additional Inherited Members

- Static Public Member Functions inherited from MaxHeapOperators
static UtilExport voidoperator new (size_t size)
 Standard new operator used to allocate objects If there is insufficient memory, an exception will be thrown. More...
 
static UtilExport voidoperator new (size_t size, const std::nothrow_t &e)
 Standard new operator used to allocate objects if there is insufficient memory, NULL will be returned. More...
 
static UtilExport voidoperator new (size_t size, const char *filename, int line)
 New operator used to allocate objects that takes the filename and line number where the new was called If there is insufficient memory, an exception will be thrown. More...
 
static UtilExport voidoperator new (size_t size, int block_type, const char *filename, int line)
 New operator used to allocate objects that takes the type of memory, filename and line number where the new was called If there is insufficient memory, an exception will be thrown. More...
 
static UtilExport voidoperator new (size_t size, const std::nothrow_t &e, const char *filename, int line)
 New operator used to allocate objects that takes the filename and line number where the new was called If there is insufficient memory, NULL will be returned. More...
 
static UtilExport voidoperator new (size_t size, unsigned long flags)
 New operator used to allocate objects that takes extra flags to specify special operations If there is insufficient memory, an exception will be thrown. More...
 
static UtilExport voidoperator new (size_t size, const std::nothrow_t &e, unsigned long flags)
 New operator used to allocate objects that takes extra flags to specify special operations If there is insufficient memory, NULL will be returned. More...
 
static UtilExport voidoperator new[] (size_t size)
 New operator used to allocate arrays of objects If there is insufficient memory, an exception will be thrown. More...
 
static UtilExport voidoperator new[] (size_t size, const std::nothrow_t &e)
 New operator used to allocate arrays of objects If there is insufficient memory, NULL will be returned. More...
 
static UtilExport voidoperator new[] (size_t size, const char *filename, int line)
 New operator used to allocate arrays of objects If there is insufficient memory, an exception will be thrown. More...
 
static UtilExport voidoperator new[] (size_t size, int block_type, const char *filename, int line)
 New operator used to allocate arrays of objects. More...
 
static UtilExport voidoperator new[] (size_t size, const std::nothrow_t &e, const char *filename, int line)
 New operator used to allocate arrays of objects If there is insufficient memory, NULL will be returned. More...
 
static UtilExport voidoperator new[] (size_t size, unsigned long flags)
 New operator used to allocate arrays of objects If there is insufficient memory, an exception will be thrown. More...
 
static UtilExport voidoperator new[] (size_t size, const std::nothrow_t &e, unsigned long flags)
 New operator used to allocate arrays of objects If there is insufficient memory, NULL will be returned. More...
 
static UtilExport void operator delete (void *ptr)
 Standard delete operator used to deallocate an object If the pointer is invalid, an exception will be thrown. More...
 
static UtilExport void operator delete (void *ptr, const std::nothrow_t &e)
 Standard delete operator used to deallocate an object If the pointer is invalid, nothing will happen. More...
 
static UtilExport void operator delete (void *ptr, const char *filename, int line)
 Delete operator used to deallocate an object that takes the filename and line number where the delete was called If the pointer is invalid, an exception will be thrown. More...
 
static UtilExport void operator delete (void *ptr, int block_type, const char *filename, int line)
 Delete operator used to deallocate an object that takes the type of memory, filename and line number where the delete was called If the pointer is invalid, an exception will be thrown. More...
 
static UtilExport void operator delete (void *ptr, const std::nothrow_t &e, const char *filename, int line)
 Delete operator used to deallocate an object that takes the filename and line number where the delete was called If the pointer is invalid, nothing will happen. More...
 
static UtilExport void operator delete (void *ptr, unsigned long flags)
 Delete operator used to deallocate an object that takes extra flags to specify special operations If the pointer is invalid, an exception will be thrown. More...
 
static UtilExport void operator delete (void *ptr, const std::nothrow_t &e, unsigned long flags)
 Delete operator used to deallocate an object that takes extra flags to specify special operations If the pointer is invalid, nothing will happen. More...
 
static UtilExport void operator delete[] (void *ptr)
 Standard delete operator used to deallocate an array of objects If the pointer is invalid, an exception will be thrown. More...
 
static UtilExport void operator delete[] (void *ptr, const std::nothrow_t &e)
 Standard delete operator used to deallocate an array of objects If the pointer is invalid, nothing will happen. More...
 
static UtilExport void operator delete[] (void *ptr, const char *filename, int line)
 Delete operator used to deallocate an array of objects that takes the filename and line number where the delete was called If the pointer is invalid, an exception will be thrown. More...
 
static UtilExport void operator delete[] (void *ptr, int block_type, const char *filename, int line)
 Delete operator used to deallocate an array of objects that takes the type of memory, filename and line number where the delete was called If the pointer is invalid, an exception will be thrown. More...
 
static UtilExport void operator delete[] (void *ptr, const std::nothrow_t &e, const char *filename, int line)
 Delete operator used to deallocate an array of objects that takes the filename and line number where the delete was called If the pointer is invalid, nothing will happen. More...
 
static UtilExport void operator delete[] (void *ptr, unsigned long flags)
 Delete operator used to deallocate an array of objects that takes extra flags to specify special operations If the pointer is invalid, an exception will be thrown. More...
 
static UtilExport void operator delete[] (void *ptr, const std::nothrow_t &e, unsigned long flags)
 Delete operator used to deallocate an array of objects that takes extra flags to specify special operations If the pointer is invalid, an exception will be thrown. More...
 
static UtilExport voidoperator new (size_t size, void *placement_ptr)
 Placement new operator. More...
 
static UtilExport void operator delete (void *ptr, void *placement_ptr)
 Placement delete operator. More...
 

Member Enumeration Documentation

enum SkyModel
Enumerator
eHaze 
ePerez 
eCIE 
42 { eHaze = 0, ePerez, eCIE};
Definition: imrPhysicalSkyLight.h:42
Definition: imrPhysicalSkyLight.h:42
Definition: imrPhysicalSkyLight.h:42
enum CIEModel
Enumerator
eOvercastSky 
eClearSky 
43 { eOvercastSky = 0, eClearSky};
Definition: imrPhysicalSkyLight.h:43
Definition: imrPhysicalSkyLight.h:43

Constructor & Destructor Documentation

virtual ~IMRPhysicalSkyInterface ( )
inlinevirtual

A virtual destructor for the interface.

49 {};

Member Function Documentation

virtual Interface_ID GetID ( )
inlinevirtual

Returns the Interface ID of this interface.

Reimplemented from BaseInterface.

Reimplemented in IMRPhysicalSkyInterface2.

#define MRPHYSSKY_LIGHT_INTERFACECLASS_ID
Interface id for the Mental Ray Physical Sky object.
Definition: imrPhysicalSkyLight.h:29
virtual float getMultiplier ( TimeValue t,
Interval valid 
) const
pure virtual

Gets the value of the multiplier for the sky's brightness.

Parameters
[in]t- The time at which we're getting the multiplier
[in]valid- The interval at which we're getting the multiplier
Returns
The value of the multiplier
virtual bool setMultiplier ( TimeValue  t,
float  multiplier 
)
pure virtual

Sets the value of the multiplier for the sky's brightness.

Parameters
[in]t- The time at which to set the multiplier
[in]multiplier- The value of what to set the multiplier to
Returns
true if the setting was successful
virtual float getHaze ( TimeValue t,
Interval valid 
) const
pure virtual

Gets the haze value of the sky.

Parameters
[in]t- The time at which we're getting the haze value
[in]valid- The interval at which we're getting the haze value
Returns
The value of the haze
virtual bool setHaze ( TimeValue  t,
float  haze 
)
pure virtual

Sets the haze value of the sky.

Parameters
[in]t- The time at which to set the haze value
[in]haze- The value of what to set the haze value to
Returns
true if the setting was successful
virtual float getRedBlueShift ( TimeValue t,
Interval valid 
) const
pure virtual

Gets the red/blue tint value of the sky.

Parameters
[in]t- The time at which we're getting the red/blue shift
[in]valid- The interval at which we're getting the red/blue shift
Returns
The value of the red/blue shift
virtual bool setRedBlueShift ( TimeValue  t,
float  redBlueShift 
)
pure virtual

Sets the red/blue tint value of the sky.

Parameters
[in]t- The time at which to set the red/blue shift
[in]redBlueShift- The value of what to set the red/blue shift to
Returns
true if the setting was successful
virtual float getSaturation ( TimeValue t,
Interval valid 
) const
pure virtual

Gets the saturation value of the sky.

Parameters
[in]t- The time at which we're getting the saturation value
[in]valid- The interval at which we're getting the saturation value
Returns
The value of the saturation
virtual bool setSaturation ( TimeValue  t,
float  saturation 
)
pure virtual

Sets the saturation value of the sky.

Parameters
[in]t- The time at which to set the saturation
[in]saturation- The value of what to set the saturation to
Returns
true if the setting was successful
virtual AColor getGroundColor ( TimeValue t,
Interval valid 
) const
pure virtual

Gets the ground color.

Parameters
[in]t- The time at which we're getting the ground color
[in]valid- The interval at which we're getting the ground color
Returns
The value of the ground color
virtual bool setGroundColor ( TimeValue  t,
AColor  groundColor 
)
pure virtual

Sets the ground color.

Parameters
[in]t- The time at which to set the ground color
[in]groundColor- The value of what to set the ground color to
Returns
true if the setting was successful
virtual AColor getNightColor ( TimeValue t,
Interval valid 
) const
pure virtual

Gets the night color of the sky.

Parameters
[in]t- The time at which we're getting the night color
[in]valid- The interval at which we're getting the night color
Returns
The value of the night color
virtual bool setNightColor ( TimeValue  t,
AColor  nightColor 
)
pure virtual

Sets the night color of the sky.

Parameters
[in]t- The time at which to set the night color
[in]nightColor- The value of what to set the night color to
Returns
true if the setting was successful
virtual float getHorizonBlur ( TimeValue t,
Interval valid 
) const
pure virtual

Gets the horizon blur value.

Parameters
[in]t- The time at which we're getting the horizon blur value
[in]valid- The interval at which we're getting the horizon blur
Returns
The value of the horizon blur
virtual bool setHorizonBlur ( TimeValue  t,
float  horizonBlur 
)
pure virtual

Sets the horizon blur value.

Parameters
[in]t- The time at which to set the horizon blur value
[in]horizonBlur- The value of what to set the horizon blur to
Returns
true if the setting was successful
virtual float getHorizonHeight ( TimeValue t,
Interval valid 
) const
pure virtual

Gets the horizon height value.

Parameters
[in]t- The time at which we're getting the horizon height
[in]valid- The interval at which we're getting the horizon height
Returns
The value of the horizon height
virtual bool setHorizonHeight ( TimeValue  t,
float  horizonHeight 
)
pure virtual

Sets the horizon height value.

Parameters
[in]t- The time at which to set the horizon height
[in]horizonHeight- The value of what to set the horizon height to
Returns
true if the setting was successful
virtual bool getAerialPerspective ( TimeValue t,
Interval valid 
) const
pure virtual

Gets whether or not aerial perspective is enabled.

Parameters
[in]t- The time at which we're getting the aerial perspective
[in]valid- The interval at which we're getting the aerial perspective
Returns
A boolean value enabling or disabling the aerial perspective
virtual bool setAerialPerspective ( TimeValue  t,
bool  aerialPerspective 
)
pure virtual

Sets whether or not aerial perspective is enabled.

Parameters
[in]t- The time at which to set the aerial perspective
[in]aerialPerspective- Enable/disable the aerial perspective
Returns
true if the setting was successful
virtual float getVisibilityDistance ( TimeValue t,
Interval valid 
) const
pure virtual

Gets the visibility distance value.

Parameters
[in]t- The time at which we're getting the visibility distance
[in]valid- The interval at which we're getting the visibility distance
Returns
The value of the visibility distance
virtual bool setVisibilityDistance ( TimeValue  t,
float  visibilityDistance 
)
pure virtual

Sets the visibility distance value.

Parameters
[in]t- The time at which to set the visibility distance
[in]visibilityDistance- The value of what to set the visibility distance to
Returns
true if the setting was successful
virtual SkyModel getSkyModel ( TimeValue t,
Interval valid 
) const
pure virtual

Gets the type of sky model being used.

Parameters
[in]t- The time at which we're getting the sky model
[in]valid- The interval at which we're getting the sky model
Returns
The sky model type either SkyModel::eHaze, the default haze model, SkyModel::ePerez, the Perez sky model, or SkyModel::eCIE, the CIE sky model type
virtual bool setSkyModel ( TimeValue  t,
SkyModel  skyModel 
)
pure virtual

Sets the type of sky model being used.

Parameters
[in]t- The time at which we are setting the sky model
[in]skyModel- The value that the sky model will be set to. It can be either SkyModel::eHaze, SkyModel::ePerez, or SkyModel::eCIE
Returns
true if the setting was successful, false otherwise
virtual float getPerezDiffuseHorizIlluminance ( TimeValue t,
Interval valid 
) const
pure virtual

Gets the Perez diffuse horizontal illuminance value.

Parameters
[in]t- The time at which we're getting the diffuse horizontal illuminance for the Perez model
[in]valid- The interval at which we're getting the diffuse horizontal illuminance for the Perez model
Returns
The diffuse horizontal illuminance value used by the Perez sky model
virtual bool setPerezDiffuseHorizIlluminance ( TimeValue  t,
float  perezDiffuseHorizIlluminance 
)
pure virtual

Sets the Perez diffuse horizontal illuminance value.

Parameters
[in]t- The time at which we are setting the Perez diffuse horizontal illuminance
[in]perezDiffuseHorizIlluminance- The value that the Perez diffuse horizontal illuminance will be set to
Returns
true if the setting was successful, false otherwise
virtual float getPerezDirectNormalIlluminance ( TimeValue t,
Interval valid 
) const
pure virtual

Gets the Perez direct normal illuminance value.

Parameters
[in]t- The time at which we're getting the direct normal illuminance for the Perez model
[in]valid- The interval at which we're getting the direct normal illuminance for the Perez model
Returns
The direct normal illuminance value used by the Perez model
virtual bool setPerezDirectNormalIlluminance ( TimeValue  t,
float  perezDirectNormalIlluminance 
)
pure virtual

Sets the Perez direct normal illuminance value.

Parameters
[in]t- The time at which we are setting the Perez direct normal illuminance
[in]perezDirectNormalIlluminance- The value that the Perez direct normal illuminance will be set to
Returns
true if the setting was successful, false otherwise
virtual float getCIEDiffuseHorizIlluminance ( TimeValue t,
Interval valid 
) const
pure virtual

Gets the CIE diffuse horizontal illuminance value.

Parameters
[in]t- The time at which we're getting the diffuse horizontal illuminance for the CIE model
[in]valid- The interval at which we're getting the diffuse horizontal illuminance for the CIE model
Returns
The diffuse horizontal illuminance value used by the CIE sky model
virtual bool setCIEDiffuseHorizIlluminance ( TimeValue  t,
float  cieDiffuseHorizIlluminance 
)
pure virtual

Sets the CIE diffuse horizontal illuminance value.

Parameters
[in]t- The time at which we are setting the CIE diffuse horizontal illuminance
[in]cieDiffuseHorizIlluminance- The value that the CIE diffuse horizontal illuminance will be set to
Returns
true if the setting was successful, false otherwise
virtual CIEModel getCIEModel ( TimeValue t,
Interval valid 
) const
pure virtual

Get the CIE sky type model.

Parameters
[in]t- The time at which we're getting the CIE sky type model
[in]valid- The interval at which we're getting the model, overcast or clear, for the CIE sky type
Returns
Will return either CIEModel::eOvercastSky or CIEModel::eClearSky
virtual bool setCIEModel ( TimeValue  t,
CIEModel  model 
)
pure virtual

Set the CIE sky type model.

Parameters
[in]t- The time at which we are setting the CIE sky model type
[in]model- The CIE sky model that will be used, can be ither CIEModel::eOvercastSky or CIEModel::eClearSky
Returns
true if the setting was successful
virtual void getPerezABCDE ( float &  A,
float &  B,
float &  C,
float &  D,
float &  E,
TimeValue  t,
Interval valid 
) const
pure virtual

Get the current calculate Perez Params based upon the current illuminance (or possibly irradiance if coming from a weather file).

Please see All Weather Model For Sky Luminance Distrubution - Preliminary Configuration and Validation, R Perez et al. 1989.

Parameters
[out]A- If negative horizon is brighter than zenith else darker
[out]B- Luminance Gradient near the horizon
[out]C- Relative intensity of the circumsolar region
[out]D- Width of circumsolar region
[out]E- Relative intensity of backscattered ligth at earth's surface
[in]t- The time at which we're getting the multiplier
[in]valid- The interval at which we're getting the multiplier