Public Member Functions

IMrSkyPortalLight Class Reference

Search for all occurrences

Detailed Description

Access interface for the Mental Ray Sky Portal.

This class represents the Mental Ray Sky Portal object, implemented by 3ds Max. For more information on the Sky Portal object see the 3ds Max User Guide. SDK client code can access this interface by querying a 3d Max light object for this interface:

 Object* obj = // obtain a pointer to an object
 BaseInterface* bi = obj->GetInterface(IID_MR_SKY_PORTAL_LIGHT);
 IMrSkyPortalLight* mrSkyPortal = dynamic_cast<IMrSkyPortalLight*>(bi);

#include <imrSkyPortalLight.h>

Inheritance diagram for IMrSkyPortalLight:
Inheritance graph
[legend]

List of all members.

Public Member Functions

virtual Interface_ID  GetID ()
  Returns the Interface ID of this interface.
virtual  ~IMrSkyPortalLight ()
  A virtual destructor for the interface.
Multiplier

The multiplier for the value of the sky portal's output.

virtual float  GetMultiplier (const TimeValue t, Interval &valid) const =0
  Gets the value of the multiplier for the sky portal's output.
virtual bool  SetMultiplier (const TimeValue t, float multiplier)=0
  Sets the value of the multiplier for the sky portal's output.
Filter Color

Tints the coloring of the light going through a sky portal

virtual AColor  GetFilterColor (const TimeValue t, Interval &valid) const =0
  Gets the filter color of the sky portal.
virtual bool  SetFilterColor (const TimeValue t, const AColor &color)=0
  Sets the filter color of the sky portal.
Shadow Casting
virtual bool  GetCastShadowsFromOutdoors () const =0
  Methods for accessing shadow casting related parameters For basic shadow casting related functionality see class LightObject.
virtual bool  SetCastShadowsFromOutdoors (bool bEnable)=0
  Sets whether shadows are casts from objects that are "outdoors" or "outside" of the sky portal object.
Shadow Samples
virtual int  GetShadowSamples (const TimeValue t, Interval &valid) const =0
  Affects the quality of the shadows cast by the light portal.
virtual bool  SetShadowSamples (const TimeValue t, int shadowSamples)=0
  Sets the number of shadow samples.
Dimensions

The length and the width of the sky portal.

virtual float  GetLength (const TimeValue t, Interval &valid) const =0
  Gets the length of the sky portal.
virtual bool  SetLength (const TimeValue t, float length)=0
  Sets the length of the sky portal.
virtual float  GetWidth (const TimeValue t, Interval &valid) const =0
  Gets the width of the sky portal.
virtual bool  SetWidth (const TimeValue t, float width)=0
  Sets the width of the sky portal.
Visibility in renderings
virtual bool  GetVisibleInRendering (const TimeValue t, Interval &valid) const =0
  Allows for specifying whether the sky portal is visible in renderings or not.
virtual bool  SetVisibleInRenderin (const TimeValue t, bool visible)=0
  Sets whether the sky portal appears in rendering.
Transparency
virtual AColor  GetTransparencyColor (const TimeValue t, Interval &valid) const =0
  Transparency Filters the view outside the window Changing this color does not change the light coming in, but has the effect of darkening outside objects, which can help if they are overexposed.
virtual bool  SetTransparencyColor (const TimeValue t, const AColor &color)=0
  Sets the transparency color of the sky portal.
Custom Illumination Color

A map can be used to specify a custom illumination color for the sky portal

virtual Texmap GetIlluminationMap () const =0
  Gets the current map used to supply the illumination color.
virtual bool  SetIlluminationMap (Texmap *illumColorMap)=0
  Sets the map used for supplying the illumination color.

Light Flux Direction

enum   LightFluxDirection { kOutdoorToIndoor = 0, kIndoorToOutdoor = 1, kLastDir }
 

Light Flux Direction Determines the direction in which light flows through the portal.

More...
virtual LightFluxDirection  GetLightFluxDirection () const =0
  Gets the light flux direction through the sky portal.
virtual bool  SetLightFluxDirection (LightFluxDirection dir)=0
  Sets the light flux direction through the sky portal.

Illumination Color

The sky portal can derive its illumination color from different sources.
enum   IlluminationColorSource { kSceneEnvironmentColor, kCustomMapColor, kSkylightColor, kLastColorSource }
 

The possible sources of illumination color used by a sky portal.

