Public Types | Public Member Functions

IMRPhysicalSkyInterface Class Reference

Search for all occurrences

Detailed 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
BaseInterface* skyInteface = skylight->GetInterface(MRPHYSSKY_LIGHT_INTERFACECLASS_ID);
IMRPhysicalSkyInterface* physSkyInterface = dynamic_cast<IMRPhysicalSkyInterface*>(skyInterface);

#include <imrPhysicalSkyLight.h>

Inheritance diagram for IMRPhysicalSkyInterface:
Inheritance graph
[legend]

List of all members.

Public Types

enum   SkyModel { eHaze = 0, ePerez, eCIE }
enum   CIEModel { eOvercastSky = 0, eClearSky }

Public Member Functions

virtual Interface_ID  GetID ()
  Returns the Interface ID of this interface.
virtual  ~IMRPhysicalSkyInterface ()
  A virtual destructor for the interface.
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).
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.
virtual bool  setMultiplier (TimeValue t, float multiplier)=0
  Sets the value of the multiplier for the sky's brightness.
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.
virtual bool  setHaze (TimeValue t, float haze)=0
  Sets the haze value of the sky.
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.
virtual bool  setRedBlueShift (TimeValue t, float redBlueShift)=0
  Sets the red/blue tint value of the sky.
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.
virtual bool  setSaturation (TimeValue t, float saturation)=0
  Sets the saturation value of the sky.
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.
virtual bool  setGroundColor (TimeValue t, AColor groundColor)=0
  Sets the ground color.
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.
virtual bool  setNightColor (TimeValue t, AColor nightColor)=0
  Sets the night color of the sky.
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.
virtual bool  setHorizonBlur (TimeValue t, float horizonBlur)=0
  Sets the horizon blur value.
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.
virtual bool  setHorizonHeight (TimeValue t, float horizonHeight)=0
  Sets the horizon height value.
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.
virtual bool  setAerialPerspective (TimeValue t, bool aerialPerspective)=0
  Sets whether or not aerial perspective is enabled.
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.
virtual bool  setVisibilityDistance (TimeValue t, float visibilityDistance)=0
  Sets the visibility distance value.
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.
virtual bool  setSkyModel (TimeValue t, SkyModel skyModel)=0
  Sets the type of sky model being used.
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.
virtual bool  setPerezDiffuseHorizIlluminance (TimeValue t, float perezDiffuseHorizIlluminance)=0
  Sets the Perez diffuse horizontal illuminance value.
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.
virtual bool  setPerezDirectNormalIlluminance (TimeValue t, float perezDirectNormalIlluminance)=0
  Sets the Perez direct normal illuminance value.
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.
virtual bool  setCIEDiffuseHorizIlluminance (TimeValue t, float cieDiffuseHorizIlluminance)=0
  Sets the CIE diffuse horizontal illuminance value.
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.
virtual bool  setCIEModel (TimeValue t, CIEModel model)=0
  Set the CIE sky type model.

Member Enumeration Documentation

enum SkyModel
enum CIEModel

Constructor & Destructor Documentation

virtual ~IMRPhysicalSkyInterface ( ) [inline, virtual]

A virtual destructor for the interface.

{};

Member Function Documentation

virtual Interface_ID GetID ( ) [inline, virtual]

Returns the Interface ID of this interface.

Reimplemented from BaseInterface.

Reimplemented in IMRPhysicalSkyInterface2.

{ return MRPHYSSKY_LIGHT_INTERFACECLASS_ID; };
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

IMRPhysicalSkyInterface IMRPhysicalSkyInterface IMRPhysicalSkyInterface IMRPhysicalSkyInterface IMRPhysicalSkyInterface IMRPhysicalSkyInterface IMRPhysicalSkyInterface IMRPhysicalSkyInterface IMRPhysicalSkyInterface IMRPhysicalSkyInterface
IMRPhysicalSkyInterface IMRPhysicalSkyInterface IMRPhysicalSkyInterface IMRPhysicalSkyInterface IMRPhysicalSkyInterface IMRPhysicalSkyInterface IMRPhysicalSkyInterface IMRPhysicalSkyInterface IMRPhysicalSkyInterface IMRPhysicalSkyInterface