Problem with Collisions_0.bin (map)

2k Czech Mafia II game modding.

Moderator: Oleg

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

Problem with Collisions_0.bin (map)

Post by norskpl »

Hi!

I have problem with loading collision in zmodeler 3 (both versions).
When I try to open a collision file (even collision file only, no normal objects) I get Out of memory error (x86) or Zmodeler 3 just crashes after starting loading file (x64).
I tried before to load entire city sds with collisions too, but same result.
Game can normal load them, so I'm sure it's zmodeler 3 fault. Mafia 2 Toolkit can load them too.

Zmodeler x64 try opening video: https://www.youtube.com/watch?v=oR04mTxaALM

Zmodeler x86 try opening video: https://www.youtube.com/watch?v=TzGDFQosDms

Game screen with working Collisions_0.bin file:

Image

I already tried to:

- Reinstall zmodeler 3
- Install newest version of zmodeler 3
- Reinstall all Visual C++ libraries
- Reinstall graphics card drivers

I tested old versions of zmodeler 3 too (Build 1194), same situation accurs. I don't know what causing crashes of zmodeler, game reads collisions normally and there is no problem with them (no game crashes).
Zmodeler 3 can open this city sds properly only without collisions. If I will try to load city sds with that collision file then zmodeler starts crashes.
Of course, I could do the collisions from scratch again, but I don't want to waste my and Agens job on it.
So I'm asking you, Oleg. Can you check this collision file?

I'm sending a zip with the collision file:
https://yadi.sk/d/HEJYtVvRDJW3ww

If you need the whole city sds file, I can send it in a private message.
User avatar
norskpl
Posts: 11
Joined: Sat Nov 30, 2019 9:25 am

Re: Problem with Collisions_0.bin (map)

Post by norskpl »

I fixed problem with collisions mentioned above, but now I have another problem.
Problem occurs with opening original hunters.sds (no changes) on build 1195 (newest).

Hunters.sds is unable to load, zmodeler falls into infinite loading.
But when I remove collisions and untick default.mtl then zmodeler can load hunters properly.

I recorded video where you can see that problem - https://www.youtube.com/watch?v=PX91wvAPUbc

I'm asking for your help/fix
User avatar
agens
Posts: 59
Joined: Fri Feb 20, 2015 8:16 am

Re: Problem with Collisions_0.bin (map)

Post by agens »

Таже проблема и у меня. На версии 1192 карта hunters.sds открывалась, а вот на 1193 и выше уже нет, что то поменялось, из за чего не открывается.
User avatar
Oleg
Site Admin
Posts: 14045
Joined: Fri Feb 06, 2004 3:54 am
Contact:

Re: Problem with Collisions_0.bin (map)

Post by Oleg »

Get an update and check whether it works or not. Collisions import/export was refined, so if you've had another file that failed to import with collisions, it worth to be checked too.

Качаем обновление, проверяем.
Исправление затрагивает загрузку коллизий. если где-то раньше на импорте с коллизиями вылетало, проверьте и там тоже.
User avatar
norskpl
Posts: 11
Joined: Sat Nov 30, 2019 9:25 am

Re: Problem with Collisions_0.bin (map)

Post by norskpl »

Oleg wrote:Get an update and check whether it works or not. Collisions import/export was refined, so if you've had another file that failed to import with collisions, it worth to be checked too.

Качаем обновление, проверяем.
Исправление затрагивает загрузку коллизий. если где-то раньше на импорте с коллизиями вылетало, проверьте и там тоже.

Thanks for update, now I can load them all.

If I'm here, I'll ask - what is file size limit in zmodeler for each generated IndexBufferPool file (Static Scene)?
I've been checking game recently and I found out that if a single IndexBufferPool file is over 920 KB then game has glitches with some meshes. It looks like the game has a 920 KB limit on single IndexBufferPool.
Many times I had that zmodeler generated an IndexBufferPool file that exceeded 920 KB and then I had glitches in game. Hence my request - can you add limit 920 KB for IndexBufferPool files to Zmodeler 3 mafia 2 exporter? It would make my job easier.

Underneath, I'm adding image with file size and game glitches.

File size (some Index exceeds 920 KB):
Image

It causes glitches:
Image

I fixed that by resaving and file sizes are currently:

Image

Game can load now them perfectly without glitches:

Image

As I noticed Zmodeler saves files differently each time I click export and sometimes it manages to fit within this limit and sometimes not. It would be great if you set a hard limit to these files.
User avatar
Oleg
Site Admin
Posts: 14045
Joined: Fri Feb 06, 2004 3:54 am
Contact:

Re: Problem with Collisions_0.bin (map)

Post by Oleg »

files are packed to up to 128 geometry fragments in each. This visual glitch is likely when one fragment excedes 64K vertices. If you re-import a "problematic" exported scene into ZModeler do you see the same glitch in ZModeler?
Post Reply