Difference between revisions of "Sims 3:0x01D0E75D"

From SimsWiki
Jump to: navigation, search
(Remove redundant tables that no one is maintaining. See Sims 3:Shaders. General tidy-up of the rest of the page.)
 
(17 intermediate revisions by 4 users not shown)
Line 1: Line 1:
{{TS3ModdingHeader}}
+
{{TS3AdvancedModdingHeader}}
 +
{{TS3Resource
 +
|name=Material Definition - MATD
 +
|typeid=0x01D0E75D
 +
|expansion=The Sims 3
 +
}}
 +
<br clear="all">
  
==Material Definition==
+
==Overview==
 
This is a [[Sims 3:RCOL]] chunk.
 
This is a [[Sims 3:RCOL]] chunk.
 
  DWORD 'MATD'
 
  DWORD 'MATD'
 
  DWORD version
 
  DWORD version
 
  DWORD // Material name hash or 0
 
  DWORD // Material name hash or 0
  DWORD // Shader type hash or 0 ([[#Shader Types|see below]])
+
  DWORD // [[Sims 3:Shaders|Shader]] name hash or 0
 
  DWORD length // Length from 'MTRL' or 'MTNF'; 16+(16*count)+(4*parmcount)
 
  DWORD length // Length from 'MTRL' or 'MTNF'; 16+(16*count)+(4*parmcount)
 
  --if version < 0x103
 
  --if version < 0x103
  DWORD 'MTRL'
+
  DWORD 'MTRL'   // Used instead of MTNF if the internal list of resource keys is null.
  DWORD
+
  DWORD 0
 
  WORD
 
  WORD
 
  WORD
 
  WORD
 
  --else if version >= 0x103
 
  --else if version >= 0x103
  DWORD
+
  DWORD IsVideoSurface // boolean
  DWORD
+
  DWORD IsPaintingSurface //
  DWORD 'MTNF'
+
  DWORD 'MTNF' // Used if the internal list of resource keys is non-null.
  DWORD
+
// Note that it may still just be of zero length.
 +
  DWORD 0
 
  DWORD datasize // Size of the data block (total parms*4)
 
  DWORD datasize // Size of the data block (total parms*4)
 
   
 
   
 
  DWORD count
 
  DWORD count
 
  --count repeats of
 
  --count repeats of
  DWORD field type hash // Dependant on the shader used ([[#Field Types|see below]])
+
  DWORD param name hash // Valid values depend on the [[Sims 3:Shaders|Shader]] used
  DWORD data type
+
// see [[Sims 3:Shaders\Params|ShaderParams]] for another list
  DWORD data count
+
  DWORD // [[Sims 3:0x01D0E75D#Param DataTypes|Data type code]]
 +
  DWORD data size (in DWORDS)
 
  DWORD data offset // From 'MTRL' or 'MTNF'
 
  DWORD data offset // From 'MTRL' or 'MTNF'
 
   
 
   
 
  --count repeats of
 
  --count repeats of
  --data count repeats of
+
  --data count repeats of
  --switch data type:
+
  --insert data // see [[Sims 3:0x01D0E75D#Param DataTypes|Param Datatypes]] for possible typecode/size combos
1: FLOAT
+
2: DWORD
+
4: DWORD
+
 
  --insert padding to DWORD boundry
 
  --insert padding to DWORD boundry
==Shader Types==
+
 
