Page 1 of 2

env_factor

Posted: Mon Mar 13, 2023 7:39 am
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

Re: env_factor

Posted: Mon Mar 13, 2023 8:08 am
by Harald-RS
I have already reported this to Oleg.
The same applies to the truckpaint.

Re: env_factor

Posted: Mon Mar 13, 2023 11:16 am
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?

Re: env_factor

Posted: Mon Mar 13, 2023 11:37 am
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?

Re: env_factor

Posted: Mon Mar 13, 2023 11:50 am
by Dotec
env_factor is obsolete for truckpaint shader

Re: env_factor

Posted: Mon Mar 13, 2023 1:46 pm
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.

Re: env_factor

Posted: Fri Mar 17, 2023 8:51 am
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.

Re: env_factor

Posted: Fri Mar 17, 2023 8:54 am
by Oleg
may you specify the pmd file name to take a look?

Re: env_factor

Posted: Fri Mar 17, 2023 8:58 am
by yandry
name : chrome_plated_260.pmd


version game : american truck simulator 1.46

Re: env_factor

Posted: Fri Mar 17, 2023 11:47 am
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 }

}

Re: env_factor

Posted: Sat Mar 18, 2023 1:56 pm
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.

Re: env_factor

Posted: Sat Mar 18, 2023 2:46 pm
by Harald-RS
This is due to the fact that the mat files in the 1.47 Openbeta are probably not yet all adjusted.

Re: env_factor

Posted: Sat Mar 18, 2023 11:28 pm
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.

Re: env_factor

Posted: Sun Mar 19, 2023 12:37 am
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)

Re: env_factor

Posted: Sun Mar 19, 2023 3:08 am
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

Re: env_factor

Posted: Sun Mar 19, 2023 3:22 am
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?

Re: env_factor

Posted: Sun Mar 19, 2023 3:24 am
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.

Re: env_factor

Posted: Sun Mar 19, 2023 6:35 am
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.

Re: env_factor

Posted: Mon Mar 20, 2023 5:12 am
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

Re: env_factor

Posted: Mon Mar 20, 2023 5:40 am
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

Re: env_factor

Posted: Mon Mar 20, 2023 6:04 am
by yandry
If now I realize that the software does not update automatically, I had to download manually and add my login

Re: env_factor

Posted: Mon Mar 20, 2023 6:10 am
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.

Re: env_factor

Posted: Mon Mar 20, 2023 6:23 am
by yandry
thanks problem solved

Re: env_factor

Posted: Thu Mar 23, 2023 11:04 pm
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!!

Re: env_factor

Posted: Thu Mar 23, 2023 11:23 pm
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.