Difference between revisions of "RCOL"

From SimsWiki
Jump to: navigation, search
(Auto-inserted from WakkaWikki)
 
(Reformatting)
Line 1: Line 1:
{{OldWikiEntry}} '''[Scenegraph File Format Specification]'''
+
{{OldWikiEntry}}  
- - - - - - - - - - - - - - - - - - - - - - - - - - - - -
+
==Scenegraph File Format Specification==
  
 
RCOL, or Scenegraph Resource Collection, is a Sims 2 data type
 
RCOL, or Scenegraph Resource Collection, is a Sims 2 data type
Line 30: Line 30:
 
TGIR (i.e. read 3 DWORDs per link, rather than  DWORDs).
 
TGIR (i.e. read 3 DWORDs per link, rather than  DWORDs).
  
''RCOL Header''
+
===RCOL Header===
- - - - - - - - - - - - - - - - - - - - - - - - - - - - -
+
 
+
 
<pre>
 
<pre>
 
; header
 
; header
Line 56: Line 54:
 
</pre>
 
</pre>
  
''Data Block''
+
===Data Block===
- - - - - - - - - - - - - - - - - - - - - - - - - - - - -
+
 
+
 
<pre>
 
<pre>
 
BYTE Block name length
 
BYTE Block name length
Line 67: Line 63:
 
</pre>
 
</pre>
  
'''[Data Section Specifications]'''
+
==Data Section Specifications==
- - - - - - - - - - - - - - - - - - - - - - - - - - - - -
+
 
+
 
Each block ID# has a unique block name. Following are links
 
Each block ID# has a unique block name. Following are links
 
to specifications for each known block type, by their TypeID
 
to specifications for each known block type, by their TypeID
 
and the translated type code (i.e. 0xAC4F8687/GMDC).
 
and the translated type code (i.e. 0xAC4F8687/GMDC).
  
 +
===Known Data Blocks===
 +
* [[FB00791E]] ANIM filetype
 +
* [[4D51F042]] CINE filetype
 +
* [[E519C933]] CRES filetype
 +
* [[AC4F8687]] GMDC filetype
 +
* [[7BA3838C]] GMND filetype
 +
* [[C9C81B9B]] LGHT filetype - Lighting (Ambient Light)
 +
* [[C9C81BA3]] LGHT filetype - Lighting (Directional Light)
 +
* [[C9C81BA9]] LGHT filetype - Lighting (Point Light)
 +
* [[C9C81BAD]] LGHT filetype - Lighting (Spot Light)
 +
* [[ED534136]] LIFO
 +
* [[FC6EB1F7]] SHPE
 +
* [[49596978]] TXMT aka MATD - Material Definition
 +
* [[1C4A276C]] TXTR
  
Known Data Blocks
+
===Internal data blocks===
[[FB00791E]] ANIM filetype
+
* [[e9075bc5]] cBoneDataExtension
[[4D51F042]] CINE filetype
+
* [[1cfeceb8]] cBoundingVolumeBuilder
[[E519C933]] CRES filetype
+
* [[dcdda078]] cCompactorBuilder
[[AC4F8687]] GMDC filetype
+
* [[6A836D56]] cDataListExtension
[[7BA3838C]] GMND filetype
+
* [[9bffc10d]] cIndexedMeshBuilder
[[C9C81B9B]] LGHT filetype - Lighting (Ambient Light)
+
* [[253d2018]] cLightRefNode
[[C9C81BA3]] LGHT filetype - Lighting (Directional Light)
+
* [[5ce7e026]] cProcessDeformationsBuilder
[[C9C81BA9]] LGHT filetype - Lighting (Point Light)
+
* [[65245517]] cShapeRefNode
[[C9C81BAD]] LGHT filetype - Lighting (Spot Light)
+
* [[9a809646]] cTagExtension
[[ED534136]] LIFO
+
* [[5d054225]] cTangentSpaceBuilder
[[FC6EB1F7]] SHPE
+
* [[65246462]] cTransformNode
[[49596978]] TXMT aka MATD - Material Definition
+
* [[2b70b86e]] cTSFaceGeometryBuilder
[[1C4A276C]] TXTR
+
* [[dca76dbb]] cViewerRefNode
 +
* [[0c152b8e]] cViewerRefNodeRecursive
  
Internal data blocks
+
===Misc data blocks. These blocks have block ID's of zero===
[[e9075bc5]] cBoneDataExtension
+
* [[cSGResource]]
[[1cfeceb8]] cBoundingVolumeBuilder
+
* [[cObjectGraphNode]]
[[dcdda078]] cCompactorBuilder
+
* [[cCompositionTreeNode]]
[[6A836D56]] cDataListExtension
+
* [[cReferentNode]]
[[9bffc10d]] cIndexedMeshBuilder
+
[[253d2018]] cLightRefNode
+
[[5ce7e026]] cProcessDeformationsBuilder
+
[[65245517]] cShapeRefNode
+
[[9a809646]] cTagExtension
+
[[5d054225]] cTangentSpaceBuilder
+
[[65246462]] cTransformNode
+
[[2b70b86e]] cTSFaceGeometryBuilder
+
[[dca76dbb]] cViewerRefNode
+
[[0c152b8e]] cViewerRefNodeRecursive
+
  
 +
