Difference between revisions of "Sims 3:0x067CAA11"

From SimsWiki
Jump to: navigation, search
m (minor correction)
(Format)
 
(6 intermediate revisions by 2 users not shown)
Line 1: Line 1:
[[Sims 3:Main Page]] -> [[Sims 3:PackedFileTypes]]
+
{{TS3AdvancedModdingHeader}}
<hr/>
+
{{TS3Resource
 +
|name=Blend Geometry - BGEO
 +
|typeid= 0x067CAA11
 +
|expansion=The Sims 3
 +
}}
 +
<br clear="all">
  
BGEO (Body Geometry)<br>
+
==Overview==
 
Researched by Karybdis
 
Researched by Karybdis
  
 
Here's the preliminary structure. Due to apparent invariance in some of the values, they cannot be decoded at the moment.
 
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
+
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. -- Cmar
  
 +
==Format==
 
<pre>
 
<pre>
 
DWORD - Magic (BGEO)
 
DWORD - Magic (BGEO)
Line 23: Line 29:
  
 
-Section 1 56 byte entries
 
-Section 1 56 byte entries
DWORD AgeGender Flags (invariant?)
+
DWORD AgeGender Flags (invariant for clothing)
 
DWORD FacialRegion/BodyRegion
 
DWORD FacialRegion/BodyRegion
--Section 1 Subentries (One for each LOD - first set is zeros if LOD 0 does not exist)
+
--Section 1 Subentries (One for each LOD - zeros if LOD does not exist)
DWORD Index of Last SubEntry WORD index (0 for first subentry) (First vertex number in LOD)
+
DWORD First vertex number in LOD  
DWORD Index to WORD Entries (Index in vertex list - count of vertices in LOD)
+
DWORD Number of vertex IDs in LOD
DWORD Index to S3 Entries (Index in morph deltas list - count of S3 sets of coordinates in LOD)
+
DWORD Count of S3 sets of coordinates in LOD
  
 
-WORD Entries (Vertex index and flag list)
 
-WORD Entries (Vertex index and flag list)
Line 34: Line 40:
  
 
-S3 Entries (vertex coordinates - see below **)
 
-S3 Entries (vertex coordinates - see below **)
WORD (vertex position or normal delta coordinate) (WORD with sign bit flipped)
+
WORD (X vertex position or normal delta coordinate) (WORD with sign bit flipped)
WORD (vertex position or normal delta coordinate) (WORD with sign bit flipped)
+
WORD (Y vertex position or normal delta coordinate) (WORD with sign bit flipped)
WORD (vertex position or normal delta coordinate) (WORD with sign bit flipped)
+
WORD (Z vertex position or normal delta coordinate) (WORD with sign bit flipped)
  
 
</pre>
 
</pre>
Line 57: Line 63:
 
- Vertex data in morph meshes is a list of 6 values per entry - 3 position, 3 normals.  
 
- 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 -  
 
- This is converted to a list of 3 values per entry -  
           for each vertex first the position, then the normals.
+
           for each vertex first the three position values, then the three normals values.
 
- All entries in which all three values are zero are dropped.  
 
- All entries in which all three values are zero are dropped.  
 
- Values are converted as follows: WORD = FLOAT * 2000 rounded to the nearest integer
 
- Values are converted as follows: WORD = FLOAT * 2000 rounded to the nearest integer
Line 67: Line 73:
  
 
-- contributed by Cmar
 
-- contributed by Cmar
 +
 +
{{TS3AdvancedModdingHeader}}

Latest revision as of 13:27, 18 February 2012

Modding Reference by Category

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

Blend Geometry - BGEO
TypeID:0x067CAA11
Game Version:The Sims 3



[edit] Overview

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. -- Cmar

[edit] Format

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 for clothing)
DWORD FacialRegion/BodyRegion
--Section 1 Subentries		(One for each LOD - zeros if LOD does not exist)
	DWORD First vertex number in LOD 
	DWORD Number of vertex IDs in LOD
	DWORD 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 (X vertex position or normal delta coordinate) (WORD with sign bit flipped)
	WORD (Y vertex position or normal delta coordinate) (WORD with sign bit flipped)
	WORD (Z 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 three position values, then the three normals values.
	- 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

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