MeshBaker
Public Member Functions | Static Public Member Functions | Public Attributes | Protected Attributes | Properties | List of all members
MB3_TextureBaker Class Reference

Component that handles baking materials into a combined material. More...

Inheritance diagram for MB3_TextureBaker:
MB3_MeshBakerRoot

Public Member Functions

override List< GameObject > GetObjectsToCombine ()
 
MB_AtlasesAndRects[] CreateAtlases ()
 
MB_AtlasesAndRects[] CreateAtlases (ProgressUpdateDelegate progressInfo, bool saveAtlasesAsAssets=false, MB2_EditorMethodsInterface editorMethods=null)
 Creates the atlases. More...
 

Static Public Member Functions

static void ConfigureNewMaterialToMatchOld (Material newMat, Material original)
 
- Static Public Member Functions inherited from MB3_MeshBakerRoot
static bool DoCombinedValidate (MB3_MeshBakerRoot mom, MB_ObjsToCombineTypes objToCombineType, MB2_EditorMethodsInterface editorMethods, MB2_ValidationLevel validationLevel)
 

Public Attributes

MB2_LogLevel LOG_LEVEL = MB2_LogLevel.info
 
MB_MultiMaterial[] resultMaterials = new MB_MultiMaterial[0]
 
List< GameObject > objsToMesh
 

Protected Attributes

MB2_TextureBakeResults _textureBakeResults
 
int _atlasPadding = 1
 
bool _resizePowerOfTwoTextures = false
 
bool _fixOutOfBoundsUVs = false
 
int _maxTilingBakeSize = 1024
 
MB2_PackingAlgorithmEnum _packingAlgorithm = MB2_PackingAlgorithmEnum.MeshBakerTexturePacker
 
bool _meshBakerTexturePackerForcePowerOfTwo = true
 
List< ShaderTextureProperty_customShaderProperties = new List<ShaderTextureProperty>()
 
List< string > _customShaderPropNames_Depricated = new List<string>()
 
bool _doMultiMaterial
 
Material _resultMaterial
 

Properties

override MB2_TextureBakeResults textureBakeResults [get, set]
 
virtual int atlasPadding [get, set]
 
virtual bool resizePowerOfTwoTextures [get, set]
 
virtual bool fixOutOfBoundsUVs [get, set]
 
virtual int maxTilingBakeSize [get, set]
 
virtual MB2_PackingAlgorithmEnum packingAlgorithm [get, set]
 
bool meshBakerTexturePackerForcePowerOfTwo [get, set]
 
virtual List< ShaderTexturePropertycustomShaderProperties [get, set]
 
virtual List< string > customShaderPropNames [get, set]
 
virtual bool doMultiMaterial [get, set]
 
virtual Material resultMaterial [get, set]
 
- Properties inherited from MB3_MeshBakerRoot
abstract MB2_TextureBakeResults textureBakeResults [get, set]
 

Detailed Description

Component that handles baking materials into a combined material.

The result of the material baking process is a MB2_TextureBakeResults object, which becomes the input for the mesh baking.

This class uses the MB_TextureCombiner to do the combining.

This class is a Component (MonoBehavior) so it is serialized and found using GetComponent. If you want to access the texture baking functionality without creating a Component then use MB_TextureCombiner directly.

Member Function Documentation

static void MB3_TextureBaker.ConfigureNewMaterialToMatchOld ( Material  newMat,
Material  original 
)
static
MB_AtlasesAndRects [] MB3_TextureBaker.CreateAtlases ( )
MB_AtlasesAndRects [] MB3_TextureBaker.CreateAtlases ( ProgressUpdateDelegate  progressInfo,
bool  saveAtlasesAsAssets = false,
MB2_EditorMethodsInterface  editorMethods = null 
)

Creates the atlases.

Returns
The atlases.
Parameters
progressInfoProgress info is a delegate function that displays a progress dialog. Can be null
saveAtlasesAsAssetsif true atlases are saved as assets in the project folder. Othersise they are instances in memory
editorMethodsTexture format tracker. Contains editor functionality such as save assets. Can be null.
override List<GameObject> MB3_TextureBaker.GetObjectsToCombine ( )
virtual

Reimplemented from MB3_MeshBakerRoot.

Member Data Documentation

int MB3_TextureBaker._atlasPadding = 1
protected
List<ShaderTextureProperty> MB3_TextureBaker._customShaderProperties = new List<ShaderTextureProperty>()
protected
List<string> MB3_TextureBaker._customShaderPropNames_Depricated = new List<string>()
protected
bool MB3_TextureBaker._doMultiMaterial
protected
bool MB3_TextureBaker._fixOutOfBoundsUVs = false
protected
int MB3_TextureBaker._maxTilingBakeSize = 1024
protected
bool MB3_TextureBaker._meshBakerTexturePackerForcePowerOfTwo = true
protected
MB2_PackingAlgorithmEnum MB3_TextureBaker._packingAlgorithm = MB2_PackingAlgorithmEnum.MeshBakerTexturePacker
protected
bool MB3_TextureBaker._resizePowerOfTwoTextures = false
protected
Material MB3_TextureBaker._resultMaterial
protected
MB2_TextureBakeResults MB3_TextureBaker._textureBakeResults
protected
MB2_LogLevel MB3_TextureBaker.LOG_LEVEL = MB2_LogLevel.info
List<GameObject> MB3_TextureBaker.objsToMesh
MB_MultiMaterial [] MB3_TextureBaker.resultMaterials = new MB_MultiMaterial[0]

Property Documentation

virtual int MB3_TextureBaker.atlasPadding
getset
virtual List<ShaderTextureProperty> MB3_TextureBaker.customShaderProperties
getset
virtual List<string> MB3_TextureBaker.customShaderPropNames
getset
virtual bool MB3_TextureBaker.doMultiMaterial
getset
virtual bool MB3_TextureBaker.fixOutOfBoundsUVs
getset
virtual int MB3_TextureBaker.maxTilingBakeSize
getset
bool MB3_TextureBaker.meshBakerTexturePackerForcePowerOfTwo
getset
virtual MB2_PackingAlgorithmEnum MB3_TextureBaker.packingAlgorithm
getset
virtual bool MB3_TextureBaker.resizePowerOfTwoTextures
getset
virtual Material MB3_TextureBaker.resultMaterial
getset
override MB2_TextureBakeResults MB3_TextureBaker.textureBakeResults
getset

The documentation for this class was generated from the following file: