C# Class HoudiniEngineUnity.HEU_MaterialData

Inheritance: ScriptableObject
显示文件 Open project: sideeffects/HoudiniEngineForUnity Class Usage Examples

Public Methods

Method Description
IsEquivalentTo ( other ) : bool
IsExistingMaterial ( ) : bool

Returns true if this material was pre-existing in Unity and not generated from Houdini at cook time.

UpdateMaterialFromHoudini ( HoudiniEngineUnity.HAPI_MaterialInfo materialInfo, string assetCacheFolderPath ) : bool

For this object's _material, we update the shader attributes and fetch the textures from Houdini.

Private Methods

Method Description
GetMaterialAlpha ( HoudiniEngineUnity.HEU_SessionBase session, HAPI_NodeId nodeID, Array parameters, float defaultValue, float &alpha ) : bool
GetSupportedFileFormat ( HoudiniEngineUnity.HEU_SessionBase session, HoudiniEngineUnity.HAPI_ImageInfo &imageInfo ) : string

Returns null if the given image info supports a Unity friendly image format. Otherwise returns a file format that we know Unity supports.

GetTextureFileNameFromMaterialParam ( HoudiniEngineUnity.HEU_SessionBase session, HAPI_NodeId nodeID, HoudiniEngineUnity.HAPI_ParmInfo parmInfo ) : string

Return the file name for the given material node's parameter.

IsTransparentMaterial ( HoudiniEngineUnity.HEU_SessionBase session, HAPI_NodeId nodeID, Array parameters ) : bool

Retruns true if the material (via its parameters) is a transparent material or not.

MaterialSource_WrapperToInternal ( Source materialSource ) : HEU_MaterialSourceWrapper
MaterialSource_WrapperToInternal ( HEU_MaterialSourceWrapper materialSource ) : Source
UseLegacyShaders ( HoudiniEngineUnity.HAPI_MaterialInfo materialInfo, string assetCacheFolderPath, HoudiniEngineUnity.HEU_SessionBase session, HoudiniEngineUnity.HAPI_NodeInfo nodeInfo, Array parmInfos ) : bool

Method Details

IsEquivalentTo() public method

public IsEquivalentTo ( other ) : bool
return bool

IsExistingMaterial() public method

Returns true if this material was pre-existing in Unity and not generated from Houdini at cook time.
public IsExistingMaterial ( ) : bool
return bool

UpdateMaterialFromHoudini() public method

For this object's _material, we update the shader attributes and fetch the textures from Houdini.
public UpdateMaterialFromHoudini ( HoudiniEngineUnity.HAPI_MaterialInfo materialInfo, string assetCacheFolderPath ) : bool
materialInfo HoudiniEngineUnity.HAPI_MaterialInfo This material's info from Houdini
assetCacheFolderPath string Path to asset's cache folder
return bool