Problem with hierarchy

2k Czech Mafia II game modding.

Moderator: Oleg

User avatar
norskpl
Posts: 11
Joined: Sat Nov 30, 2019 9:25 am

Problem with hierarchy

Post by norskpl »

Hi.

I've added some new parts of the car in hierarchy and now zmodeler does not export car correctly.
Some parts are becoming invisible partially in the game. After reordering the same is happening but with other part.
I have tried changing the order in hierarchy for an hour and have not been able to make car fully working without invisible parts.

Here's example:

CoverF, with visible body sheet but part of grill is invisible.

Image

I'm using newest version of zmodeler with mafia2.zmf build 200. I've tried older version of zmodeler with mafia2.zmf (build 193) and the same is happening.
Adding new parts is very important during editing a prefab file (for example adding new lights). I have attached the zip archive with the mod.
Attachments
skodaoctavia.zip
Skoda Octavia for Mafia 2 Classic
(3.89 MiB) Downloaded 248 times
User avatar
Oleg
Site Admin
Posts: 14022
Joined: Fri Feb 06, 2004 3:54 am
Contact:

Re: Problem with hierarchy

Post by Oleg »

most likely the game has parts visibility control outside of the model file itself. for example, some tuning parts are switched on/off. I doubt this is something related to the export itself.

have you tried to export your model over a different game model to see whether the issue is exactly the same or differs?
User avatar
norskpl
Posts: 11
Joined: Sat Nov 30, 2019 9:25 am

Re: Problem with hierarchy

Post by norskpl »

Finally, with the help from Agens, the problem was halfway solved. One time he managed to set it so that the wipers were invisible in the game. Then changing their material to engine compartments helped.
Each time, two random parts were missing fragments, no matter how the hierarchy were set up.

In my previous converts a similar situation has already occurred, also vehicle parts fragments were disappearing, but changing their position in the hierarchy fixed this that time. In the case of Skoda, each time fragments of two parts disappeared or parts disappeared completely.
User avatar
Oleg
Site Admin
Posts: 14022
Joined: Fri Feb 06, 2004 3:54 am
Contact:

Re: Problem with hierarchy

Post by Oleg »

I was told there is an issue with materials count limit in exported model. When you rearrange parts in hierarchy, exporter processes materials of parts in order they appear in a hierarchy, so it is likely a different set of materials will get exported when you rearrange the order of parts. I mean, from, say, 20 materials the game will accept first 16 only, and will ignore 4 last materials. Depending on an order of parts, last four materials could "hide" some parts these materials are used in. when you change an order of parts, another 4 materials will get ignored.

I would recommend to arrange the order of materials and put the "lowest priority" materials in the end of materials list of materials browser. Thus you can find out whether issue is actually a "missing/hidden" material rather than a missing/hidden part issue.
User avatar
norskpl
Posts: 11
Joined: Sat Nov 30, 2019 9:25 am

Re: Problem with hierarchy

Post by norskpl »

This has happened to me again. Luckily I found a way to fix it and made a video about it.
It concerns the order of the materials.

https://www.youtube.com/watch?v=PP7uNxPHIUg
Post Reply