env_factor

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

Moderator: Oleg

User avatar
yandry
Posts: 87
Joined: Wed Oct 21, 2020 4:43 pm

env_factor

Post by yandry »

how to fix this the mod works fine without moving anything but when imported with zmodeler and exported this line calleds not exported: env_factor i { 1 , 1 , 1 } which affects and makes the object not look chrome

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

Re: env_factor

Post by Harald-RS »

I have already reported this to Oleg.
The same applies to the truckpaint.
Greetings
Harald
My System: PC Windows 11
User avatar
Oleg
Site Admin
Posts: 14045
Joined: Fri Feb 06, 2004 3:54 am
Contact:

Re: env_factor

Post by Oleg »

what exactly is wrong? There should be no "env_factor" and "fresnel" on material that has a .add.env in a shader name? this is a bit strange.
Or the "env_factor" is missing upon export?
User avatar
Oleg
Site Admin
Posts: 14045
Joined: Fri Feb 06, 2004 3:54 am
Contact:

Re: env_factor

Post by Oleg »

Looks like dif.spec.oclu.add.env had this option on export and dif.spec.oclu.weight.add.env missed it. It's now fixed, get an update.

Regarding "truckpaint" material - I can not locate any strict scenario when this option is added and when it is not. All combinations of materials (including .airbrush and .flipflakes version) appear with and without this option, regardless of availability of "texture_reflection" slot. So, I can't say when this option should be written when not. Are there any exact cases when this option being created by ZModeler caused wrong appearance of material?
Dotec
Posts: 16
Joined: Sat Apr 04, 2020 11:25 am

Re: env_factor

Post by Dotec »

env_factor is obsolete for truckpaint shader
User avatar
Oleg
Site Admin
Posts: 14045
Joined: Fri Feb 06, 2004 3:54 am
Contact:

Re: env_factor

Post by Oleg »

So there should be no impact if it appears in a mat file? I've removed it from truckpaint export options, it will be in next update some day.
User avatar
yandry
Posts: 87
Joined: Wed Oct 21, 2020 4:43 pm

Re: env_factor

Post by yandry »

Download the game, import and export the chrome tank w900 accessory, that is, the fuel tanks and you will notice the error, the most important thing is that zmodelere does not export the env line in the named material

env_factor : { 1 , 1 , 1 }

Or how we add it in zmodeler as user defined options.
User avatar
Oleg
Site Admin
Posts: 14045
Joined: Fri Feb 06, 2004 3:54 am
Contact:

Re: env_factor

Post by Oleg »

may you specify the pmd file name to take a look?
User avatar
yandry
Posts: 87
Joined: Wed Oct 21, 2020 4:43 pm

Re: env_factor

Post by yandry »

name : chrome_plated_260.pmd


version game : american truck simulator 1.46
User avatar
Oleg
Site Admin
Posts: 14045
Joined: Fri Feb 06, 2004 3:54 am
Contact:

Re: env_factor

Post by Oleg »

It looks OK to me (tested in 1.47).
"env_factor" is added to every material with "add.env" in material/effect name.

Code: Select all

