3ds Max C++ API Reference
INormalMappingManager Class Referenceabstract

This interface manages the normal mapping modes that can affect how 3ds Max calculates/interprets the tangent/binormal(bitangent) in vertex/pixel shading level during baking/rendering. More...

#include <NormalMappingManager.h>

+ Inheritance diagram for INormalMappingManager:

Public Member Functions

virtual NormalBumpMode GetNormalBumpMode () const =0
 Get the normal bump mode used by 3dsmax system. More...
 
virtual void SetNormalBumpMode (const NormalBumpMode mode)=0
 Set the normal bump mode used by 3dsmax system. More...
 
virtual TangentBasisMode GetTangentBasisMode () const =0
 Get the tangent basis mode used by 3dsmax system. More...
 
virtual void SetTangentBasisMode (const TangentBasisMode mode)=0
 Set the tangent basis mode used by 3dsmax system. More...
 
virtual const TCHAR * OrthogonalizePerPixelParamName () const =0
 Get the parameter name of Orthogonalize Per Pixel flag. More...
 
virtual bool GetOrthogonalizePerPixel () const =0
 Get the flag indicating if Orthogonalize Per Pixel is enabled or disabled. More...
 
virtual void SetOrthogonalizePerPixel (bool on)=0
 Set the flag indicating if Orthogonalize Per Pixel is enabled or disabled. More...
 
virtual const TCHAR * CalculateBitangentPerPixelParamName () const =0
 Get the parameter name of Calculate Bitangent Per Pixel flag. More...
 
virtual bool GetCalculateBitangentPerPixel () const =0
 Get the flag indicating if Calculate Bitangent Per Pixel is enabled or disabled. More...
 
virtual void SetCalculateBitangentPerPixel (bool on)=0
 Set the flag indicating if Calculate Bitangent Per Pixel is enabled or disabled. More...
 
virtual IOResult Save (ISave *iSave)=0
 FileIO(Internal Use Only) More...
 
virtual IOResult Load (ILoad *iLoad)=0
 FileIO(Internal Use Only) More...
 
- Public Member Functions inherited from FPInterfaceDesc
CoreExport FPInterfaceDesc ()
 
CoreExport FPInterfaceDesc (Interface_ID id, const MCHAR *int_name, StringResID descr, ClassDesc *cd, ULONG flag,...)
 
CoreExport ~FPInterfaceDesc ()
 
virtual void Init ()
 
LifetimeType LifetimeControl ()
 
virtual BaseInterfaceGetInterface (Interface_ID id)
 
CoreExport void LoadDescriptor (Interface_ID id, const MCHAR *int_name, StringResID descr, ClassDesc *pCD, ULONG flag,...)
 
CoreExport void AppendFunction (int id,...)
 Add a new function to this interface descriptor. More...
 
CoreExport void AppendProperty (int id,...)
 Add a new property to this interface descriptor. More...
 
CoreExport void AppendEnum (int id,...)
 Add a new enum to this interface descriptor. More...
 
CoreExport void SetClassDesc (ClassDesc *i_cd)
 
CoreExport va_list check_fn (va_list ap, int id)
 
CoreExport va_list scan_fn (va_list ap, int id, int index)
 
CoreExport va_list check_prop (va_list ap, int id)
 
CoreExport va_list scan_prop (va_list ap, int id, int index)
 
CoreExport va_list check_enum (va_list ap, EnumID id)
 
CoreExport va_list scan_enum (va_list ap, EnumID id, int index)
 
FPInterfaceDescGetDesc ()
 
Interface_ID GetID ()
 
CoreExport FPFunctionDefGetFnDef (FunctionID fid)
 
ActionTableGetActionTable ()
 
CoreExport void EnableActions (BOOL onOff)
 
virtual CoreExport HINSTANCE HInstance ()
 
virtual CoreExport const MCHARGetRsrcString (StringResID id)
 
- Public Member Functions inherited from FPInterface
virtual CoreExport FPStatus Invoke (FunctionID fid, TimeValue t=0, FPParams *params=NULL)
 
