retroreflective material export

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

Moderator: Oleg

User avatar
Peerke145
Posts: 39
Joined: Fri Jul 13, 2012 10:27 pm
Location: Middelburg, The Netherlands
Contact:

retroreflective material export

Post by Peerke145 »

After import and export te new dumper body the reflection stripes doesn't look anymore how they should look.
before export
Image
After export
Image

Material

Code: Select all

material : "eut2.retroreflective.tsnmap.piko.alldir.decal.over.rfx" {
	texture[0] : "/vehicle/share/textures/decal/reflectors.tobj"
	texture_name[0] : "texture_base"
	texture[1] : "/vehicle/share/textures/decal/reflectors_normal.tobj"
	texture_name[1] : "texture_nmap"
}
Attachments
Default_scs_dumper_body.z3d
(1.04 MiB) Downloaded 136 times
User avatar
Oleg
Site Admin
Posts: 14045
Joined: Fri Feb 06, 2004 3:54 am
Contact:

Re: retroreflective material export

Post by Oleg »

how does original .mat file look like, and what .mat file ZModeler generates? may you attach both of them so I can compare them?
User avatar
Peerke145
Posts: 39
Joined: Fri Jul 13, 2012 10:27 pm
Location: Middelburg, The Netherlands
Contact:

Re: retroreflective material export

Post by Peerke145 »

Sorry for the late reply.
Underneath the material exported by Zmodeler.

Code: Select all

material : "eut2.retroreflective.piko.alldir" {
	texture[0] : "/vehicle/share/textures/decal/reflectors.tobj"
	texture_name[0] : "texture_base"
	texture[1] : "/vehicle/share/textures/decal/reflectors_normal.tobj"
	texture_name[1] : "texture_base"

}
One note: In the mod i put only the exported pmd, pmg and pmc file. so it used the original mat, tobj and textures from the ETS2 base.
User avatar
Oleg
Site Admin
Posts: 14045
Joined: Fri Feb 06, 2004 3:54 am
Contact:

Re: retroreflective material export

Post by Oleg »

get an update.
User avatar
Peerke145
Posts: 39
Joined: Fri Jul 13, 2012 10:27 pm
Location: Middelburg, The Netherlands
Contact:

Re: retroreflective material export

Post by Peerke145 »

Thanks, but after a new import and export it still looks the same.

Exported material is now:

Code: Select all

