Lightmask Problem
Moderator: Oleg
-
- Posts: 5
- Joined: Sun Sep 26, 2021 9:31 am
Lightmask Problem
Hello, I'm having a problem with lightmask textures when importing game base models. It looks like the UV coordinates get lost and completely out of position, I've tried several solutions and none have worked for me, is there any solution?
Image 1 - Textures out of place when opening in Zmodeler
Image 2 - Same model when opened in blender, with the textures in their proper place
https://imgur.com/a/kiov3lT
Ps: sorry for my english, I'm using the translator for this message
Image 1 - Textures out of place when opening in Zmodeler
Image 2 - Same model when opened in blender, with the textures in their proper place
https://imgur.com/a/kiov3lT
Ps: sorry for my english, I'm using the translator for this message
Re: Lightmask Problem
Check the material's DETAIL2 texture slot or MASK texture slot (don't remember which of them) and set "UV Source" to "Manual UV#2" after import. You should see correct mapping in ZModeler and after an export, it should be correct in game too.
-
- Posts: 5
- Joined: Sun Sep 26, 2021 9:31 am
Re: Lightmask Problem
When importing the model the UVSET was defined as UV#2 and the coordinates were out of place, the solution I found was to use the UV copy, copying the coordinates from "UV#1" to "UV#2"... I believe it is an error in the shader configuration, as this is happening in several pieces that use "Bump+DualDiff", in any case, this UV copy seems to have worked
Re: Lightmask Problem
nope, it looks like mask texture is mapped exactly as primary texture and uses UV#1. In game the geometry can have its own channels assignment for the same material, but in ZModeler channels assignment is controlled by material itself.
I guess you should avoid "copy uv" in your case, just set "Manual UV#1" on mask/detail2 texture where it shows "Manual UV#2" on import.
I guess you should avoid "copy uv" in your case, just set "Manual UV#1" on mask/detail2 texture where it shows "Manual UV#2" on import.
Re: Lightmask Problem
Hi, I new to Z modeler and have a similar issue on a ATS trailer. I tried edited material UV channels but no luck. Can someone explain what I'm doing wrong/how to correct colors. Thanks.
https://ibb.co/RyFvNGW
https://ibb.co/C7Q4yL9
All surfaces are messed up in game including the reflective stripes.
https://ibb.co/RyFvNGW
https://ibb.co/C7Q4yL9
All surfaces are messed up in game including the reflective stripes.
Re: Lightmask Problem
I can see your materials have no textures. This is an incorrect import scenario, textures should be loaded too.
Re: Lightmask Problem
Edit: I'll add textures manually - reading your guide right now - I hope it should work. Its strange to me since ETS2 files load textures no problem.
Re: Lightmask Problem
Hi, I've managed to solve the problem with the trailer's missing textures successfully, thank you.
Can I ask another question I'm kinda lost about: what it means that all textures would be shown as purple in game?
SCS jeep_2 was imported and it had missing/renamed original SCS materials and most were missing textures. I added the missing textures manually to mats available ''Jeep_2_xyz(...).mat'' and it all shows fine in the Zmodeler. However in the game no matter how I export, all ''new'' mats are shown as purple. On exports new unique name is given to material such as usual: 0332bffb62c7abac.mat
If I could use some advice pls.
Can I ask another question I'm kinda lost about: what it means that all textures would be shown as purple in game?
SCS jeep_2 was imported and it had missing/renamed original SCS materials and most were missing textures. I added the missing textures manually to mats available ''Jeep_2_xyz(...).mat'' and it all shows fine in the Zmodeler. However in the game no matter how I export, all ''new'' mats are shown as purple. On exports new unique name is given to material such as usual: 0332bffb62c7abac.mat
If I could use some advice pls.
Re: Lightmask Problem
If I'm not mistaken, "red" materials in game means "material file not found' (.mat files location is wrong) and "purple" materials are "textures not found". Check the game log - you are likely to find the errors/warnings related to missing materials/textures. You could see there a full path the game used to locate a texture - may be path to texture(s) is wrong?
Re: Lightmask Problem
I've had it red when I tried changing the location of mats & textures manually after export. Will check ingame log. Thanks for the tip.
Re: Lightmask Problem
in general, you should not change location of .mat or .tobj files after export. ZModeler will create required folder(s) and create these files in proper folders. You might need to copy each .dds file next to an associated .tobj file. The rest should be fine.
If you get .mat or .tobj in a wrong folder (other than you expected it to be in), then you should refine settings on material/texture groups, as ZModeler computes folder name from these group names. Other than that, ZModeler can utilize "automat" folder like original game models do. All materials will go into evaluated (via hash on file data) sub-folders of "automat" folder.
If you get .mat or .tobj in a wrong folder (other than you expected it to be in), then you should refine settings on material/texture groups, as ZModeler computes folder name from these group names. Other than that, ZModeler can utilize "automat" folder like original game models do. All materials will go into evaluated (via hash on file data) sub-folders of "automat" folder.
Re: Lightmask Problem
OK, thanks Oleg, got that part of import of materials solved for the most part. I refine reconnection of textures manually and it does the trick.