• This is a reminder of 3 IMPORTANT RULES:

    1- External self-promotion websites or apps are NOT allowed here, like Discord/Twitter/Patreon/etc.

    2- Do NOT post in other languages. English-only.

    3- Crack/Warez/Piracy talk is NOT allowed.

    Breaking any of the above rules will result in your messages being deleted and you will be banned upon repetition.

    Please, stop by this thread SoccerGaming Forum Rules And Guidelines and make sure you read and understand our policies.

    Thank you!

RX3 file format research thread

Dmitri

Reserves
Continuing my research on FIFA04-FIFA10 .o models, I will make some notes on FIFA11-FIFA16 .rx3 files.

RX3 general file structure
The file starts with a header:
Code:
struct Rx3Header { // sizeof() = 16 bytes
    char rx3id[3]; // "RX3"
    char endian; // 'b' - big-endian, 'l' - little-endian
    unsigned int version; // file/format version (4)
    unsigned int totalSize; // total file size
    unsigned int numberChunks; // number of sections
}
The header is followed with chunk headers:
Code:
struct Rx3Chunk { // sizeof() = 16 bytes
    unsigned int type; // chunk name hash, see Rx3ChunkHash
    unsigned int offset; // offset in file to section data
    unsigned int size; // size of data in bytes
    unsigned int padding; // (0)
}
Chunk hashes:
Code:
enum Rx3ChunkHash : unsigned int { // sizeof() = 4 bytes
    RX3_CHUNK_TEXTURE_BATCH = 1808827868, // "texturebatch"
    RX3_CHUNK_TEXTURE = 2047566042, // "texture"
    RX3_CHUNK_VERTEX_BUFFER = 5798561, // "vb"
    RX3_CHUNK_INDEX_BUFFER_BATCH = 582139446, // "ibbatch"
    RX3_CHUNK_INDEX_BUFFER = 5798132, // "ib"
    RX3_CHUNK_BONE_REMAP = 255353250, // "boneremap"
    RX3_CHUNK_ANIMATION_SKIN = 3751472158, // "animationskin"
    RX3_CHUNK_EDGE_MESH = 1843792843, // "edgemesh"
    RX3_CHUNK_SIMPLE_MESH = 3566041216, // "simplemesh"
    RX3_CHUNK_VERTEX_FORMAT = 3263271920, // "vertexformat"
    RX3_CHUNK_NAME_TABLE = 1285267122, // "nametable"
    RX3_CHUNK_LOCATION = 685399266, // "location"
    RX3_CHUNK_HOTSPOT = 4116388378, // "hotspot"
    RX3_CHUNK_MATERIAL = 123459928, // "material"
    RX3_CHUNK_COLLISION = 4185470741, // "collision"
    RX3_CHUNK_COLLISION_TRIMESH = 4034198449, // "collisiontrimesh"
    RX3_CHUNK_SCENE_INSTANCE = 2116321516, // "sceneinstance"
    RX3_CHUNK_SCENE_LAYER = 230948820, // "scenelayer"
    RX3_CHUNK_SCENE_ANIMATION = 2360999927, // "sceneanimation"
    RX3_CHUNK_MORPH_INDEXED = 3247952176, // "morphindexed"
    // since FIFA 15
    RX3_CHUNK_SKELETON = 1881640942, // "skeleton"
    RX3_CHUNK_CLOTH_DEF = 283785394, // "clothdef"
    // since FIFA 16
    RX3_CHUNK_QUAD_INDEX_BUFFER_BATCH = 341785025, // "quadibbatch"
    RX3_CHUNK_QUAD_INDEX_BUFFER = 191347397, // "qib"
    RX3_CHUNK_BONE_NAME = 137740398, // "bonename"
    RX3_CHUNK_ADJACENCY = 899336811 // "adjacency"
};

Chunk data format is different for each chunk type.
So in general, RX3 file consists of file header, chunk headers and chunk data.
Depending on file content (texture container/simple model/hierarchical model/skinned model), a different list of sections is present in the file.