material : "eut2.retroreflective.tsnmap.piko.alldir" {
	texture[0] : "/vehicle/share/textures/decal/reflectors.tobj"
	texture_name[0] : "texture_base"
	texture[1] : "/vehicle/share/textures/decal/reflectors_normal.tobj"
	texture_name[1] : "texture_nmap"

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

Re: retroreflective material export

Post by Oleg »

it's not the same as before.
tested in game?
User avatar
Peerke145
Posts: 39
Joined: Fri Jul 13, 2012 10:27 pm
Location: Middelburg, The Netherlands
Contact:

Re: retroreflective material export

Post by Peerke145 »

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

Re: retroreflective material export

Post by Oleg »

this does not make me any sense. I do not play the game and don't know how it should look properly (and/or what exactly should I be looking at on your screenshot)?
User avatar
Peerke145
Posts: 39
Joined: Fri Jul 13, 2012 10:27 pm
Location: Middelburg, The Netherlands
Contact:

Re: retroreflective material export

Post by Peerke145 »

It should look like the first screenshot in the first post.
User avatar
Oleg
Site Admin
Posts: 14045
Joined: Fri Feb 06, 2004 3:54 am
Contact:

Re: retroreflective material export

Post by Oleg »

may you add "decal.over" in exported material (like in original material). does it work properly after this modification of exported .mat file?
User avatar
Peerke145
Posts: 39
Joined: Fri Jul 13, 2012 10:27 pm
Location: Middelburg, The Netherlands
Contact:

Re: retroreflective material export

Post by Peerke145 »

I'm sorry, No that doesn't make any difference
User avatar
Peerke145
Posts: 39
Joined: Fri Jul 13, 2012 10:27 pm
Location: Middelburg, The Netherlands
Contact:

Re: retroreflective material export

Post by Peerke145 »

booked a little succes
the imported material in zmodeler put the uv from the normal map on UV1
when i put that on UV2 i get this result:
Image
the colors and texture are good. it's not one stripe anymore
material settings in zmodeler:
Image
Last edited by Peerke145 on Fri Nov 19, 2021 10:21 am, edited 1 time in total.
User avatar
Oleg
Site Admin
Posts: 14045
Joined: Fri Feb 06, 2004 3:54 am
Contact:

Re: retroreflective material export

Post by Oleg »

so normal map should be on UV2 and it is currently being imported as UV1?

is .decal.over a must or you got the one above without changing this?
User avatar
Peerke145
Posts: 39
Joined: Fri Jul 13, 2012 10:27 pm
Location: Middelburg, The Netherlands
Contact:

Re: retroreflective material export

Post by Peerke145 »

this is with the the add of .decal.over to the exported material
User avatar
Oleg
Site Admin
Posts: 14045
Joined: Fri Feb 06, 2004 3:54 am
Contact:

Re: retroreflective material export

Post by Oleg »

Ok, so after importing you manually change BUMPMAP texture slot to "Manual UV #2", export, and add ".decal.over" manually into the .mat file - and everything works fine after that, correct?
User avatar
Peerke145
Posts: 39
Joined: Fri Jul 13, 2012 10:27 pm
Location: Middelburg, The Netherlands
Contact:

Re: retroreflective material export

Post by Peerke145 »

IT looks like the UV1 is rotated 90 degree when exported
Image
Image
this give the same result in zmodeler as it looks in game.
User avatar
Oleg
Site Admin
Posts: 14045
Joined: Fri Feb 06, 2004 3:54 am
Contact:

Re: retroreflective material export

Post by Oleg »

uv can not be rotated on export. most likely the wrong uv channel is used.
User avatar
Peerke145
Posts: 39
Joined: Fri Jul 13, 2012 10:27 pm
Location: Middelburg, The Netherlands
Contact:

Re: retroreflective material export

Post by Peerke145 »

Could this error has something to do with this?
00:01:40.670 : <ERROR> [dx11] Unable to map attribute (v.factor)
00:01:40.670 : <ERROR> [dx11] Failed to create vertex input layout!
User avatar
Oleg
Site Admin
Posts: 14045
Joined: Fri Feb 06, 2004 3:54 am
Contact:

Re: retroreflective material export

Post by Oleg »

may you pack original model file with .mat and textures and upload it somewhere for me?
User avatar
Oleg
Site Admin
Posts: 14045
Joined: Fri Feb 06, 2004 3:54 am
Contact:

Re: retroreflective material export

Post by Oleg »

meanwhile, may you try this import-export version (64 bit version). unpack to "Filters" folder.

import,
check whether bumpmap is on UV#2?
export,
is decal.over there?
Attachments
SCS Soft Prism3D.zip
(224.38 KiB) Downloaded 139 times
User avatar
Peerke145
Posts: 39
Joined: Fri Jul 13, 2012 10:27 pm
Location: Middelburg, The Netherlands
Contact:

Re: retroreflective material export

Post by Peerke145 »

User avatar
Peerke145
Posts: 39
Joined: Fri Jul 13, 2012 10:27 pm
Location: Middelburg, The Netherlands
Contact:

Re: retroreflective material export

Post by Peerke145 »

I tested the new filter.
material bumpmap is still on UV1. also the object itself has only 1 uv channel

good news is: the decal over is in the exported mat file
User avatar
Oleg
Site Admin
Posts: 14045
Joined: Fri Feb 06, 2004 3:54 am
Contact:

Re: retroreflective material export

Post by Oleg »

so far I see no difference in generated .mat file (except the .rfx suffix which is absolutely ok).

The original model file has UV#1 as well as exported model. Upon re-import the UV mapping is still the same (horizontal line). What do you have in your case?
User avatar
Peerke145
Posts: 39
Joined: Fri Jul 13, 2012 10:27 pm
Location: Middelburg, The Netherlands
Contact:

Re: retroreflective material export

Post by Peerke145 »

With the bumpmap on uv1 i have the decals all grey without visible textures.
with the bumpmap on uv2 i have the decals in color and textures and yes the uv mapping is horizontal but in game it looks like the uvmap is vertical
User avatar
Oleg
Site Admin
Posts: 14045
Joined: Fri Feb 06, 2004 3:54 am
Contact:

Re: retroreflective material export

Post by Oleg »

how does original "retroreflective" behave in game? does it have any visual effects apart from regular texture on it?

There is some specific data on geometry for retroreflective material, it looks like polygons (quads) with this material can act as billboard (turn and face to the camera/viewer).

May you record a short video on how these stripes natively work in game when camera turns around?
00:01:40.670 : <ERROR> [dx11] Unable to map attribute (v.factor)
00:01:40.670 : <ERROR> [dx11] Failed to create vertex input layout!
yup, this is the stuff I'm trying to figure out with this shader.
Post Reply