Difference between revisions of "Sims 3:0x01D0E75D"

From SimsWiki
Jump to: navigation, search
(Material Definition)
(Remove redundant tables that no one is maintaining. See Sims 3:Shaders. General tidy-up of the rest of the page.)
 
(37 intermediate revisions by 7 users not shown)
Line 1: Line 1:
[[Sims 3:Main Page]] -> [[Sims 3:PackedFileTypes]]
+
{{TS3AdvancedModdingHeader}}
<br/>[[Sims 3:Main Page]] -> [[Sims 3:RCOL]]
+
{{TS3Resource
<hr/>
+
|name=Material Definition - MATD
==Material Definition==
+
|typeid=0x01D0E75D
This is a [[Sims_3:RCOL]] chunk.
+
|expansion=The Sims 3
  DWORD // 'MATD'
+
}}
 +
<br clear="all">
 +
 
 +
==Overview==
 +
This is a [[Sims 3:RCOL]] chunk.
 +
  DWORD 'MATD'
 
  DWORD version
 
  DWORD version
  DWORD // Either some sort of hash or 0 - Material name?
+
  DWORD // Material name hash or 0
  DWORD // Either some sort of hash or 0 - Shader type
+
  DWORD // [[Sims 3:Shaders|Shader]] name hash or 0
  DWORD length // Length of data that follows
+
  DWORD length // Length from 'MTRL' or 'MTNF'; 16+(16*count)+(4*parmcount)
  IF version >= 0x301
+
--if version < 0x103
  DWORD
+
DWORD 'MTRL'  // Used instead of MTNF if the internal list of resource keys is null.
  DWORD
+
DWORD 0
  Various data
+
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 [[Sims 3:Shaders|Shader]] used
 +
// see [[Sims 3:Shaders\Params|ShaderParams]] for another list
 +
DWORD // [[Sims 3:0x01D0E75D#Param DataTypes|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 [[Sims 3:0x01D0E75D#Param DataTypes|Param Datatypes]] for possible typecode/size combos
 +
--insert padding to DWORD boundry
  
The various data can be one of the following
+
==Param DataTypes==
if version < 0x103
+
{|border="0" cellpadding="4"
  DWORD // 'MTRL'
+
|- valign="top"
if version >= 0x103
+
|
  DWORD // 'MTNF'
+
{| class="wikitable" border="1"
DWORD
+
! colspan="3" | TypeCodes
if version < 0x103
+
  WORD
+
  WORD
+
if version >= 0x103
+
  DWORD datasize // Size of the following data block
+
DWORD count
+
count repeats of
+
  DWORD field type hash // Not sure of the sources or names
+
  DWORD data type // 1 = float, 2 = dword, 4 = dword
+
  DWORD data count
+
  DWORD offset // From the start of MTRL
+
count repeats of
+
  data count repeats of
+
    type defined data
+
    padding to DWORD boundry
+
===Shader Types===
+
Shader types have been observed as the following values (Under construction)
+
{|
+
! Data
+
! Hash
+
 
|-
 
|-
|Counters||0xa4172f62
+
! Id
 +
! Description
 
|-
 
|-
|phong-alpha||0xfc5fc212
+
| 1 || Float
 
|-
 
|-
|GlassForPortals||0x81dd204d
+
| 2 || Int
 
|-
 
|-
|additive||0x5af16731
+
| 4 || Texture
 
|-
 
|-
|DropShadow||0xc09c7582
+
|}
 +
|
 +
{| class="wikitable" border="1"
 +
! colspan="4" | DataType
 
|-
 
|-
|GlassForObjects||492eca7c
+
! TypeCode
|}
+
! Size(in DWORDs)
===Field Types===
+
Field types have been observed as the following values (Under construction)
+
{|
+
 
! Data
 
! Data
! Hash
+
! Description
 
|-
 
|-
| AlphaMaskThreshold||e77a2b60
+
| 1 || 1 || Float ||
 
|-
 
|-
| Ambient||0x04a5daa3
+
| 1 || 2 || Vector2 ||
|-
+
| Diffuse||0x637daa05
+
 
|-
 
|-
| DiffuseMap||0x6cc0fd85
+
| 1 || 3 || Vector3 ||
 
|-
 
|-
| DiffuseUVScale||0x2d4e507e
+
| 1 || 4 || Vector4 ||
 
|-
 
|-
| DiffuseUVSelector||0x91eebaff
+
| 2 || 1 || Int ||
 
|-
 
|-
| Emission||0x3bd441a0
+
| 2 || * || Int[] ||
 
|-
 
|-
| FresnelOffset||0xfb66a8cb
+
| 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.
 
|-
 
|-
| ImposterDetailTexture||0x56e1c6b2
+
| 4 || 5 || TextureKey|| [[Sims 3:Key_table|ResourceKey]](in ITG order) padded to 20 bytes with 00
 
|-
 
|-
| ImposterTexture||0xbdcf71c5
+
|}
|-
+
| ImposterTextureAOandSI||0x15c9d298
+
|-
+
| ImposterTextureWater||0xbf3fb9fa
+
|-
+
| MaskHeight||0x849cdadc
+
|-
+
| MaskWidth||0x707f712f
+
|-
+
| NormalMap||0x6e56548a
+
|-
+
| NormalMapScale||0x3c45e334
+
|-
+
| NormalUVScale||0xba2d1ab9
+
|-
+
| Reflective||0x73c9923e
+
|-
+
| Shininess||0xf755f7ff
+
|-
+
| Specular||0x2ce11842
+
|-
+
| SpecStyle||0x9554d40f
+
|-
+
| SpecularMap||0xad528a60
+
|-
+
| SpecularUVScale||0xf12e27c3
+
|-
+
| SpecularUVSelector||0xb63546ac
+
|-
+
| TextureSpeedScale||0x583df357
+
|-
+
| Transparency||0x05d22fd3
+
|-
+
| Transparent||0x988403f9
+
|-
+
| UVScrollSpeed||0xf2eea6ec
+
|-
+
| UVScales||0x420520e9
+
 
|}
 
|}
  
 +
===Notes===
 +
# Valid texture reference types include { [[Sims 3:0x033A1435|TXTC]], [[Sims 3:0x00B2D882|DDS]],  [[Sims 3:0x63A33EA7|ANIM]] } resource types.
  
<hr/>
+
{{TS3AdvancedModdingHeader}}
[[Sims 3:Main Page]] -> [[Sims 3:PackedFileTypes]]
+
<br/>[[Sims 3:Main Page]] -> [[Sims 3:RCOL]]
+

Latest revision as of 12: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