Texture containers
Texture containers (.rx3) usually consist of these chunks:
Code:
RX3_CHUNK_TEXTURES_HEADER
RX3_CHUNK_TEXTURE (for each texture in container)
RX3_CHUNK_NAMES
Texture containers for kits may also include RX3_CHUNK_HOTSPOT section.

RX3_CHUNK_TEXTURES_HEADER
This chunk contains a list of texture headers (basic information about texture) for each texture in the container.
Code:
struct Rx3ChunkTexturesHeader { // sizeof() = 16 bytes
    unsigned int texturesCount; // number of textures in container
    unsigned int unknown[3]; // maybe padding (0)
}
This header is followed by texture headers (texture header represents basic information about texture):
Code:
struct Rx3TextureHeader { // sizeof() = 16 bytes
    unsigned int totalSize; // total size of Rx3 Texture chunk data (including texture header and pixels data)
    unsigned char type; // Rx3TextureType
    unsigned char baseFormat; // Rx3TextureBaseFormat
    unsigned char dataFormat; // Rx3TextureDataFormat
    char padding; // (0)
    unsigned short width; // image width
    unsigned short height; // image height
    unsigned short depth; // faces count for cubemap or array textures (layers), 1 for 2D texture
    unsigned short mips; // mipmap levels count
};

Code:
enum Rx3TextureType : unsigned char { // sizeof() = 1 byte
    RX3_TEXTURE_1D = 0,
    RX3_TEXTURE_2D = 1,
    RX3_TEXTURE_3D = 2,
    RX3_TEXTURE_CUBE = 3, // texture consists of 6 faces
    RX3_TEXTURE_ARRAY = 4, // texture consists of multiple layers
    RX3_TEXTURE_RAW = 5
}

Code:
enum Rx3TextureBaseFormat : unsigned char { // sizeof() = 1 byte
    RX3_TEXFORMAT_DXT1 = 0,
    RX3_TEXFORMAT_DXT3 = 1,
    RX3_TEXFORMAT_DXT5 = 2,
    RX3_TEXFORMAT_ARGB8888 = 3, // R8G8B8A8
    RX3_TEXFORMAT_L8 = 4,
    RX3_TEXFORMAT_AL8 = 5,
    RX3_TEXFORMAT_RG8 = 6,
    RX3_TEXFORMAT_RAW = 7,
    RX3_TEXFORMAT_ATI2 = 7, // Switch; also known as BC5 compression
    RX3_TEXFORMAT_ATI1 = 12, // Switch; also known as BC4 compression
}

Code:
enum Rx3TextureDataFormat : unsigned char { // sizeof() = 1 byte, bitset
    RX3_TEXDATAFORMAT_LINEAR = 0x01,
    RX3_TEXDATAFORMAT_BIGENDIAN = 0x02,
    RX3_TEXDATAFORMAT_TILEDXENON = 0x04,
    RX3_TEXDATAFORMAT_SWIZZLEDPS3 = 0x08,
    RX3_TEXDATAFORMAT_REFPACKED = 0x80
}

RX3_CHUNK_TEXTURE
This chunk starts with texture header (Rx3TextureHeader), and continued with texture levels (mipmaps) for each texture face.
Texture level starts with a header:
Code:
struct Rx3TextureLevelHeader { // sizeof() = 16 bytes
    unsigned int dataStride; // pitch
    unsigned int dataHeight; // number of lines
    unsigned int dataSize; // size of pixels data (dataStride * dataHeight)
    unsigned int padding; // (0)
};
This header is then followed by pixels data.

In general, the layout for texture chunk is following:
Code:
Texture header
FOR number of faces in texture
FOR number of levels in texture
Texture level header
Texture level pixels
END FOR
END FOR