virtual FPStatus Invoke (FunctionID fid, FPParams *params)
 
virtual CoreExport FPStatus Invoke (FunctionID fid, TimeValue t, FPValue &result, FPParams *params=NULL)
 
virtual FPStatus Invoke (FunctionID fid, FPValue &result, FPParams *params=NULL)
 
virtual CoreExport FunctionID FindFn (const MCHAR *name)
 
virtual CoreExport BOOL IsEnabled (FunctionID actionID)
 
virtual CoreExport BOOL IsChecked (FunctionID actionID)
 
virtual CoreExport BOOL IsVisible (FunctionID actionID)
 
virtual CoreExport FunctionID GetIsEnabled (FunctionID actionID)
 
virtual CoreExport FunctionID GetIsChecked (FunctionID actionID)
 
virtual CoreExport FunctionID GetIsVisible (FunctionID actionID)
 
- Public Member Functions inherited from BaseInterface
virtual UtilExport ~BaseInterface ()
 Destructor. More...
 
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...
 
template<class InterfaceType >
InterfaceType * GetTypedInterface ()
 

Protected Member Functions

virtual ~INormalMappingManager ()
 
- Protected Member Functions inherited from FPInterfaceDesc
CoreExport void load_descriptor (Interface_ID id, const MCHAR *int_name, StringResID descr, ClassDesc *cd, USHORT flag, va_list ap)
 
- Protected Member Functions inherited from FPInterface
virtual FPStatus _dispatch_fn (FunctionID fid, TimeValue t, FPValue &result, FPParams *p)
 

Additional Inherited Members

- Public Types inherited from BaseInterface
enum  LifetimeType { noRelease , immediateRelease , wantsRelease , serverControlled }
 
- 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...
 
static UtilExport voidaligned_malloc (size_t size, size_t alignment)
 Allocates memory on a specified alignment boundary. More...
 
static UtilExport voidaligned_realloc (void *ptr, size_t size, size_t alignment)
 Reallocates memory on a specified alignment boundary. More...
 
static UtilExport void aligned_free (void *ptr)
 Frees a block of memory that was allocated with aligned_malloc/aligned_realloc. More...
 
- Public Attributes inherited from FPInterfaceDesc
Interface_ID ID
 
MSTR internal_name
 
StringResID description
 
ClassDesccd
 
USHORT flags
 
Tab< FPFunctionDef * > functions
 
Tab< FPPropDef * > props
 
Tab< FPEnum * > enumerations
 
MSPluginClasspc
 
Rolloutrollout
 
ActionTableaction_table
 
- Static Public Attributes inherited from FPInterface
static CoreExport FPInterfaceDesc nullInterface
 

Detailed Description

This interface manages the normal mapping modes that can affect how 3ds Max calculates/interprets the tangent/binormal(bitangent) in vertex/pixel shading level during baking/rendering.

This interface is implemented by the system. Plug-ins can get/set the following values on the NormalMappingManager.

  • NormalBumpMode, the normal bump mode which can be one of the following: NB_3dsMax, NB_Maya, NB_DirectX, NB_MikkT. The default value is NB_3dsMax. See description for the definition of NormalBumpMode.
  • TangentBasisMode, the tangent basis mode which can be one of the following: kPerpendicularToFaceNormal, kPerpendicularToVertexNormal, kMikkT. The default value is kPerpendicularToFaceNormal. See description for the definition of TangentBasisMode.
  • OrthogonalizePerPixel, the flag indicating if Orthogonalize Per Pixel is enabled or disabled.
  • CalculateBitangentPerPixel, the flag indicating if Calculate Bitangent Per Pixel is enabled or disabled.

Usage: Set 3ds Max to use the mode compatible with Maya to calculate/interpret tangent/binormal(bitangent)

