This is the inteface class to implement in order to support
exposure controls.
- See also:
- Class
ExposureMaterialControlImp
- Description:
- This class is an extension to allow maxscript to determine
whether a material's shaded output is to be processed by a tone
operator and whether the self-illumination, reflection or
refraction channels are to be inverted by the tone operator so the
actual rgb values will appear in the display.
This class is added to materials that want to expose control over
the results of the exposure control on the shaded output of the
material. This is useful when a material knows the specific RGB
value to appear in the rendered image, and does not want this color
to be adjusted. For example, a material might already perform its
own physically-based lighting calculations with handling for image
exposure. Or, in the case of specialty "non-physical" materials, it
might be inappropriate to perform exposure adjustments on the
color.
You determine whether a material allows this control by asking for
the interface. If the interface is present, then you can set
values. This is how you ask for the interface:
A material can support this interface by deriving from this class
and handling the GetInterface()
method as follows:
There are four properties in the interface, each with a get and a
set method. Use the get method to get the current value and set to
set a new value for the property.
The properties are:
NoExposure
InvertSelfIllum
InvertReflect
InvertRefract
Also, if you want your material's
ExposureMaterialControl methods to be exposed to MAXScript, you
can derive from
ExposureMaterialControlImp.
Public Types
|
enum |
{
kGetNoExposureControl
= 0,
kSetNoExposureControl = 1,
kGetInvertSelfIllum = 2,
kSetInvertSelfIllum = 3,
kGetInvertReflect
= 4,
kSetInvertReflect = 5,
kGetInvertRefract = 6,
kSetInvertRefract = 7
} |
Public Member Functions
|
|
ExposureMaterialControl () |
BEGIN_FUNCTION_MAP |
PROP_FNS (kGetNoExposureControl, GetNoExposure,
kSetNoExposureControl, SetNoExposure, TYPE_BOOL) |
|
PROP_FNS (kGetInvertSelfIllum, GetInvertSelfIllum,
kSetInvertSelfIllum, SetInvertSelfIllum, TYPE_BOOL) |
|
PROP_FNS (kGetInvertReflect, GetInvertReflect,
kSetInvertReflect, SetInvertReflect, TYPE_BOOL) |
|
PROP_FNS (kGetInvertRefract, GetInvertRefract,
kSetInvertRefract, SetInvertRefract, TYPE_BOOL) |
END_FUNCTION_MAP
BOOL |
GetNoExposure () const |
virtual
void |
SetNoExposure (BOOL on) |
BOOL |
GetInvertSelfIllum () const |
virtual
void |
SetInvertSelfIllum (BOOL on) |
BOOL |
GetInvertReflect () const |
virtual
void |
SetInvertReflect (BOOL on) |
BOOL |
GetInvertRefract () const |
virtual
void |
SetInvertRefract (BOOL on) |
ULONG |
isNoExposure () const |
bool |
isInvertSelfIllum () const |
bool |
isInvertReflect () const |
bool |
isInvertRefract () const |
IOResult |
Save (ISave
*isave) |
IOResult |
Load (ILoad
*iload) |
Protected Types
|
enum |
{
DATA_CHUNK = 0x322 } |
Protected Member Functions
|
IOResult |
write (ISave *isave,
bool &b) |
IOResult |
read (ILoad *iload,
bool &b) |
Protected Attributes
|
bool |
mNoExposure |
bool |
mInvertSelfIllum |
bool |
mInvertReflect |
bool |
mInvertRefract |