SCS changed Mat structure

SCS Software ATS and ETS2 editing using ZModeler3 filter. Models, Materials, Animation.

Moderator: Oleg

Post Reply
User avatar
Harald-RS
Beginner
Posts: 332
Joined: Sun Oct 21, 2012 8:08 am
Location: Treuchtlingen / Germany

SCS changed Mat structure

Post by Harald-RS »

Hi Oleg,

I just found out that SCS has changed the structure of mat files again in 1.47.

What exactly everything change I do not know yet exactly.

Old Material Truckpaint:
material : "eut2.truckpaint.rfx" {
texture[0] : "/vehicle/truck/daf_2021/carpaint_color.tobj"
texture_name[0] : "texture_base"
texture[1] : "/material/environment/vehicle_reflection.tobj"
texture_name[1] : "texture_reflection"
add_ambient : 0
diffuse : { 0.857521 , 0.857521 , 0.857521 }
fresnel : { 0.2 , 0.9 }
shininess : 250
specular : { 1 , 1 , 1 }
}

New Material Truckpaint:
effect : "eut2.truckpaint.rfx" {
additional_ambient : 0.000000
diffuse : { 1.000000 , 1.000000 , 1.000000 }
fresnel : { 0.200000 , 0.900000 }
shininess : 250.000000
specular : { 1.000000 , 1.000000 , 1.000000 }
texture : "texture_base" {
source : "/vehicle/truck/daf_2021/carpaint_color.tobj"
}
texture : "texture_reflection" {
source : "/material/environment/vehicle_reflection.tobj"
}
}
Greetings
Harald
My System: PC Windows 11
User avatar
Oleg
Site Admin
Posts: 14045
Joined: Fri Feb 06, 2004 3:54 am
Contact:

Re: SCS changed Mat structure

Post by Oleg »

get the most recent update, it was addressed yesterday. exported materials are still in old format as this is a beta version only.
User avatar
Harald-RS
Beginner
Posts: 332
Joined: Sun Oct 21, 2012 8:08 am
Location: Treuchtlingen / Germany

Re: SCS changed Mat structure

Post by Harald-RS »

I'm using the 1.47 beta because I need to change my PayMods because they are already all on 1.47.

I just wanted to inform you.

You can change it in the beta version of Z-Mod already to 1.47.
Greetings
Harald
My System: PC Windows 11
User avatar
Oleg
Site Admin
Posts: 14045
Joined: Fri Feb 06, 2004 3:54 am
Contact:

Re: SCS changed Mat structure

Post by Oleg »

I will add the export in new style as an option, as this is not a standard of materials layout yet and the game still handles old layout properly. Once it will start showing errors/warnings on old materials format, the export in new style will be made mandatory.
User avatar
Oleg
Site Admin
Posts: 14045
Joined: Fri Feb 06, 2004 3:54 am
Contact:

Re: SCS changed Mat structure

Post by Oleg »

Support for game version 1.47 extended. There is an export option to select: "ETS2/ATS 1.47"
I think I will add version changes this way, as current version "ETS2/ATS" assumes all range of export variants with 4 PMG versions and two PPD (prefab) versions. I find it a bit confusing for users - what version will the export actually be. So, from version 1.47 and further (if version change is significant) I will add version selection like this.

I have not tested anything in game at all, as I have a steam game version and don't remember how exactly to mod steam version. However, I have tested some models import/export and compared .mat files - more or less they are alike. There are some parameters that are still a subject to decide how to support them (e.g. shaders with .amod and .night. variants).

To say, the update of material files is quite significant to consider a complete remastering of materials handing code, as current code was designed for a pretty old ETS/GTS game series.
User avatar
Harald-RS
Beginner
Posts: 332
Joined: Sun Oct 21, 2012 8:08 am
Location: Treuchtlingen / Germany

Re: SCS changed Mat structure

Post by Harald-RS »

Hello Oleg,

this shader is not imported and exported correctly.

Furthermore, you can't always change the mats with replace.

Code: Select all

effect : "eut2.lightmap.night.rfx" {
	depth_bias : 0.000000
	diffuse : { 1.000000 , 1.000000 , 1.000000 }
	env_factor : { 0.000000 , 0.000000 , 0.000000 }
	luminance_night : 0.000000
	luminance_output : 0.000000
	specular : { 0.000000 , 0.000000 , 0.000000 }
	texture : "texture_base" {
		source : "/vehicle/ai/train_ice3/windows_light.tobj"
	}
}
Greetings
Harald
My System: PC Windows 11
Ventyres
Posts: 7
Joined: Mon Nov 23, 2020 3:27 am

