Automat functtion - New Look Variants

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

Automat functtion - New Look Variants

Post by Harald-RS »

Hello Oleg,

Is it somehow possible that the Z-Mod, if you use the Automat function and you want to add colour variants afterwards, that it creates one for this colour anyway?

And not use the main mat name and then write the colour e.g. lilaplas blue behind it.
Greetings
Harald
My System: PC Windows 11
User avatar
Oleg
Site Admin
Posts: 14045
Joined: Fri Feb 06, 2004 3:54 am
Contact:

Re: Automat functtion - New Look Variants

Post by Oleg »

May you describe this in detail with probably a screenshot? I'm not getting what exactly do you mean here.
User avatar
Harald-RS
Beginner
Posts: 332
Joined: Sun Oct 21, 2012 8:08 am
Location: Treuchtlingen / Germany

Re: Automat functtion - New Look Variants

Post by Harald-RS »

Picture 1:
Z-Mod3_automat_function_pic_1.PNG
Pictures 2:
Z-Mod3_automat_function_pic_2.PNG
Pictures 3:
Z-Mod3_automat_function_pic_3_new_look.PNG
Pictures 4:
Z-Mod3_automat_function_pic_4_new_look.PNG
After Export was the new Look Variant Name: a9d7a815f2965bba_test.mat

The new Look dosen't have a own MAT number.
Greetings
Harald
My System: PC Windows 11
User avatar
Oleg
Site Admin
Posts: 14045
Joined: Fri Feb 06, 2004 3:54 am
Contact:

Re: Automat functtion - New Look Variants

Post by Oleg »

So, you create a new state (look) and assign it on material. If you export the scene, PMD file will refer to the new variant too. Is the issue in the name of material file only? Actually, the exporter should generate "automat" location for MAT file for the new state and will reuse specified /automat/.... file names where they are explicitly specified on materials (all other states except the "Test" on your last screenshot).

Or I'm not getting the point right?
User avatar
Harald-RS
Beginner
Posts: 332
Joined: Sun Oct 21, 2012 8:08 am
Location: Treuchtlingen / Germany

Re: Automat functtion - New Look Variants

Post by Harald-RS »

You understand that the new variant is created but with the name of the main mat and then with the addition: _Test.
Greetings
Harald
My System: PC Windows 11
User avatar
Oleg
Site Admin
Posts: 14045
Joined: Fri Feb 06, 2004 3:54 am
Contact:

Re: Automat functtion - New Look Variants

Post by Oleg »

This is the default material naming logic. If you toggle "Use automat folder" option on export, does this change?
User avatar
Harald-RS
Beginner
Posts: 332
Joined: Sun Oct 21, 2012 8:08 am
Location: Treuchtlingen / Germany

Re: Automat functtion - New Look Variants

Post by Harald-RS »

No it's working.

Only working if there are no materials inside at all.

Then Z-Mod creates completely new variants.
Greetings
Harald
My System: PC Windows 11
User avatar
Oleg
Site Admin
Posts: 14045
Joined: Fri Feb 06, 2004 3:54 am
Contact:

Re: Automat functtion - New Look Variants

Post by Oleg »

Make sure material is not assigned onto any "Material group" in a top-left area of materials browser. If material is assigned there, the exporter will use this group as a path to generated materials for this material file. Entries in material's "Material state" for look variants have higher priority and will suppress this "material group" assignment, so mat files for states with explicitly defined path/name will be created with this path/name value on material. however, the newly added state ("Test") has no explicit assignment and material's group assignment will take the action. As a result, material "main_body" assigned to group like "/automat/b3" will produce file /automat/b3/main_body_test.mat
User avatar
Harald-RS
Beginner
Posts: 332
Joined: Sun Oct 21, 2012 8:08 am
Location: Treuchtlingen / Germany

Re: Automat functtion - New Look Variants

Post by Harald-RS »

That's exactly what I said, if I already have a material file for a component and then I want to add more looks for it, then this error occurs.

Unless I take away the automat/xy from the main material, then it creates completely new materials for the main material and the existing looks.

Normally Z-Mod should recognise when a new look is added to the existing material that it only creates the mat for the new look and leaves all others untouched. No matter if the folder automat/xy already exists.
Greetings
Harald
My System: PC Windows 11
User avatar
Oleg
Site Admin
Posts: 14045
Joined: Fri Feb 06, 2004 3:54 am
Contact:

Re: Automat functtion - New Look Variants

Post by Oleg »

no, normally it should not. In general, if you want an "automat" folder to be utilized on export, each and every material/state should not be assigned path at all. For example, "retain material folders" option should not be used it you are about to make changes in materials setup. This option can be used if you will export scene that gives absolutely no changes in materials, so original .mat files can be used. If your intent is to make changes in materials, load model with no "retain material folders" option. In such a case, an export will generate the same /automat/ entries for every state again and will generate correct /automat/ entry for the newly-added state too.

If you don't follow this scenario, you can easily make change in some material (by intend or by mistake) and a different material will be created (and put into the same /automat/.. entry as it was originally) that could cause other mods to catch this alternated material too. The idea of /automat/ folder is that every material file name there is an exact hash of its contents and any tiny change in material will give new hash value (and a new .mat file). So, if you make no changes in materials, they will have the same hashes and same .mat files in the same /automat/ folders. Given that, disable "retain material folders" option on import.

I personally insist that either "Utilize automat folder" used OR "retain materials folder" is used. Unfortunately, these are separated by their usage area (export and import), so ZModeler can't have this logic hard-coded. The "retain materials folder" option was used when there were no "automat" generation features in a filter, so it is a bit obsolete.

Material assignment onto a material group to specify a location folder should nowdays be used only to specify precise location of material file on such a materials like /material/terrain/ or something like /material/building/bricks/ and like this - materials that are shared across a big mod and structured in folders for manual editing. In other cases, rely on "automat" folder and generated materials on export. I understand, it might be hard to manually check/inspect the generated .mat files as you don't know their names and locations, but while testing your mod, you can disable "automat" folder to get all materials created in an export folder.
User avatar
Harald-RS
Beginner
Posts: 332
Joined: Sun Oct 21, 2012 8:08 am
Location: Treuchtlingen / Germany

Re: Automat functtion - New Look Variants

Post by Harald-RS »

So again for the borrow,

if I understood you correctly.

So I take the Mat where the assignments for the different Looks "so the main Mat" the folder /automat/xy just leave them out but assigned to the 3D model.

Then I add the new look but leave the other variants inside and export the whole thing. Now, when exporting, the existing look variant is then integrated with the other look variants in a new main mat and the new look is then the new main mat.
Greetings
Harald
My System: PC Windows 11
User avatar
Oleg
Site Admin
Posts: 14045
Joined: Fri Feb 06, 2004 3:54 am
Contact:

Re: Automat functtion - New Look Variants

Post by Oleg »

simply drag&drop material onto "All materials" branch to remove group assignment on this particular material. When no group is assigned and you export with "utilize automat folder", the automat/filename will be evaluated again. It will still assign a pre-defined automat/folder for old states (as they are specified inside material, and this is OK) and will give a new unqiue automat/filename for the newly added state on material.
Ventyres
Posts: 7
Joined: Mon Nov 23, 2020 3:27 am

Re: Automat functtion - New Look Variants

Post by Ventyres »

If you add a new look and want an own mat for that look instead of the base_test name, then you simply add your own path behind the look in Materials Options.
User avatar
Harald-RS
Beginner
Posts: 332
Joined: Sun Oct 21, 2012 8:08 am
Location: Treuchtlingen / Germany

Re: Automat functtion - New Look Variants

Post by Harald-RS »

I'm not going to do that kind of bullshit.
I stick to the SCS standard, from 1.48/1.49 this kind of materials are no longer supported that's why the Blendertools always create automatic folders and the names.

Because then it does not happen that it says the model has too many components for a Mat file.
Greetings
Harald
My System: PC Windows 11
Ventyres
Posts: 7
Joined: Mon Nov 23, 2020 3:27 am

Re: Automat functtion - New Look Variants

Post by Ventyres »

I don´t like automat folders, because when you want to change something only in the mat file, is harder to find them. but that´s just my opinion
User avatar
Harald-RS
Beginner
Posts: 332
Joined: Sun Oct 21, 2012 8:08 am
Location: Treuchtlingen / Germany

Re: Automat functtion - New Look Variants

Post by Harald-RS »

Das kannst du ab 1.48 vergessen das manuelle Editieren, das wird dir DX12 dann übel nehmen.
You can forget about manual editing from 1.48, DX12 will resent that.
Greetings
Harald
My System: PC Windows 11
Ventyres
Posts: 7
Joined: Mon Nov 23, 2020 3:27 am

Re: Automat functtion - New Look Variants

Post by Ventyres »

We will see
Post Reply