INormalMappingManager* nMMgr = static_cast<INormalMappingManager*>(GetCOREInterface(NORMALMAPPINGMGR_INTERFACE));
nMMgr->SetNormalBumpMode(NB_Maya);
#define NORMALMAPPINGMGR_INTERFACE
Definition: NormalMappingManager.h:20
CoreExport Interface * GetCOREInterface()
@ NB_Maya
Maya Mode In this mode, the vertex tangent and binormal(bitangent) are perpendicular to the vertex no...
Definition: NormalMappingManager.h:36

Set 3ds Max to use the mode compatible with MikkT to calculate/interpret tangent/binormal(bitangent), and enable calculate bitangent per pixel flag.

INormalMappingManager* nMMgr = static_cast<INormalMappingManager*>(GetCOREInterface(NORMALMAPPINGMGR_INTERFACE));
nMMgr->SetNormalBumpMode(NB_MikkT);
nMMgr->SetCalculateBitangentPerPixel(true);
@ NB_MikkT
MikkT Mode - by Morten S.
Definition: NormalMappingManager.h:47

Constructor & Destructor Documentation

◆ ~INormalMappingManager()

virtual ~INormalMappingManager ( )
inlineprotectedvirtual
145 {}

Member Function Documentation

◆ GetNormalBumpMode()

virtual NormalBumpMode GetNormalBumpMode ( ) const
pure virtual

Get the normal bump mode used by 3dsmax system.

Returns
the normal bump mode

◆ SetNormalBumpMode()

virtual void SetNormalBumpMode ( const NormalBumpMode  mode)
pure virtual

Set the normal bump mode used by 3dsmax system.

Parameters
[in]modeThe normal bump mode

◆ GetTangentBasisMode()

virtual TangentBasisMode GetTangentBasisMode ( ) const
pure virtual

Get the tangent basis mode used by 3dsmax system.

Returns
the normal bump mode

◆ SetTangentBasisMode()

virtual void SetTangentBasisMode ( const TangentBasisMode  mode)
pure virtual

Set the tangent basis mode used by 3dsmax system.

Parameters
[in]modeThe tangent basis mode

◆ OrthogonalizePerPixelParamName()

virtual const TCHAR* OrthogonalizePerPixelParamName ( ) const
pure virtual

Get the parameter name of Orthogonalize Per Pixel flag.

Returns
the name of Orthogonalize Per Pixel flag

◆ GetOrthogonalizePerPixel()

virtual bool GetOrthogonalizePerPixel ( ) const
pure virtual

Get the flag indicating if Orthogonalize Per Pixel is enabled or disabled.

Returns
True if Orthogonalize Per Pixel is enabled, False otherwise.

◆ SetOrthogonalizePerPixel()

virtual void SetOrthogonalizePerPixel ( bool  on)
pure virtual

Set the flag indicating if Orthogonalize Per Pixel is enabled or disabled.

Parameters
[in]onThe flag indicating if Orthogonalize Per Pixel is enabled or disabled

◆ CalculateBitangentPerPixelParamName()

virtual const TCHAR* CalculateBitangentPerPixelParamName ( ) const
pure virtual

Get the parameter name of Calculate Bitangent Per Pixel flag.

Returns
the name of Calculate Bitangent Per Pixel flag

◆ GetCalculateBitangentPerPixel()

virtual bool GetCalculateBitangentPerPixel ( ) const
pure virtual

Get the flag indicating if Calculate Bitangent Per Pixel is enabled or disabled.

Returns
True if Calculate Bitangent Per Pixel is enabled, False otherwise.

◆ SetCalculateBitangentPerPixel()

virtual void SetCalculateBitangentPerPixel ( bool  on)
pure virtual

Set the flag indicating if Calculate Bitangent Per Pixel is enabled or disabled.

Parameters
[in]onThe flag indicating if Calculate Bitangent Per Pixel is enabled or disabled

◆ Save()

virtual IOResult Save ( ISave iSave)
pure virtual

FileIO(Internal Use Only)

◆ Load()

virtual IOResult Load ( ILoad iLoad)
pure virtual

FileIO(Internal Use Only)