BMD file

From Pikmin Technical Knowledge Base
Revision as of 21:12, 6 March 2022 by UnclePaul894 (talk | contribs) (Additional info added.)
Jump to navigation Jump to search

Editor's note: This page is under construction.

Pikmin 2's 3D models exist inside .bmd files.

Material data

SuperBMD can dump the material data of a model into a handy JSON (JavaScript Object Notation) file. This dump outputs a mat.json file and a texheader.json file. mat.json contains the data related to the model's material. This section will document these JSON files instead of the actual material format used by Pikmin 2.

mat.json

"Name" Name of material that is being defined.
"Flag" Material flag value. A value of 1 is used for almost all solid materials, while 4 is used for transparent materials.
"ColorChannelControlsCount" Amount of color channel controls.
"NumTexGensCount" Amount of texture generators.
"NumTevStagesCount" Amount of tev stages.
"Textures" The list of textures that the material uses, in square brackets
"IndTexEntry"
"HasLookup"
"IndTexStageNum"
"TevOrders"
"TexCoord"
"TexMap"
"Matrices"
"Matrix"
"Exponent"
"Scales"
"ScaleS"
"ScaleT"
"TevStages" This TevStages does not do much, and is not as important as the following TevStages.
"TevStage"
"IndTexFormat"
"InTedBiasSel"
"IndTexWrapId"
"IndTexWrapS"
"IndTexWrapT"
"AddPrev"
"UtcLod"
"AlphaSel"
"CullMode" Determines which faces to render.
"MaterialColors"
"ChannelControls"
"Enable"
"MaterialSrcColor"
"LitMask"
"DiffuseFunction"
"AttenuationFunction"
"AmbientSrcColor"
"AmbientColors"
"LightingColors"
"TexCoord1Gens"
"Type"
"Sources"
"TexMatrixSource"
"PostTexCoordGens"
"TexMatrix1"
"Projection"
"Type" Determines what the texture does. 0, 1, and 7 are the most used.
"EffectTranslation"
"Scale" The bigger the number, the smaller the texture is scaled on the material.
"Rotation"
"Translation"
"ProjectionMatrix"
"PostTexMatrix"
"TevOrders"
"TexCoord"
"TexMap"
"ChannelId"
"ColorSels"
"AlphaSels"
"TevColors"
"KonstColors"
"TevStages"
"ColorInA"
"ColorInB"
"ColorInC"
"ColorInD"
"ColorOp"
"ColorBias"
"ColorScale"
"ColorClamp"
"ColorRegId"
"AlphaInA"
"AlphaInB"
"AlphaInC"
"AlphaInD"
"AlphaOp"
"AlphaBias"
"AlphaScale"
"AlphaClamp"
"AlphaRegId"
"SwapModes" Determines the channel that each channel will draw from. 0 = Sample from Red 1 = Sample from Green 2 = Sample from Blue 3 = Sample from Alpha.
"RasSel"
"TexSel"
"SwapTables"
"FogInfo"
"RangeAdjustmentTable"
"AlphCompare" Creates a filter based on the Alpha of the pixel that determines whether or not that pixel is rendered.
"Comp0"
"Reference0"
"Operation"
"Comp1"
"Reference1"
"BMode" Determines how a mesh is rendered in relation to meshes that have already been rendered.
"Type"
"SourceFact"
"DestinationFact"
"Operation"
"ZMode"
"Enable"
"Function"
"UpdateEnable"
"ZCompLoc"
"Dither"
"NBTScale"
"Unknown1"