RX3_CHUNK_TEXTURE_BATCH
Collection of texture headers.
Code:
struct Rx3TextureBatchHeader { // sizeof() = 16 bytes
    unsigned int numberTextures;
    unsigned int padding[3]; // (0)
};
This header is then followed by texture headers (Rx3ChunkTexturesHeader).

RX3_CHUNK_NAMES
This chunk contains names for some objects. In texture containers it holds texture names. In other containers it might be used for other things.
The chunk data starts with a header:
Code:
struct Rx3ChunkNamesHeader { // sizeof() = 16 bytes
    unsigned int totalSize; // total size of this section
    unsigned int numStrings; // number of names
    unsigned int padding[2]; // (0)
}
Then the header is followed by name entries.
The name entry starts with a header:
Code:
struct Rx3NameEntryHeader { // sizeof() = 8 bytes
    unsigned int type; // chunk ID of the object this name refers to (RX3_CHUNK_TEXTURE for texture names)
    unsigned int size; // size of name string, including null-terminator
}
The header is followed by a null-terminated name string.

RX3_CHUNK_HOTSPOT
This chunk contains positions for placing special things on the kit - numbers, crest etc. The chunk data starts with a header:
Code:
struct Rx3SectionHotspotHeader { // sizeof() = 16 bytes
    unsigned int totalSize; // total size of this section
    unsigned char unknown1; // 1
    unsigned char numAreas; // number of areas
    unsigned char unknown2[2]; // maybe padding (0)
    unsigned int unknown3[2]; // maybe padding (0)
}
The header is followed by each area data:
Code:
string - area name, null-terminated string
unsigned char - number of hot-spots in area
for number of hot-spots in area
    string - hot-spot name, null-terminated string
    float[4] - hot-spot rectangle

Simple models

RX3_CHUNK_SIMPLE_MESH

There is a parameter inside the file which determines the primitive type (lines, tri-strips, tri-lists, etc.).
Code:
struct Rx3ChunkSimpleMesh { // sizeof() = 16 bytes
    unsigned short primitiveType;
    unsigned short unknown1; // usually 0
    unsigned short unknown2; // usually 0
    unsigned short unknown3; // usually 0
    int unknown[2]; // padding (0, 0)
};
Known primitive types:
Code:
4 - TRIANGLELIST
6 - TRIANGLESTRIP

Other posts:
http://www.soccergaming.com/index.p...t-research-thread.6467750/page-2#post-6600063
http://www.soccergaming.com/index.p...t-research-thread.6467750/page-3#post-6600089
 
Last edited:

Telega12

Reserves
Too many words. It is so easy, i am converted many faces from classic patch. You need OFW3 software for .o models(04-10)
 

Dmitri

Reserves
I'm mainly doing this for myself. This will help me in converting FIFA 19/20 Switch resources to FIFA Manager and older FIFA versions.

It is so easy, i am converted many faces from classic patch.
How many? Which tools did you use?

You need OFW3 software for .o models(04-10)
I must say you are very optimistic. Have you ever tried to create a face in .o format?
 
Last edited:

Dmitri

Reserves
PS
FIFA 11 files use different layout for .rx3 files.
FIFA 11 files are actually RenderWare 4 files (the engine which was used in NFS MostWanted 2012, SimCity and some other games) (\x89,R,W,4 header).
 

Telega12

Reserves
PS
FIFA 11 files use different layout for .rx3 files.
FIFA 11 files are actually RenderWare 4 files (the engine which was used in NFS MostWanted 2012, SimCity and some other games) (\x89,R,W,4 header).
for fifa 11 you must to extract cff, edit, and cff convert to obj, then obj to rx3. It would be more usefull to open model from rx2
 

Telega12

Reserves
I'm mainly doing this for myself. This will help me in converting FIFA 19/20 Switch resources to FIFA Manager and older FIFA versions.


How many? Which tools did you use?


I must say you are very optimistic. Have you ever tried to create a face in .o format?
I extract o.model, and do it for fifa 14-16 format
 

Dmitri

Reserves
And how many faces did you make? How much time did you spend on one face?