Re: SCS changed Mat structure

Post by Ventyres »

So basically they only change the look of the texture paths...
i didn´t received an update. my Zmodeler3 shows me there is no Update available
User avatar
Harald-RS
Beginner
Posts: 332
Joined: Sun Oct 21, 2012 8:08 am
Location: Treuchtlingen / Germany

Re: SCS changed Mat structure

Post by Harald-RS »

No they change everything when you take a closer look at the mats.

You are probably not in the beta test or?
Greetings
Harald
My System: PC Windows 11
Ventyres
Posts: 7
Joined: Mon Nov 23, 2020 3:27 am

Re: SCS changed Mat structure

Post by Ventyres »

No i have not updated yet
User avatar
SHAMAN7730
Posts: 2
Joined: Fri Aug 31, 2012 1:36 am
Contact:

Re: SCS changed Mat structure

Post by SHAMAN7730 »

Oleg wrote: Fri Mar 17, 2023 12:39 pm Support for game version 1.47 extended. There is an export option to select: "ETS2/ATS 1.47"
I think I will add version changes this way, as current version "ETS2/ATS" assumes all range of export variants with 4 PMG versions and two PPD (prefab) versions. I find it a bit confusing for users - what version will the export actually be. So, from version 1.47 and further (if version change is significant) I will add version selection like this.

I have not tested anything in game at all, as I have a steam game version and don't remember how exactly to mod steam version. However, I have tested some models import/export and compared .mat files - more or less they are alike. There are some parameters that are still a subject to decide how to support them (e.g. shaders with .amod and .night. variants).

To say, the update of material files is quite significant to consider a complete remastering of materials handing code, as current code was designed for a pretty old ETS/GTS game series.
дефолтный .мат (исправлены только пути к .tobj)

effect : "eut2.dif.spec.weight.add.env.tsnmap.a.rfx" {
additional_ambient : -0.250000
diffuse : { 0.214041 , 0.214041 , 0.214041 }
env_factor : { 0.977402 , 0.977402 , 0.977402 }
fresnel : { 1.000000 , 1.000000 }
reflection : 0.000000
shininess : 70.000000
specular : { 1.000000 , 1.000000 , 1.000000 }
texture : "texture_base" {
source : "/vehicle/truck/daf_2021/accessory/exhaust/exhaust_daf_2021.tobj"
}
texture : "texture_base" {
source : "/vehicle/truck/daf_2021/accessory/exhaust/n_exhaust_daf_2021.tobj"
}
texture : "texture_reflection" {
source : "/material/environment/vehicle_reflection.tobj"
}
}

импорт/экспорт .мат

effect : "eut2.dif.spec.weight.add.env.a.rfx" {
texture : "texture_base" {
source : "/vehicle/truck/daf_2021/accessory/exhaust/n_exhaust_daf_2021.tobj"
}
texture : "texture_reflection" {
source : "/material/environment/vehicle_reflection.tobj"
}
diffuse : { 0.211765 , 0.211765 , 0.211765 }
specular : { 1 , 1 , 1 }
shininess : 70
additional_ambient : 0
env_factor : { 0.977402 , 0.977402 , 0.977402 }
fresnel : { 1.000000 , 1.000000 }
reflection : 0.000000

}

Потеря эффекта .tsnmap и соответственно текстуры n_exhaust_daf_2021.
User avatar
Oleg
Site Admin
Posts: 14045
Joined: Fri Feb 06, 2004 3:54 am
Contact:

Re: SCS changed Mat structure

Post by Oleg »

скорее всего потому что она в дефолте лежит в слоте текстуры

texture : "texture_base"

а должна быть в

texture : "texture_nmap"

Я думаю, это ошибка в оригинальном файле материалов. По идее не должно быть два "texture_base", и для карты нормалей есть слот "texture_nmap".
User avatar
SHAMAN7730
Posts: 2
Joined: Fri Aug 31, 2012 1:36 am
Contact:

Re: SCS changed Mat structure

Post by SHAMAN7730 »

Хм... Ты оказался прав, где то я при копировании дал маху. Косячёк мой однако.

Вопрос по отображению: формат вершинок Tangents влияет только на отображение в программе, в игре изменений не увидел(может происходит корректировка формата, но тут я не силён).
Post Reply