The following are all the known values for shader types.  Not all of these make sense for objects to use.
+
==Param DataTypes==
{| class="nicetable"
+
{|border="0" cellpadding="4"
! Data
+
|- valign="top"
! Hash
+
|
 +
{| class="wikitable" border="1"
 +
! colspan="3" | TypeCodes
 
|-
 
|-
|additive||0x5af16731
+
! Id
 +
! Description
 
|-
 
|-
|BasinWater||0x6aad2ad5
+
| 1 || Float
 
|-
 
|-
|BrushedMetal||0x3fd7990d
+
| 2 || Int
 
|-
 
|-
|BurntTile||0x690fdf06
+
| 4 || Texture
 
|-
 
|-
|CasSilk||0x0072aa53
+
|}
 +
|
 +
{| class="wikitable" border="1"
 +
! colspan="4" | DataType
 
|-
 
|-
|CasSimEyes||0xb51ec997
+
! TypeCode
 +
! Size(in DWORDs)
 +
! Data
 +
! Description
 
|-
 
|-
|CasSimHair||0xfcf80ce1
+
| 1 || 1 || Float ||
 
|-
 
|-
|CasSimHairSimple||0xa7b368fb
+
| 1 || 2 || Vector2 ||
 
|-
 
|-
|CasSkin||0x01772897
+
| 1 || 3 || Vector3 ||
 
|-
 
|-
|Counters||0xa4172f62
+
| 1 || 4 || Vector4 ||
 
|-
 
|-
|DropShadow||0xc09c7582
+
| 2 || 1 || Int ||
 
|-
 
|-
|ExteriorCeiling||0xd2ac4914
+
| 2 || * || Int[] ||
 
|-
 
|-
|ExteriorWalls||0xcd677552
+
| 4 || 4 || Texture|| A resource key index.  In most cases it is a [[Sims 3:RCOL#References|RCOL reference]], however in the case of [[Sims 3:0x015A1849|GEOM]], it is a [[Sims 3:Key_table|Key Table]] index. This data is padded to 16 bytes with 00.
 
|-
 
|-
|Fence||0x67107fe8
+
| 4 || 5 || TextureKey|| [[Sims 3:Key_table|ResourceKey]](in ITG order) padded to 20 bytes with 00
 
|-
 
|-
|FlatMirror||0xa68d9e29
 
|-
 
|Floors||0xbc84d000
 
|-
 
|FloorsVisualizer||0x2b1f3aec
 
|-
 
|Foliage||0x4549e22e
 
|-
 
|FullBright||0x14fa335e
 
|-
 
|Gemstones||0xa063c1d0
 
|-
 
|Ghost||0x2b1f3aec
 
|-
 
|GhostEyes||0x8c88b4a8
 
|-
 
|GhostHair||0x00c394a6
 
|-
 
|GlassForFences||0x52986c62
 
|-
 
|GlassForObjects||0x492eca7c
 
|-
 
|GlassForObjectsTranslucent||0x849cf021
 
|-
 
|GlassForPortals||0x81dd204d
 
|-
 
|GlassForRabbitHoles||0x265ffaa1
 
|-
 
|ImpostorColorDefault||0xed4fb30e
 
|-
 
|ImpostorColorGlow||0x9661e300
 
|-
 
|ImposterLightingDefault||0x5f03f969
 
|-
 
|ImpostorLightingGlow||0x05954911
 
|-
 
|Instanced||0x0cb82eb8
 
|-
 
|InstancedImpostorColor||0xe7abde9c
 
|-
 
|LotImposter||0x68601de3
 
|-
 
|LotPondWater||0xe1386384
 
|-
 
|LotTerrain||0x11d0b721
 
|-
 
|LotTerrainImposterMaker||0xaee088f0
 
|-
 
|Occluder||0x071fd3d4
 
|-
 
|OutdoorProp||0x4d26bec0
 
|-
 
|Painting||0xaa495821
 
|-
 
|Particle||0x6da87a9b
 
|-
 
|ParticleAnim||0x460e93f4
 
|-
 
|ParticleLight||0xd9a8e549
 
|-
 
|phong-alpha||0xfc5fc212
 
|-
 
|Phong||0xb9105a6d
 
|-
 
|PickCASSim||0x26d1704a
 
|-
 
|PickCounters||0xce0c0dc1
 
|-
 
|PickDefault||0x9017b045
 
|-
 
|PickInstanced||0xb7178269
 
|-
 
|PickRug||0x18120028
 
|-
 
|PickSim||0x301464c3
 
|-
 
|PickTerrain||0x0f49bea1
 
|-
 
|PickWater||0xc107590f
 
|-
 
|PickWalls||0xb81ad379
 
|-
 
|Plumbob||0xdef16564
 
|-
 
|Ponds||0x79c38597
 
|-
 
|PreviewWallsAndFloors||0x213d6300
 
|-
 
|RabbitHoleHighDetail||0x8d346bbc
 
|-
 
|RabbitHoleMediumDetail||0xaede7105
 
|-
 
|Roads||0x5e0ac22e
 
|-
 
|RoadsCompositor||0x7c8b3791
 
|-
 
|Roofs||0x4c0628aa
 
|-
 
|RoofImpostorLighting||0xcb14114c
 
|-
 
|Rug||0x2a72b9a1
 
|-
 
|ShadowMapMerged||0xe2918799
 
|-
 
|SimEyes||0xcf8a70b4
 
|-
 
|SimEyelashes||0x9d9da161
 
|-
 
|SimHair||0x84fd7152
 
|-
 
|SimHairVisualizer||0x109defb6
 
|-
 
|SimSilk||0x53881019
 
|-
 
|Simple||0x723aa6e7
 
|-
 
|SimSkin||0x548394b9
 
|-
 
|SimSkinThumbnail||0x9eff872b
 
|-
 
|SimSkinVisualizer||0x969921ad
 
|-
 
|Stairs||0x4ce2f497
 
|-
 
|StandingWater||0x70fde012
 
|-
 
|StaticTerrain||0xe05b91aa
 
|-
 
|StaticTerrainLowLOD||0x413d7051
 
|-
 
|Subtractive||0x0b272cc5
 
|-
 
|TerrainLightFog||0x69eb86e4
 
|-
 
|TerrainVisualization||0xc589e244
 
|-
 
|TreeBillboard||0xedd106f2
 
|-
 
|TreeShadowCompositor||0x974fba48
 
|-
 
|ThumbnailShadowPlane||0xd32eec7b
 
|-
 
|VertexColor||0xb39101ac
 
|-
 
|Walls||0x974fba48
 
 
|}
 
|}
 
==Field Types==
 
Field types have been observed as the following values (Under construction)
 
 
{| class="nicetable"
 
! Data
 
! Hash
 
|-
 
| AlphaMap||0xc3faac4f
 
|-
 
| AlphaMaskThreshold||0xe77a2b60
 
|-
 
| Ambient||0x04a5daa3
 
|-
 
| AmbientOcclusionMap||0xb01cba60
 
|-
 
| AmbientUVSelector||0x797f8e81
 
|-
 
| AnimDir||0x3f89c2ef
 
|-
 
| AnimSpeed||0xd600cb63
 
|-
 
| AutoRainbow||0x5f7800ea
 
|-
 
| BackFaceDiffuseContribution||0xd641a1b1
 
|-
 
| bHasDetailmap||0xe9008abe
 
|-
 
| bHasNormalMap||0x5e99ee74
 
|-
 
| bIsTerrainRoad||0xa4a17516
 
|-
 
| BloomFactor||0x4168508b
 
|-
 
| BounceAmountMeters||0xd8542d8b
 
|-
 
| ContourSmoothing||0x1e27dccd
 
|-
 
| CounterMatrixRow1||0x1ef8655d
 
|-
 
| CounterMatrixRow2||0x1ef8655e
 
|-
 
| CutoutValidHeights||0x6d43d7b7
 
|-
 
| DetailMap||0x9205daa8
 
|-
 
| DetailUVScale||0xcd985a0b
 
|-
 
| Diffuse||0x637daa05
 
|-
 
| DiffuseMap||0x6cc0fd85
 
|-
 
| DiffuseUVScale||0x2d4e507e
 
|-
 
| DiffuseUVSelector||0x91eebaff
 
|-
 
| DimmingCenterHeight||0x01adace0
 
|-
 
| DimmingRadius||0x32dfa298
 
|-
 
| DirtOverlay||0x48372e62
 
|-
 
| DropShadowAtlas||0x22ad8507
 
|-
 
| DropShadowStrength||0x1b1ab4d5
 
|-
 
| EdgeDarkening||0x8c27d8c9
 
|-
 
| Emission||0x3bd441a0
 
|-
 
| EmissionMap||0xf303d152
 
|-
 
| EmissiveBloomMultiplier||0x490e6eb4
 
|-
 
| EmissiveLightMultiplier||0x8ef71c85
 
|-
 
| FadeDistance||0x957210ea
 
|-
 
| FresnelOffset||0xfb66a8cb
 
|-
 
| ImposterTexture||0xbdcf71c5
 
|-
 
| ImposterTextureAOandSI||0x15c9d298
 
|-
 
| ImposterTextureWater||0xbf3fb9fa
 
|-
 
| ImpostorDetailTexture||0x56e1c6b2
 
|-
 
| ImpostorWater||0x277cf8eb
 
|-
 
| Layer2Shift||0x92692cb2
 
|-
 
| LayerOffset||0x80d9bfe1
 
|-
 
| LightMapScale||0x4f7dcb9b
 
|-
 
| MaskHeight||0x849cdadc
 
|-
 
| MaskWidth||0x707f712f
 
|-
 
| NoiseMap||0xe19fd579
 
|-
 
| NoiseMapScale||0x5e86dea1
 
|-
 
| NormalMap||0x6e56548a
 
|-
 
| NormalMapScale||0x3c45e334
 
|-
 
| NormalMapUVSelector||0x415368b4
 
|-
 
| NormalUVScale||0xba2d1ab9
 
|-
 
| PosOffset||0x790ebf2c
 
|-
 
| PosScale||0x487648e5
 
|-
 
| Reflective||0x73c9923e
 
|-
 
| RefractionDistortionScale||0xc3c472a1
 
|-
 
| RevealMap||0xf3f22ac4
 
|-
 
| RippleDistanceScale||0xccb35b98
 
|-
 
| RippleHeights||0x6a07d7e1
 
|-
 
| RippleSpeed||0x52dec070
 
|-
 
| RoadDetailMap||0x28392dc6
 
|-
 
| RoadNormalMap||0xbca022bc
 
|-
 
| RoadTexture||0x53521204
 
|-
 
| RoomLightMap||0xe7ca9166
 
|-
 
| RotationSpeed||0x32003ad4
 
|-
 
| RugSort||0x906997a9
 
|-
 
| ShadowAlphaTest||0xfeb1f9cb
 
|-
 
| Shininess||0xf755f7ff
 
|-
 
| SparkleCube||0x1d90c086
 
|-
 
| SparkleSpeed||0xba13921e
 
|-
 
| SpecStyle||0x9554d40f
 
|-
 
| Specular||0x2ce11842
 
|-
 
| SpecularMap||0xad528a60
 
|-
 
| SpecularUVScale||0xf12e27c3
 
|-
 
| SpecularUVSelector||0xb63546ac
 
|-
 
| TerrainLightMap||0x5fd5b006
 
|-
 
| TextureSpeedScale||0x583df357
 
|-
 
| Transparency||0x05d22fd3
 
|-
 
| Transparent||0x988403f9
 
|-
 
| UVOffset||0x57582869
 
|-
 
| UVScale||0x159ba53e
 
|-
 
| UVScales||0x420520e9
 
|-
 
| UVScrollSpeed||0xf2eea6ec
 
|-
 
| UVTiling||0x773cab85
 
|-
 
| VertexColorScale||0xa2fd73ca
 
|-
 
| WaterScrollSpeedLayer1||0xafa11436
 
|-
 
| WaterScrollSpeedLayer2||0xafa11435
 
|-
 
| WindSpeed||0x66e9b6bc
 
|-
 
| WindStrength||0xbc4a2544
 
|-
 
| ???||0x209b1c8e
 
|-
 
| ???||0xdaa9532d
 
|-
 
| ???||0x29bcdd1f
 
|-
 
| ???||0x2eb8e9d4
 
|-
 
| HaloRamp||0x84f6e0fb
 
|-
 
| HaloBlur||0xc3ad4f50
 
|-
 
| HaloHighColor||0xd4043258
 
 
|}
 
|}
  
 +
===Notes===
 +
# Valid texture reference types include { [[Sims 3:0x033A1435|TXTC]], [[Sims 3:0x00B2D882|DDS]],  [[Sims 3:0x63A33EA7|ANIM]] } resource types.
  
{{TS3ModdingHeader}}
+
{{TS3AdvancedModdingHeader}}

Latest revision as of 17:56, 26 February 2013

Modding Reference by Category

Sims 3 :DBPF | File Types | RCOL(Scene) | Catalog Resource | String Table | Key Table | TS3 Programmer's Reference 

Material Definition - MATD
TypeID:0x01D0E75D
Game Version:The Sims 3



[edit] Overview

This is a Sims 3:RCOL chunk.

DWORD 'MATD'
DWORD version
DWORD		// Material name hash or 0
DWORD		// Shader name hash or 0
DWORD length	// Length from 'MTRL' or 'MTNF'; 16+(16*count)+(4*parmcount)
--if version < 0x103
	DWORD 'MTRL'   // Used instead of MTNF if the internal list of resource keys is null.
	DWORD 0
	WORD
	WORD
--else if version >= 0x103
	DWORD IsVideoSurface	// boolean
	DWORD IsPaintingSurface //
	DWORD 'MTNF'		// Used if the internal list of resource keys is non-null.
				// Note that it may still just be of zero length.
	DWORD 0
	DWORD datasize	// Size of the data block (total parms*4)

DWORD count
--count repeats of
	DWORD param name hash	// Valid values depend on the Shader used
				// see ShaderParams for another list
	DWORD			// Data type code
	DWORD data size (in DWORDS)
	DWORD data offset	// From 'MTRL' or 'MTNF'

--count repeats of
	--data count repeats of  
		--insert data // see Param Datatypes for possible typecode/size combos
		--insert padding to DWORD boundry

[edit] Param DataTypes

TypeCodes
Id Description
1 Float
2 Int
4 Texture
DataType
TypeCode Size(in DWORDs) Data Description
1 1 Float
1 2 Vector2
1 3 Vector3
1 4 Vector4
2 1 Int
2 * Int[]
4 4 Texture A resource key index. In most cases it is a RCOL reference, however in the case of GEOM, it is a Key Table index. This data is padded to 16 bytes with 00.
4 5 TextureKey ResourceKey(in ITG order) padded to 20 bytes with 00

[edit] Notes

  1. Valid texture reference types include { TXTC, DDS, ANIM } resource types.
Modding Reference by Category

Sims 3 :DBPF | File Types | RCOL(Scene) | Catalog Resource | String Table | Key Table | TS3 Programmer's Reference 

Personal tools
Namespaces

Variants
Actions
Navigation
game select
Toolbox