Well, I clearly see that we are talking about different things and we use different ranging for "complexity" and "amount".
For me an "easy" is when you need to make one click with the mouse and nothing else. And "many" means thousands and tens of thousands :D
 
Last edited:

jj88

Club Supporter
interesting research, I have tried to carry a head of fifa 14 to 13 exchanging blocks with fifa file explorer, turning them into cff, obj and with hexadecimal editor without any success, in the end I gave up the curious thing is that there is a tool that converts fifa heads13 to 14 but there is nothing to do the work in reverse at the end I gave up, I can only find the modelset 12/13 to make heads with facegen but that file was lost from the network.
 

Dmitri

Reserves
I have very limited knowledge about all these old tools (CFF, OIF, etc.) because I never used them.
I only know that they never gave a freedom in editing model files. How for example you can export/import skinned meshes if .obj files do not support skeleton and skinning at all?
If RX3 format will be completely researched I think models/textures could be easily converted between different games.
 

jj88

Club Supporter
I have very limited knowledge about all these old tools (CFF, OIF, etc.) because I never used them.
I only know that they never gave a freedom in editing model files. How for example you can export/import skinned meshes if .obj files do not support skeleton and skinning at all?
If RX3 format will be completely researched I think models/textures could be easily converted between different games.
It would be great to be able to do that, but it must be a long and painful road to get there, by the way if someone passes by and has the model set facegen csamFIFA Faces + v3.3 by du_oro10 together with the HEAD_ RX3 base could do them to me Arriving is for an oldgen console project, many facemaker used those files for their work but none worried about keeping those files.
 

*aLe

Youth Team
Where could this info help us mate?
Well, maybe it could help me find a way to have 128x256 numbers in FIFA 14 with mipmaps and DXT3 compression... At the moment I'm stuck either with 128x128 DXT3 textures with mipmaps (default FIFA 14 format) or 128x256 uncompressed textures without mipmaps (which don't look very good from afar).
I was looking for a guide to better understand the RX3 format and, well, this can come in handy (I'll probably end up throwing everything away and using 128x128 ones but hey, it's worth a try at least).
Thank you @Dmitri :)
 

Dmitri

Reserves
@*aLe
It might be a restriction in the game code/engine.
For example, in FIFA Manager (graphics are based on FIFA09), it was always necessary to keep kitnumbers as 1024x128 texture, because the game creates a new 128x128 texture for specific number (say, 10), and then copies pixels from kitnumbers texture, one-by-one.

@all
could someone upload FIFA12/13/14/15/16 .rx3 texture/model files (from original PC version)? This will help me a lot.
 
Last edited:

pe pe

Club Supporter
Interesting thread, thanks for sharing your research. It is always great to see people disecting older games. I can help you out by uploading rx3's files, are there anything particular you are looking for? Unfortunately my bandwith can't handle uploading all games in their whole.
 

Telega12

Reserves
I have very limited knowledge about all these old tools (CFF, OIF, etc.) because I never used them.
I only know that they never gave a freedom in editing model files. How for example you can export/import skinned meshes if .obj files do not support skeleton and skinning at all?
If RX3 format will be completely researched I think models/textures could be easily converted between different games.
It is delusion. You never could convert fifa 12-13 head to fifa 14-16 format, because it is has different amount of vertices and absolutely other texture structure.
 

Dmitri

Reserves
It is delusion. You never could convert fifa 12-13 head to fifa 14-16 format, because it is has different amount of vertices and absolutely other texture structure.
Why can't you change the amount of vertices and update texture "structure"? (whatever you meant with this)
 

Telega12

Reserves
Why can't you change the amount of vertices and update texture "structure"? (whatever you meant with this)
I saw you a nooby in this issue. It would work if head model has much more vertices than 3157, if lower - no. Do you make one head model ever?
 

Dmitri

Reserves
I started learning things about RX3 files a month ago.
Why 3157?
I didn't make any model for FIFA 16.
 


Top