==Remaining RCOL Unknowns==
 +
* CINE  - Unknown 1(first), Unknown 2, Unknown 3.1
 +
* GMDC - (purpose & effect for Submodel in compositions(linkages)), corrupt[obj.pack/lots]
 +
* GMND - unknown3
 +
* cLight - unknown byte
 +
* 253d2018 cLightRefNode - Ushort1,Uint1, B1,B2,B3,B4,B5
 +
* SHPE - (LOD listing entry purpose)
 +
* 65245517 cShapeRefNode - U1,U2,U3,U4,U5,U6, UINT COLL, BYTE COLL
 +
* TXTR - Unk2
 +
* e9075bc5 cBoneDataExtension - 1.1,1.2,1.3,1.4,2.1,2.2,2.3,2.4
 +
* 2b70b86e cTSFaceGeometryBuilder - Unk1,2,3, Unk1(per set)
  
misc data blocks
+
* ANIM - LOTS (mostly P5/P6)
these blocks have block ID's of zero
+
* 9bffc10d cIndexedMeshBuilder - LOTS
[[cSGResource]]
+
* dca76dbb cViewerRefNode - LOTS
[[cObjectGraphNode]]
+
* 0c152b8e cViewerRefNodeRecursive - LOTS
[[cCompositionTreeNode]]
+
[[cReferentNode]]
+
  
====Remaining RCOL Unknown Stuff====
 
CINE  - Unknown 1(first), Unknown 2, Unknown 3.1
 
GMDC - (purpose & effect for Submodel in compositions(linkages)), corrupt[obj.pack/lots]
 
GMND - unknown3
 
cLight - unknown byte
 
253d2018 cLightRefNode - Ushort1,Uint1, B1,B2,B3,B4,B5
 
SHPE - (LOD listing entry purpose)
 
65245517 cShapeRefNode - U1,U2,U3,U4,U5,U6, UINT COLL, BYTE COLL
 
TXTR - Unk2
 
e9075bc5 cBoneDataExtension - 1.1,1.2,1.3,1.4,2.1,2.2,2.3,2.4
 
2b70b86e cTSFaceGeometryBuilder - Unk1,2,3, Unk1(per set)
 
  
ANIM - LOTS (mostly P5/P6)
+
==Update History==
9bffc10d cIndexedMeshBuilder - LOTS
+
(Spec Updated by Karybdis on Jan. 1, 2006)<br/>
dca76dbb cViewerRefNode - LOTS
+
0c152b8e cViewerRefNodeRecursive - LOTS
+
 
+
 
+
'''[Update History]'''
+
-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
+
(Spec Updated by Karybdis on Jan. 1, 2006)
+
 
(Spec updated by DarkMatter on Dec. 4, 2004)
 
(Spec updated by DarkMatter on Dec. 4, 2004)
-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
 
  
'''[Terminology Key]'''
+
==Terminology Key==
-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
+
;BYTE  : Smallest unit of data, 8 bits
BYTE  - Smallest unit of data, 8 bits
+
;WORD  : Two bytes, or 16 bits
WORD  - Two bytes, or 16 bits
+
;DWORD : Four bytes, or 32 bits
DWORD - Four bytes, or 32 bits
+
;QWORD : Eight bytes, or 64 bits
QWORD - Eight bytes, or 64 bits
+
;GUID  : Sixteen bytes, or 128 bits
GUID  - Sizteen bytes, or 128 bits
+
  
PRIOR - Notation used when the length of a  
+
;PRIOR : Notation used when the length of a data element is equal to the value of the previous data element.
  data element is equal to the value
+
  of the previous data element.
+
 
    
 
    
ARBIT - Notation used when the length of a
+
;ARBIT : Notation used when the length of a data element or data block is of arbitrary length, and the details are defined elsewhere.
  data element or data block is of
+
 
  arbitrary length, and the details
+
;[[7BITSTR]] : Notation used for a string that has its length encoded 7 bits at a time.
  are defined elsewhere.
+
  
[[7BITSTR]] - Notation used for a string that
+
;ZDSTR : Zero Delimited String. Notation used for a string that is ended by a 0 byte.
  has its length encoded 7 bits at a time.
+
  See: [[7BITSTR]]
+
  
ZDSTR - Zero Delimited String
+
==C# Data Type Key==
  Notation used for a string that is ended by a 0 byte.
+
;byte : unsigned byte
 +
;sbyte : signed byte
  
'''[C# Data Type Key]'''
+
;short : 16bit signed integer
-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
+
;ushort : 16but unsigned integer
byte - unsigned byte
+
sbyte - signed byte
+
  
short - 16bit signed integer
+
;int : 32bit signed integer
ushort - 16but unsigned integer
+
;uint : 32bit unsigned integer
  
int - 32bit signed integer
+
;long : 64bit signed integer
uint - 32bit unsigned integer
+
;ulong : 64bit unsigned integer
  