More...
virtual IlluminationColorSource  GetIllumColorSource () const =0
  Gets the illumination color source used by the sky portal.
virtual bool  SetIllumColorSource (IlluminationColorSource source)=0
  Sets the illumination color source used by the sky portal.

Member Enumeration Documentation

Light Flux Direction Determines the direction in which light flows through the portal.

The sky portal has two sides that can either correspond to the "indoor" or "outdoor" sides of the scene. The possible directions of the light flux through the sky portal

Enumerator:
kOutdoorToIndoor 

Light flows from the "outdoor" towards "indoor" side of the sky portal.

kIndoorToOutdoor 

Light flows from the "indoor" towards "outdoor" side of the sky portal.

kLastDir 

The possible sources of illumination color used by a sky portal.

Enumerator:
kSceneEnvironmentColor 

Uses the current scene environment map.

This allows the outdoor to be illuminated with a different color than the indoor.

kCustomMapColor 

Use a texture map for the illumination coloring.

See IMrSkyPortalLight::setIlluminationMap

kSkylightColor 

Uses the existent skylight in the scene.

kLastColorSource 

Constructor & Destructor Documentation

virtual ~IMrSkyPortalLight ( ) [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.

{ return IID_MR_SKY_PORTAL_LIGHT; };
virtual float GetMultiplier ( const TimeValue  t,
Interval valid 
) const [pure virtual]

Gets the value of the multiplier for the sky portal's output.

Parameters:
[in] t - The time at which the multiplier's value is retrieved
[in] valid - The time interval for which the multiplier value is valid *
Returns:
The value of the multiplier
virtual bool SetMultiplier ( const TimeValue  t,
float  multiplier 
) [pure virtual]

Sets the value of the multiplier for the sky portal's output.

Parameters:
[in] t - The time at which the multiplier value is set
[in] multiplier - The new value of multiplier
Returns:
true if the new value has been set successfully
virtual AColor GetFilterColor ( const TimeValue  t,
Interval valid 
) const [pure virtual]

Gets the filter color of the sky portal.

Parameters:
[in] t - The time at which the color is retrieved
[in,out] valid - The time interval for which the color value is valid
Returns:
The value of the filter color
virtual bool SetFilterColor ( const TimeValue  t,
const AColor color 
) [pure virtual]

Sets the filter color of the sky portal.

Parameters:
[in] t - The time at which the color is set
[in] color - The new color value
Returns:
true if setting the new color was successful, false otherwise
virtual bool GetCastShadowsFromOutdoors ( ) const [pure virtual]

Methods for accessing shadow casting related parameters For basic shadow casting related functionality see class LightObject.

Gets whether shadows are casts from objects that are "outdoors" or "outside" of the sky portal object.

The "outside" represents the side that is away from the sky portal's arrow icon.

Returns:
True if the sky portal casts shadows from "outdoor, false otherwise
virtual bool SetCastShadowsFromOutdoors ( bool  bEnable ) [pure virtual]

Sets whether shadows are casts from objects that are "outdoors" or "outside" of the sky portal object.

The "outside" represents the side that is away from the sky portal's arrow icon. Note that turning this option on can significantly increase render times.

Parameters:
[in] bEnable - The new parameter value
Returns:
true if setting the new parameter value was successful, false otherwise
virtual int GetShadowSamples ( const TimeValue  t,
Interval valid 
) const [pure virtual]

Affects the quality of the shadows cast by the light portal.

Increase the value of this parameter if the shadows are grainy

Gets the number of shadow samples.

Parameters:
[in] t - The time at which the parameter is retrieved
[in,out] valid - The time interval for which the parameter value is valid
Returns:
The number of samples being used for shadows, as an exponent of 2. For example, if this method returns 10, the actual number of shadow samples used is 2 at the power of 10 = 1024.
virtual bool SetShadowSamples ( const TimeValue  t,
int  shadowSamples 
) [pure virtual]

Sets the number of shadow samples.

Parameters:
[in] t - The time at which the parameter is set
[in] shadowSamples - The new parameter value. 2 raised to the power of this value represents the actual number of shadow samples. Must be a value within [1, 10]. For example, if 10 is set via this method, the actual number of shadow samples will be 1024.
Returns:
true if setting the new parameter value was successful, false otherwise
virtual float GetLength ( const TimeValue  t,
Interval valid 
) const [pure virtual]

Gets the length of the sky portal.

Parameters:
[in] t - The time at which the parameter is retrieved
[in,out] valid - The time interval for which the parameter value is valid
Returns:
The length of the sky portal
virtual bool SetLength ( const TimeValue  t,
float  length 
) [pure virtual]

Sets the length of the sky portal.

Parameters:
[in] t - The time at which the parameter is set
[in] length - The new parameter value. Must be a positive floating point value
Returns:
true if setting the new parameter value was successful, false otherwise
virtual float GetWidth ( const TimeValue  t,
Interval valid 
) const [pure virtual]

Gets the width of the sky portal.

Parameters:
[in] t - The time at which the parameter is retrieved
[in,out] valid - The time interval for which the parameter value is valid
Returns:
The width of the sky portal
virtual bool SetWidth ( const TimeValue  t,
float  width 
) [pure virtual]

Sets the width of the sky portal.

Parameters:
[in] t - The time at which the parameter is set
[in] width - The new parameter value. Must be a positive floating point value
Returns:
true if setting the new parameter value was successful, false otherwise
virtual LightFluxDirection GetLightFluxDirection ( ) const [pure virtual]

Gets the light flux direction through the sky portal.

Returns:
The light flux direction through the sky portal
virtual bool SetLightFluxDirection ( LightFluxDirection  dir ) [pure virtual]

Sets the light flux direction through the sky portal.

Parameters:
[in] dir - The new direction value
Returns:
true if setting the new parameter value was successful, false otherwise
virtual bool GetVisibleInRendering ( const TimeValue  t,
Interval valid 
) const [pure virtual]

Allows for specifying whether the sky portal is visible in renderings or not.

When the sky portal appears in renderings, objects that are on the "indoors" side of the sky portal do not appear in the rendering.

Gets whether the sky portal appears in rendering

Parameters:
[in] t - The time at which the parameter is retrieved
[in,out] valid - The time interval for which the parameter value is valid
Returns:
true if the sky portal appears in rendering, false otherwise
virtual bool SetVisibleInRenderin ( const TimeValue  t,
bool  visible 
) [pure virtual]

Sets whether the sky portal appears in rendering.

Parameters:
[in] t - The time at which the parameter is set
[in] visible - The new parameter value.
Returns:
true if setting the new parameter value was successful, false otherwise
virtual AColor GetTransparencyColor ( const TimeValue  t,
Interval valid 
) const [pure virtual]

Transparency Filters the view outside the window Changing this color does not change the light coming in, but has the effect of darkening outside objects, which can help if they are overexposed.

To avoid recoloring the outside view, use a shade of gray, such as R=G=B=0.5.

Gets the transparency color of the sky portal

Parameters:
[in] t - The time at which the parameter is retrieved
[in,out] valid - The time interval for which the parameter is valid
Returns:
The value of the transparency color
virtual bool SetTransparencyColor ( const TimeValue  t,
const AColor color 
) [pure virtual]

Sets the transparency color of the sky portal.

Parameters:
[in] t - The time at which the parameter is set
[in] color - The new parameter value
Returns:
true if setting the new color was successful, false otherwise
virtual IlluminationColorSource GetIllumColorSource ( ) const [pure virtual]

Gets the illumination color source used by the sky portal.

Returns:
The illumination color source used by the sky portal
virtual bool SetIllumColorSource ( IlluminationColorSource  source ) [pure virtual]

Sets the illumination color source used by the sky portal.

Parameters:
[in] dir - The new parameter value
Returns:
true if setting the new parameter value was successful, false otherwise
virtual Texmap* GetIlluminationMap ( ) const [pure virtual]

Gets the current map used to supply the illumination color.

Returns:
A pointer to a texture map that supplies the illumination color
virtual bool SetIlluminationMap ( Texmap illumColorMap ) [pure virtual]

Sets the map used for supplying the illumination color.

Parameters:
[in] illumColorMap - A pointer to a texture map that supplies the illumination color. To set no map, set this parameter to NULL.
Returns:
true if the setting was successful

IMrSkyPortalLight IMrSkyPortalLight IMrSkyPortalLight IMrSkyPortalLight IMrSkyPortalLight IMrSkyPortalLight IMrSkyPortalLight IMrSkyPortalLight IMrSkyPortalLight IMrSkyPortalLight
IMrSkyPortalLight IMrSkyPortalLight IMrSkyPortalLight IMrSkyPortalLight IMrSkyPortalLight IMrSkyPortalLight IMrSkyPortalLight IMrSkyPortalLight IMrSkyPortalLight IMrSkyPortalLight