Sims 3:0x067CAA11

From SimsWiki
Revision as of 12:29, 15 September 2009 by Cmar (Talk | contribs)

Jump to: navigation, search

Sims 3:Main Page -> Sims 3:PackedFileTypes


BGEO (Body Geometry)
Researched by Karybdis

Here's the preliminary structure. Due to apparent invariance in some of the values, they cannot be decoded at the moment.

The BGEO files are the morph files used in game - they are a combined and compressed form of all three LOD meshes for a given morph. Only the body part BGEO files have been completely researched as of now - may not be accurate for face files. -- Cmar

DWORD - Magic (BGEO)
DWORD - Version (768 or 0x00030000)
DWORD - Section 1 Count (56 bytes each)
DWORD - Section 1 SubEntry count (0x04, invariant?)
DWORD - Section 2 Count (Words)
DWORD - Section 3 Count (6 BYTES)
DWORD - Section 1 Pre-SubEntry size (0x08, invariant?)
DWORD - Section 1 SubEntry entry size (0x0C, invariant?)
DWORD - Section 1 offset (from beginning)
DWORD - Section 2 offset (from beginning)
DWORD - Section 3 offset (from beginning)

-Section 1 56 byte entries
DWORD AgeGender Flags (invariant?)
DWORD FacialRegion/BodyRegion
--Section 1 Subentries		(One for each LOD - first set is zeros if LOD 0 does not exist)
	DWORD Index of Last SubEntry WORD index (0 for first subentry) (First vertex number in LOD)
	DWORD Index to WORD Entries (Index in vertex list - count of vertices in LOD)
	DWORD Index to S3 Entries (Index in morph deltas list - count of S3 sets of coordinates in LOD)

-WORD Entries (Vertex index and flag list)
	WORD (encoded pointers to next vertex entry with data flags - see below *)

-S3 Entries (vertex coordinates - see below **)
	WORD (vertex position or normal delta coordinate) (WORD with sign bit flipped)
	WORD (vertex position or normal delta coordinate) (WORD with sign bit flipped)
	WORD (vertex position or normal delta coordinate) (WORD with sign bit flipped)

Much thanks to Rick for figuring out Section1 parsing structure (Karybdis)

* Word entries. List of pointers and flags for vertices, sequential by vertex number for all LODs.
	Bits 2-15: Offset to position of vertex data in S3 vertex delta coordinates list. 
                  (How far forward or back to move in list to this vertex)
	- offset above points to the last position coordinates for the vertex that appear in the list. 
          (Many vertexes are duplicated.)
	- Zero if vertex data is not present in the S3 list, unless the vertex is the first in a LOD.
	- When the LOD changes (first vertex in a LOD) add the count of S3 coordinate entries in the 
          previous LOD. (List pointer moves by the number in the third Section 1 DWORD for the previous LOD.)
	Bit 1: Flag - one if normal data exists, zero if not
	Bit 0: Flag - one if position data exists, zero if not

** S3 Entries. Three WORDS giving the delta values for position or normal coordinates.
	- Vertex data in morph meshes is a list of 6 values per entry - 3 position, 3 normals. 
	- This is converted to a list of 3 values per entry - 
          for each vertex first the position, then the normals.
	- All entries in which all three values are zero are dropped. 
	- Values are converted as follows: WORD = FLOAT * 2000 rounded to the nearest integer
	- Very small values drop out to zero but remain in the list. 
          I've been unable to duplicate 100% of the values exactly due to rounding error, 
          but the differences are too small to matter. 
	- Just to make things confusing, the sign bit (bit 15) is flipped. 

-- contributed by Cmar

Personal tools
Namespaces

Variants
Actions
Navigation
game select
Toolbox