long - 64bit signed integer
+
;float : 32bit floating point number
ulong - 64bit unsigned integer
+
;double : 64bit floating point number
  
float - 32bit floating point number
+
;char : UNICODE character (16bit)
double - 64bit floating point number
+
  
char - UNICODE character (16bit)
+
;string : UNICODE character string
  
string - UNICODE character string
+
[[Category:Modding]]
-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=- [[Category:Modding]]
+

Revision as of 04:20, 10 September 2006

This article is imported from the old MTS2 wiki. You can help Sims2Wiki by cleaning it up. It's original page with comments can be found at http://old_wiki.modthesims2.com/RCOL

Contents

Scenegraph File Format Specification

RCOL, or Scenegraph Resource Collection, is a Sims 2 data type that contains numerous, arbitrary data blocks containing a variety of information.

This information is primarily used for objects, animation, textures, and the like. The file is composed of a header (somewhat confusing), and one or more data blocks. Each data block can have multiple sections or can even be recursive in nature.

After reading the header and the index, each data block must be read according to its own specification. The specifications for each possible type of data block follow the first part of this specification.

IMPORTANT NOTES: To further explain a strange quirk of this file type. The header has two possible configurations that are not readily apparent. In the specification below, the first two WORDs, "Language" and "String Format", may not be present. If, when parsing raw data of an RCOL, the first 4 bytes when read as a DWORD are not 0xFFFF0001, then reading must BACKTRACK, and reread the first 4 bytes as the "File Links" DWORD. If, when parsing, you DID backtrack and the first two WORDs are not present, then when reading "File Links", you must read only a TGI, not a TGIR (i.e. read 3 DWORDs per link, rather than DWORDs).

RCOL Header

; header
DWORD   	Version Mark    ; Optional - Always 0100FFFF. If present, use TGIR instead of TGI below
DWORD		File Links 	; Defines number of repetitions that follow
LOOP				; repeat "File Links" times
  DWORD		GroupID
  DWORD		InstanceID
  DWORD		ResourceID 	; Only appears if first two WORDs are 0x01/0xFF
  DWORD		TypeID
ENDLOOP

; Index
DWORD	ItemCount 		
LOOP				; repeat "ItemCount" times
  DWORD		RCOL ID
ENDLOOP

LOOP				; repeat "ItemCount" times
  ARBIT		Data Block	; See individual data blocks for further file structure
ENDLOOP

Data Block

BYTE		Block name length
PRIOR		Block name
DWORD		Block RCOL ID (Referenced in Index)
DWORD 		Block Version
ARBIT		Data Section

Data Section Specifications

Each block ID# has a unique block name. Following are links to specifications for each known block type, by their TypeID and the translated type code (i.e. 0xAC4F8687/GMDC).

Known Data Blocks

Internal data blocks

Misc data blocks. These blocks have block ID's of zero

Remaining RCOL Unknowns

  • CINE - Unknown 1(first), Unknown 2, Unknown 3.1
  • GMDC - (purpose & effect for Submodel in compositions(linkages)), corrupt[obj.pack/lots]
  • GMND - unknown3
  • cLight - unknown byte
  • 253d2018 cLightRefNode - Ushort1,Uint1, B1,B2,B3,B4,B5
  • SHPE - (LOD listing entry purpose)
  • 65245517 cShapeRefNode - U1,U2,U3,U4,U5,U6, UINT COLL, BYTE COLL
  • TXTR - Unk2
  • e9075bc5 cBoneDataExtension - 1.1,1.2,1.3,1.4,2.1,2.2,2.3,2.4
  • 2b70b86e cTSFaceGeometryBuilder - Unk1,2,3, Unk1(per set)
  • ANIM - LOTS (mostly P5/P6)
  • 9bffc10d cIndexedMeshBuilder - LOTS
  • dca76dbb cViewerRefNode - LOTS
  • 0c152b8e cViewerRefNodeRecursive - LOTS


Update History

(Spec Updated by Karybdis on Jan. 1, 2006)
(Spec updated by DarkMatter on Dec. 4, 2004)

Terminology Key

BYTE  
Smallest unit of data, 8 bits
WORD  
Two bytes, or 16 bits
DWORD 
Four bytes, or 32 bits
QWORD 
Eight bytes, or 64 bits
GUID  
Sixteen bytes, or 128 bits
PRIOR 
Notation used when the length of a data element is equal to the value of the previous data element.
ARBIT 
Notation used when the length of a data element or data block is of arbitrary length, and the details are defined elsewhere.
7BITSTR 
Notation used for a string that has its length encoded 7 bits at a time.
ZDSTR 
Zero Delimited String. Notation used for a string that is ended by a 0 byte.

C# Data Type Key

byte 
unsigned byte
sbyte 
signed byte
short 
16bit signed integer
ushort 
16but unsigned integer
int 
32bit signed integer
uint 
32bit unsigned integer
long 
64bit signed integer
ulong 
64bit unsigned integer
float 
32bit floating point number
double 
64bit floating point number
char 
UNICODE character (16bit)
string 
UNICODE character string
Personal tools
Namespaces

Variants
Actions
Navigation
game select
Toolbox