Problem with number of verticies after export

GTA:V Modding with ZModeler3 discussion.
Post Reply
Seb5a
Posts: 33
Joined: Wed Aug 18, 2021 10:04 pm
Contact:

Problem with number of verticies after export

Post by Seb5a »

Hey,
I have a bug or maybe not with exported car. So in zmodeler i can see that my model has 192k verticies and after export in OpenIV i see that there is 310k verticies and my model is larger than the base model which is strange because I optimized model from 340k poly to 280k but don't know what's wrong with that verticies.
Attachments
ss.png
ss.png (12.41 KiB) Viewed 4704 times
User avatar
Oleg
Site Admin
Posts: 14045
Joined: Fri Feb 06, 2004 3:54 am
Contact:

Re: Problem with number of verticies after export

Post by Oleg »

If you re-import your model back into ZModeler, what is the vertices count?
Seb5a
Posts: 33
Joined: Wed Aug 18, 2021 10:04 pm
Contact:

Re: Problem with number of verticies after export

Post by Seb5a »

Oleg wrote: Sun Sep 25, 2022 12:51 pm If you re-import your model back into ZModeler, what is the vertices count?
Three screenshots in attachments
Attachments
before.png
before.png (1.39 KiB) Viewed 4674 times
after import.png
after import.png (1.52 KiB) Viewed 4674 times
OIV.png
OIV.png (3.63 KiB) Viewed 4673 times
Seb5a
Posts: 33
Joined: Wed Aug 18, 2021 10:04 pm
Contact:

Re: Problem with number of verticies after export

Post by Seb5a »

I've done welding on two parts because after import from Blender everything needs to be welded again and problem is only with those two elements
User avatar
Oleg
Site Admin
Posts: 14045
Joined: Fri Feb 06, 2004 3:54 am
Contact:

Re: Problem with number of verticies after export

Post by Oleg »

send me a .z3d file with just one part/object that suffers this issue, I'll take a look. In most of cases, ZModeler should not split vertices on export. It can split vertices (and increase vertices count) on import from blender/3dsmax or other packages. increase of vertices count on export from ZModeler looks a bit strange to me.
Seb5a
Posts: 33
Joined: Wed Aug 18, 2021 10:04 pm
Contact:

Re: Problem with number of verticies after export

Post by Seb5a »

Oleg wrote: Mon Sep 26, 2022 5:50 am send me a .z3d file with just one part/object that suffers this issue, I'll take a look. In most of cases, ZModeler should not split vertices on export. It can split vertices (and increase vertices count) on import from blender/3dsmax or other packages. increase of vertices count on export from ZModeler looks a bit strange to me.
I've send you in PM.
User avatar
Oleg
Site Admin
Posts: 14045
Joined: Fri Feb 06, 2004 3:54 am
Contact:

Re: Problem with number of verticies after export

Post by Oleg »

after reimport from blender all polygons in an object are in random order. Regular mesh usually have them going one to another on a small piece, so a set of polygons #1...30 are likely to be the same surface with a lot of shared vertices. Blender spreads polygons all around of your geometry object, so polygons #1..30 have no shared vertices at all.

GTA geometry is rendered in chunks with ~3-5K vertices, this is a limitation of memory management inside GTA code to fit different platforms.

When ZModeler creates a geometry for an exporter, it scans polygons one by another and feeds the geometry block with vertices until it reaches the limit. With the polygons tossed randomly on a heavy geometry you are likely to get way too many vertices that are not reused by polygons within one geometry block, and hitting the limit, ZModeler starts another block of geometry. Thats where those duplicate vertices comes from.

I don't have any good advice on how to fix your geometry object so it get exported better. You can chop it to objects with ~2K vertices in each and weld them together again. Then make an export. Once you chop and merge, you are likely to get polygons running over vertices from one (2K) group and this will reduce a chance for duplication. At least, give it a try.
User avatar
Oleg
Site Admin
Posts: 14045
Joined: Fri Feb 06, 2004 3:54 am
Contact:

Re: Problem with number of verticies after export

Post by Oleg »

It might be possible to let ZModeler weld vertices (it will detect duplicates) as follows:

1. select all vertices on problematic object
2. pick Modify\Submesh\Wled tool. expand its options
3. set "Multiple targes" option there, then click anywhere in viewport.
4. after a delay a flyout window will appear with settings for threshold:
set there distance to 0, UV distance to 0.001 and normals angle to 15. press OK.
Post Reply