Euro Truck Simulator 2

Euro Truck Simulator 2

View Stats:
Solenoko Apr 16, 2021 @ 7:49am
ets2 creating tobj and mat files
I’m fairly new to modding and I’m trying to understand mat and tobj files. From what I remember is that blender will create mat files after extraction but how about tobj ? How to link them together ? If somebody have time and info please let me know !!! (Add me also if it’s possible for further discussion).
< >
Showing 1-4 of 4 comments
madman Apr 16, 2021 @ 8:42am 
IIRC, Blender tool provided by SCS Will generate an appropriate .tobj file for you when converting from Blender exports into binaries. This TOBJ file format is actually a "placeholder" of DDS info header, provides more complex texture information than DDS can offer (i.e. texture filtering, color space, UV mapping, etc). TOBJ file format also distinguish the texture types, either planar (1 DDS per TOBJ) or cubical (6 DDSs per TOBJ, i.e. for environment, reflection, etc).

You are rarely need to change the TOBJ itself as long as you're not change the characteristic of the referenced DDS (planar to cubical or vice versa) or changing the actual file name of it's DDS file.

There are many sources to dig but you can start from the link below to understand the format of TOBJ, as long as you good with hex editing and a bit familiar with CPP syntax:

https://github.com/mwl4/ConverterPIX/blob/master/src/structs/tobj.h
Solenoko Apr 16, 2021 @ 5:33pm 
You are a legend !!! Thank you so much for explanation!!

Originally posted by madman:
IIRC, Blender tool provided by SCS Will generate an appropriate .tobj file for you when converting from Blender exports into binaries. This TOBJ file format is actually a "placeholder" of DDS info header, provides more complex texture information than DDS can offer (i.e. texture filtering, color space, UV mapping, etc). TOBJ file format also distinguish the texture types, either planar (1 DDS per TOBJ) or cubical (6 DDSs per TOBJ, i.e. for environment, reflection, etc).

You are rarely need to change the TOBJ itself as long as you're not change the characteristic of the referenced DDS (planar to cubical or vice versa) or changing the actual file name of it's DDS file.

There are many sources to dig but you can start from the link below to understand the format of TOBJ, as long as you good with hex editing and a bit familiar with CPP syntax:

https://github.com/mwl4/ConverterPIX/blob/master/src/structs/tobj.h
Eddie Yantz Apr 16, 2021 @ 7:04pm 
In SCS games, a 3D model consists of pmd and pmg (and usually pmc).
- pmDirectory, pmGraphics, and pmCollision.
When pmg is exported, it generates mat[erial] files (in plain text), which point to tobj files (unique format), which provide communication between pmd, pmg, and dds (textures).

I use ZModeler (not Blender) to edit models. ZModeler imports & exports pmd files, processing companion pmg, pmc, mat, and tobj files, and creating links and mapping to dds files. When an entire model is processed within ZModeler, manual editing of mat and tobj files is not required.

Occasionally, I edit mat and tobj files manually (e.g., accessory icons). I use Notepad++ to edit mat files; I use the tobj editor within ModsStudio2 to edit tobj files. I use GIMP to edit dds files.
Last edited by Eddie Yantz; Apr 16, 2021 @ 7:05pm
Solenoko Apr 16, 2021 @ 8:27pm 
Thank you for the comment and noted!

Originally posted by Eddie Yantz:
In SCS games, a 3D model consists of pmd and pmg (and usually pmc).
- pmDirectory, pmGraphics, and pmCollision.
When pmg is exported, it generates mat[erial] files (in plain text), which point to tobj files (unique format), which provide communication between pmd, pmg, and dds (textures).

I use ZModeler (not Blender) to edit models. ZModeler imports & exports pmd files, processing companion pmg, pmc, mat, and tobj files, and creating links and mapping to dds files. When an entire model is processed within ZModeler, manual editing of mat and tobj files is not required.

Occasionally, I edit mat and tobj files manually (e.g., accessory icons). I use Notepad++ to edit mat files; I use the tobj editor within ModsStudio2 to edit tobj files. I use GIMP to edit dds files.
< >
Showing 1-4 of 4 comments
Per page: 1530 50

Date Posted: Apr 16, 2021 @ 7:49am
Posts: 4