-
Notifications
You must be signed in to change notification settings - Fork 0
JBA File Structure
- File Header
- Block Header, one per block
- Run-time initialized values, 4 bytes per block
- Array of Bone Data structs, 128-byte aligned, length equals number of bones
- Array of Block Data structs, 128-byte aligned, length equals number of blocks
- World Space, 128-byte aligned
- Bone Names
Offset (h) | Type | Count | Description | Values |
---|---|---|---|---|
00 | uint32 | 1 | Run-time initialized value | 0 |
04 | float | 1 | Animation length | N/A |
08 | float | 1 | FPS | 15.0,30.0 |
0C | uint32 | 1 | Number of blocks | 1-20 |
10 | uint32 | 2 | Run-time initialized values | 0 |
18 | uint32 | 1 | Number of bones | N/A |
1C | uint32 | 1 | Unknown | 0 |
20 | uint32 | 1 | Pointer to keyframes (run-time initialized) | 0FFFFFFFh |
24 | uint32 | 1 | Unknown | 0 |
Offset (h) | Type | Count | Description | Values |
---|---|---|---|---|
00 | uint32 | 1 | Starting frame | N/A |
04 | uint32 | 1 | Size of the data structure | N/A |
Offset (h) | Type | Count | Description | Values |
---|---|---|---|---|
00 | float | 3 | Translation stride | N/A |
0C | float | 3 | Translation base | N/A |
18 | float | 3 | Rotation stride | N/A |
2A | float | 3 | Rotation base | N/A |
Offset (h) | Type | Count | Description | Values |
---|---|---|---|---|
00 | uint32 | 1 | Number of bones | N/A |
04 | uint32 | 1 | Unknown | 0 |
08 | uint32 | 4 * number of bones | Keyframe layout | N/A |
N/A | uint16 | N/A | Keyframes (48-bit quaternion + optional 32-bit translation) | N/A |
Keyframe layout contains four integer values per bone, where the first value represents a number of rotation poses and the third value represents a number of translation poses (optional).
Keyframes are stored according to this layout:
- Bone 0: keyframe 0 rotation
- Bone 0: keyframe 1 rotation
- Bone 0: keyframe 0 translation (optional)
- Bone 0: keyframe 1 translation (optional)
- Bone 1: keyframe 0 rotation
- Bone 1: keyframe 1 rotation
- Bone 1: keyframe 0 translation (optional)
- Bone 1: keyframe 1 translation (optional)
Rotation (on disk): Sign(1)-X(15)-Y(16)-Z(16)
Translation (on disk): Z(10)-Y(11)-X(11)
Decoding in Python:
val = ruint32(file)
pos_x = base.x + (val >> 21) * stride.x
pos_y = base.y + ((val >> 10) & 0x7ff) * stride.y
pos_z = base.z + (val & 0x3ff) * stride.z
pos = Vector((pos_x, pos_y, pos_z))
rot_x_raw = ruint16(file)
rot_x = base.x + (rot_x_raw & 0x7fff) * stride.x
rot_y = base.y + ruint16(file) * stride.y
rot_z = base.z + ruint16(file) * stride.z
rot_dot = rot_x * rot_x + rot_y * rot_y + rot_z * rot_z
rot_w = 0.0 if rot_dot > 1.0 else math.sqrt(1.0 - rot_dot)
if rot_x_raw & 0x8000:
rot_w *= -1.0
rot = Quaternion((rot_w, rot_x, rot_y, rot_z))
Rotations and translations are in the "morpheme" space. Below is its transformation matrix:
1000.0 0.0 0.0 0.0
0.0 0.0 -1000.0 0.0
0.0 1000.0 0.0 0.0
0.0 0.0 0.0 1.0
Offset (h) | Type | Count | Description | Values |
---|---|---|---|---|
00 | uint32 | 1 | Unknown | 0 |
04 | float | 1 | FPS | 15.0/30.0 |
08 | float | 3 | Translation stride | N/A |
14 | float | 3 | Translation base | N/A |
20 | float | 3 | Rotation stride | N/A |
2C | float | 3 | Rotation base | N/A |
38 | uint32 | 1 | Number of rotations | N/A |
3C | uint32 | 1 | Pointer to rotations (run-time initialized) | 0 |
40 | uint32 | 1 | Number of translations | N/A |
44 | uint32 | 1 | Pointer to translations (run-time initialized) | 0 |
48 | uint16 | 3 * number of rotations | Compressed rotations (run-time initialized?) | N/A |
N/A | uint32 | Number of translations | Compressed translations, 4-byte aligned | N/A |
Offset (h) | Type | Count | Description | Values |
---|---|---|---|---|
00 | uint32 | 1 | Number of names | N/A |
04 | uint32 | 1 | Unknown | N/A |
08 | uint32 | 1 | Offset to indices | 20 |
0C | uint32 | 1 | Offset to offsets | 20+4*(number of names) |
10 | uint32 | 1 | Offset to names | 20+8*(number of names) |
14 | uint32 | number of names | Indices | 0-N |
N/A | uint32 | number of names | Offsets into the names array | N/A |
N/A | char | N/A | Null-terminated names | N/A |
We do not condone the usage of our tools for malicious intent, including: exploits, harassment of others, or anything else that may violate EA/Bioware's EULA, TOS, DSA, Privacy Policy Copyrights, Trademarks, or anything else illegal. We will not be held accountable for your actions, and will act against you if nessesary.
- Home.
- State of Play September 2024
- Getting Help:
IMPORTING SWTOR MODELS INTO BLENDER: A BRIEF OVERVIEW.
Check this intro first. Afterwards, you can jump directly to the guides on extracting PCs, NPCs and others.
No need to read this section right now: each extracting/assembling guide explains its required tools anyway.
- Slicers GUI (Windows app).
-
Blender 3D (multiplatform app):
Which version. How to learn. Installing our Add-ons. -
SWTOR .gr2 Objects Importer Add-on.
Required by all the other add-ons. - SWTOR Character Assembler Add-on.
- SWTOR Area Assembler Add-on.
-
ZeroGravitas SWTOR Tools Add-on.
Includes the Character and Area Assemblers plus other diverse tools.
-
Jedipedia.net:
- SWTOR Database.
- File Reader.
- World Viewer.
-
TORCommunity.com:
- SWTOR Database.
- Character Designer.
- NPC viewer's Exporter.
- EasyMYP (Windows app).
- Noesis (Windows app).
READ THE BROAD STROKES FIRST: YOU'LL SEE IT'S EASIER THAN YOU THINK!
-
The steps:
- Installing Slicers GUI and extracting SWTOR's game assets.
-
Using TORCommunity's Character Designer to export Player Characters.
- IF ARMOR SELECTION SEARCH IS DOWN: workaround to manually specify Armor Sets.
- Using TORCommunity's NPCs Database to export Non Playable Characters.
- Using our Blender add-ons to auto-assemble the model.
- Rigging the character for posing and animation
- Applying SWTOR animations to the character.
-
Extra steps that require manual work and some knowledge of SWTOR's assets:
-
Making capes and hair work, manually and through Cloth Simulation.
-
Attaching weapons and other objects to a character with a SWTOR rig.
-
Attaching weapons and other objects to a character with a custom rig.
-
Baking the models' textures and exporting to other apps:
- Baking with Legacy SWTOR materials and modern ones.
- Baking the multiple materials of an object into a single one.
- Exporting to VRChat.
- Exporting to Star Wars Battlefront II.
- Exporting to Unreal Engine.
- Exporting to Garry's Mod.
- Exporting to Tabletop Simulator.
-
3D Printing:
-
- Locating armor parts' assets
- Locating weapons' assets.
- Assigning materials and textures to environmental and architectural elements, furniture, props, ships, vehicles and weapons.
- Assembling multi-part assets (Decorations, Rooms, etc).
- Generic guide to importing objects and assigning materials (Legacy Add-on-based. Needs updating).
- Snippets.
- Improving and customizing our SWTOR models and materials.
- Other Extracting Strategies (needs updating).
- SWTOR Materials recipes:
Modding isn't working at the moment due to SWTOR's change to a 64bit codebase. It's going to take a while 🙁.
- Overview.
- Tools.
- Other techniques:
- Modding SWTOR textures with Special K (CAUTION).
- Overview.
- Tools.
- File Formats
- A look at SWTOR's Materials and Texture Files.