scania_2016 interior anim_pmd

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

Moderator: Oleg

Post Reply
Fazer001
Posts: 63
Joined: Sun Feb 26, 2017 5:49 am

scania_2016 interior anim_pmd

Post by Fazer001 »

Hi Oleg,
ZMod has import or export problems with the anim_pmd.
I have no idea what the problem is, can you take a look please.

\vehicle\truck\scania_2016\interior\anim_pmd

original anim_pmd
Image

ZMod Import with Merge Models fuel level works but looks like that
Image

ZMod Import without Merge Models,
fuel level looks correctly,
but not works

Image

Thanks in advance for your help....
User avatar
Oleg
Site Admin
Posts: 14045
Joined: Fri Feb 06, 2004 3:54 am
Contact:

Re: scania_2016 interior anim_pmd

Post by Oleg »

This level indicator can only be edited in "Merge models" mode, as it uses "two vertices of quad moves aside" animation (when two vertices are moved and two vertices retain on their place, quad becomes stretched).

Second, the model has coplanar level indicator quads and black quads that make "dashed" line. Depending on the order of polygons being drawn, it might either work properly (dashed line) or does not work. When model is merged, the order of drawing geometry is per-material. When model is sliced to parts (not merged) and re-exported, the order of polygons is different.

To solve the issue, the only way is to edit vertices position of fuel level indicator in anim.pmg file. select these vertices and move them in Z out of the driver eye position, just a tiny bit backward (just 1mm or something like that). Mind, there is a "red" indicator quad behind and you should not move "white stretching quad" too far, as the red can come in front and become visible all the time.

Actually, this is a sort of bad model design from scs, where they have coplanar polygons while some should be "in front" and other should be "behind". there are techniques like "z bias" that could make an adjustment in shader code to solve this issue, and quite likely original material has some z-bias adjustment in it, but I think it's a bad practice to rely on z-bias to solve this issue.
Fazer001
Posts: 63
Joined: Sun Feb 26, 2017 5:49 am

Re: scania_2016 interior anim_pmd

Post by Fazer001 »

Ok Oleg, thank you for the detailed answer.
Did I understand that right, if I add something in the anim_pmd or change, the fuel gauge will always be displayed as a one bar in the game and not as seen in the first picture. Is that's right ???
User avatar
Harald-RS
Beginner
Posts: 332
Joined: Sun Oct 21, 2012 8:08 am
Location: Treuchtlingen / Germany

Re: scania_2016 interior anim_pmd

Post by Harald-RS »

Yes, basically you have understood that correctly, the new parts that are added in the animation must also be added in the animation files pma or be coded so that they can be animated later.
Greetings
Harald
My System: PC Windows 11
User avatar
Oleg
Site Admin
Posts: 14045
Joined: Fri Feb 06, 2004 3:54 am
Contact:

Re: scania_2016 interior anim_pmd

Post by Oleg »

Fazer001 wrote: Sun Mar 05, 2023 1:31 pm Ok Oleg, thank you for the detailed answer.
Did I understand that right, if I add something in the anim_pmd or change, the fuel gauge will always be displayed as a one bar in the game and not as seen in the first picture. Is that's right ???
yes. unless you move the selected polygon bars toward the driver in model.pmd file:
bars_forward.jpg
Fazer001
Posts: 63
Joined: Sun Feb 26, 2017 5:49 am

Re: scania_2016 interior anim_pmd

Post by Fazer001 »

Hi Oleg,
first of all thanks for your help and suggestions...

That with the model.pmd would also be a possibility, but I decided against it.

I chose this option from you...
To solve the issue, the only way is to edit vertices position of fuel level indicator in anim.pmg file. select these vertices and move them in Z out of the driver eye position, just a tiny bit backward (just 1mm or something like that). Mind, there is a "red" indicator quad behind and you should not move "white stretching quad" too far, as the red can come in front and become visible all the time.
For me it looks good and it works....
Image


Just one last question,
as you can see on the picture the materials have different parameter settings, can something be wrong and must be changed befor exporting ?!

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

Re: scania_2016 interior anim_pmd

Post by Oleg »

Standard alpha blend uses texture's alpha as per-pixel opacity data source. Source/Destination should be "Source Alpha" and "Inverted Source Alpha" respectively. However, shader code can do different computation inside and produce slightly different effect than you expect. In general, opaque materials should have "No alpha blend" and transparent materials should have "Standard alpha blend". Also, in most of cases, setting standard alpha blend will add ".a" suffix in generated material file (like "dif.add_env.a" or something like that). On the other hand, glowing materials like dif_lum and unlit.vcol.tex can use different shading code and different shading result application. It's up to the game I guess how this all works. In ZModeler setting alpha blend to "Source Alpha" / "One" like on your second screenshot makes material to shine over underlying polygons. This can be used for glowing indicators - they add some "light" to underlying dashboard texture.
Fazer001
Posts: 63
Joined: Sun Feb 26, 2017 5:49 am

Re: scania_2016 interior anim_pmd

Post by Fazer001 »

Oleg wrote: Mon Mar 06, 2023 2:07 am
Fazer001 wrote: Sun Mar 05, 2023 1:31 pm Ok Oleg, thank you for the detailed answer.
Did I understand that right, if I add something in the anim_pmd or change, the fuel gauge will always be displayed as a one bar in the game and not as seen in the first picture. Is that's right ???
yes. unless you move the selected polygon bars toward the driver in model.pmd file:
bars_forward.jpg
Hi Oleg,
this option with the model.pmd is not working too.
So what can we do now?
User avatar
Oleg
Site Admin
Posts: 14045
Joined: Fri Feb 06, 2004 3:54 am
Contact:

Re: scania_2016 interior anim_pmd

Post by Oleg »

I have specified already - either edit model.pmd to refine z-position of these quads that cover the fuel level, or edit the anim.pmd model to refine vertices position of affected fuel level quad (quad with white texture). move them toward/backward, export and test in game. this is the only solution. You need the bar quad to be behind the model's black quad to get dashed level indicator.
Fazer001
Posts: 63
Joined: Sun Feb 26, 2017 5:49 am

Re: scania_2016 interior anim_pmd

Post by Fazer001 »

So, you can do what you want but in game is the same one white bar.

Image

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

Re: scania_2016 interior anim_pmd

Post by Oleg »

move them even further, and check in game.

I would even recommend to move them as a ladder: the leftmost - just a bit toward the driver seat, the second - a bit more, the third - 1cm to the driver, fourth - 5cm to the driver... just to see whether the thing actually works or not.

I can see the animation playback to be correct in ZModeler before and after export.
Post Reply