effect : "eut2.dif.spec.oclu.weight.add.env.tsnmapuv.rfx" {
	texture : "texture_base" {
		source : "/vehicle/share/textures/metal/chrome_base.tobj"
	}
	texture : "texture_oclu" {
		source : "/vehicle/truck/kenworth_w900/ao_shared.tobj"
	}
	texture : "texture_nmap" {
		source : "/vehicle/truck/kenworth_w900/normal.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 : { 1 , 1 , 1 }
	fresnel : { 1.000000 , 1.000000 }

}
User avatar
Oleg
Site Admin
Posts: 14045
Joined: Fri Feb 06, 2004 3:54 am
Contact:

Re: env_factor

Post by Oleg »

Dotec wrote: Mon Mar 13, 2023 11:50 am env_factor is obsolete for truckpaint shader
where can I find the source of this information?

I have checked .mat files from game version 1.47 and "env_factor" appears on some of "truckpaint" materials randomly. Mostly on those with bump-map texture or with flipflake effect.
User avatar
Harald-RS
Beginner
Posts: 332
Joined: Sun Oct 21, 2012 8:08 am
Location: Treuchtlingen / Germany

Re: env_factor

Post by Harald-RS »

This is due to the fact that the mat files in the 1.47 Openbeta are probably not yet all adjusted.
Greetings
Harald
My System: PC Windows 11
User avatar
Oleg
Site Admin
Posts: 14045
Joined: Fri Feb 06, 2004 3:54 am
Contact:

Re: env_factor

Post by Oleg »

this is also true to pre-1.47 files. some "truckpaint" have env_factor, another - don't. and quite randomly. Looks like the default full strength reflection env_factor {1,1,1} is not written, but if the strength is lower, then the parameters is created. just a thought.
Dotec
Posts: 16
Joined: Sat Apr 04, 2020 11:25 am

Re: env_factor

Post by Dotec »

Oleg wrote: Sat Mar 18, 2023 1:56 pmwhere can I find the source of this information?
in the shader_presets.txt file for scs blender tools provided by scssoft.

I did a quick research - following shader contains env_factor attribute:

Code: Select all

building.add.env.day
dif.spec.add.env
dif.spec.add.env.nofresnel
dif.spec.mult.dif.spec.add.env
dif.spec.oclu.add.env
dif.spec.oclu.weight.add.env
dif.spec.weight.add.env
light.tex
lightmap.night
water
following code is the truckpaint shader:

Code: Select all

Shader {
    PresetName: "truckpaint"
    Effect: "eut2.truckpaint"
    Flavors: ( "NMAP_TS|NMAP_TS_UV|NMAP_TS_16|NMAP_TS_UV_16" "SHADOW" "COLORMASK|AIRBRUSH" "FLIPFLAKE" "ALTUV" )
    Flags: 0
    Attribute {
        Format: FLOAT3
        Tag: "diffuse"
        Value: ( 1.0 1.0 1.0 )
    }
    Attribute {
        Format: FLOAT3
        Tag: "specular"
        Value: ( 1.0 1.0 1.0 )
    }
    Attribute {
        Format: FLOAT
        Tag: "shininess"
        Value: ( 250.0 )
    }
    Attribute {
        Format: FLOAT
        Tag: "add_ambient"
        Value: ( 0.0 )
    }
    Attribute {
        Format: FLOAT2
        Tag: "fresnel"
        Value: ( 0.2 0.9 )
    }
    Texture {
        Tag: "texture[X]:texture_base"
        Value: ""
        TexCoord: ( 0 1 2 )
    }
    Texture {
        Tag: "texture[X]:texture_reflection"
        Value: "/material/environment/vehicle_reflection"
        TexCoord: ( -1 )
    }
}
the actros 2014 painted mirrors till 1.46 contained old mat files with env_favtor for truckpaint shader. (/vehicle/truck/upgrade/mirror/mercedes_actros_2014/mirror_02.pmg)

Image

if you search for actual shader infos for trucks, import the newest models (daf 2021 for example)
User avatar
Oleg
Site Admin
Posts: 14045
Joined: Fri Feb 06, 2004 3:54 am
Contact:

Re: env_factor

Post by Oleg »

In an unpacked base.scs from game 1.47 there are dozen of .mat files with truckpaint shader and env_factor still there.
models for volvo_fh16_2012, vehicle/truck/upgrade/doorhandle/renault_premium and some others. The .mat file is in new format ("effct":"eut2.truckpaint,..."), so these are newly-created files.

Does availability of "env_factor" on truckpaint material have any impact on shading in game? For example, if you add "env_factor : {0.02, 0.02, 0.02 }" - will it drop the strength of reflection to a very low?

Edit:

...because users keep complaining on removal of env_factor as it causes reflection to be full-strength:
s-l1600.jpg
User avatar
Harald-RS
Beginner
Posts: 332
Joined: Sun Oct 21, 2012 8:08 am
Location: Treuchtlingen / Germany

Re: env_factor

Post by Harald-RS »

It's probably because they don't want to adjust the reflection settings in the game.

One has in ETS namely the possibility to change that there.
And the reflection is set but in the vehicle Reflection as far as I know?
Greetings
Harald
My System: PC Windows 11
User avatar
Oleg
Site Admin
Posts: 14045
Joined: Fri Feb 06, 2004 3:54 am
Contact:

Re: env_factor

Post by Oleg »

In old days of ETS, the relection strength seems like to be bound to specular strength and was masked by base texture's alpha. However, the scania cabin in example above uses "grey" color-texture as base texture (DETAIL) "plain_grey.dds" with white alpha. This is quite strange, as I do not see how the game controls the reflection strength over surface now.
User avatar
Oleg
Site Admin
Posts: 14045
Joined: Fri Feb 06, 2004 3:54 am
Contact:

Re: env_factor

Post by Oleg »

It was confirmed the "env_factor" parameter has no effect in game. This parameter is now removed from export of truckpaint material. The imported "truckpaint" material will have a constant 25% (64) level of ENVMAP texture (if any). Other shaders will import/export ENVMAP reflection level with respect to env_factor material parameter.
User avatar
yandry
Posts: 87
Joined: Wed Oct 21, 2020 4:43 pm

Re: env_factor

Post by yandry »

Well I share so that the inconvenience I have is understood, when the object is exported it affects the material and those two lines that I indicate in the photos are not included in the material and it makes the chrome look opaque

Image Image Image
User avatar
Oleg
Site Admin
Posts: 14045
Joined: Fri Feb 06, 2004 3:54 am
Contact:

Re: env_factor

Post by Oleg »

Are you sure you use version with the latest updates? This issue was addressed already and export of this shader goes with env_factor always.
Here's an example of the model in a question:
dif_spec_oclu_weight_env_factor.jpg
User avatar
yandry
Posts: 87
Joined: Wed Oct 21, 2020 4:43 pm

Re: env_factor

Post by yandry »

If now I realize that the software does not update automatically, I had to download manually and add my login
User avatar
Oleg
Site Admin
Posts: 14045
Joined: Fri Feb 06, 2004 3:54 am
Contact:

Re: env_factor

Post by Oleg »

it does update. however, if you are on version 3.2.1, it is no longer evaluating, only 3.3.0 is in the works. It is essential to run as Administrator for updates to work properly. You can copy ZModeler_profile.xml file from your current installation to newly downloaded folder to retain your settings (including account name / password) if needed.
User avatar
yandry
Posts: 87
Joined: Wed Oct 21, 2020 4:43 pm

Re: env_factor

Post by yandry »

thanks problem solved
madoyaghi
Posts: 24
Joined: Thu Feb 11, 2016 3:23 pm

Re: env_factor

Post by madoyaghi »

hey oleg on the latest update after i export with truckpaint and airbursh flag im getting flags : "AIRBRUSH" in my mats and its crashing my game!!
User avatar
Oleg
Site Admin
Posts: 14045
Joined: Fri Feb 06, 2004 3:54 am
Contact:

Re: env_factor

Post by Oleg »

my bad.. fixed. get an update.
If you get options from user-defined window of material that you don't want to be included in .mat file, you can add them (comma-separated, lower-case) in Profile -> Editor -> Preferences -> Filters -> SCSPrism3D -> IgnoreUserOptionsList.
Post Reply