Poly and vertices size increasing giantic when exporting.

GTA:V Modding with ZModeler3 discussion.
Post Reply
throwingapples
Posts: 12
Joined: Sun Jun 04, 2023 8:03 am

Poly and vertices size increasing giantic when exporting.

Post by throwingapples »

I have been working on making vehicle ready for GTA:V. In zmod it says my vehicle is 248k vertices and 240k polygons. The moment when export my vehicle and view it in openiv it says it has 411k poly en 272k vertices. How can this possibly happen and what is the fix for this?
User avatar
Oleg
Site Admin
Posts: 14044
Joined: Fri Feb 06, 2004 3:54 am
Contact:

Re: Poly and vertices size increasing giantic when exporting.

Post by Oleg »

vertices increase from 248 to 272 is not something dramatic, but I can't give an exact reason. Most likely this is related to model materials. Every material has its own set of vertices, while in ZModeler materials assigned to polygons can reuse object's vertices. So, it is strongly advised to reduce materials count in a model for performance reason and to optimize model geometry on export.

Polygons count in ZModeler does not reflect quads be made of a pair of triangles, so one quad poly in ZModeler is two triangle polygons in OpenIV. If you expand properties window on polygons count in ZModeler, you will see an actual triangles count there. Triangles count is a more accurate measurement of your model detail level, as DirectX renders triangles only. (Quads are available to make geometry look more accurate while editing).
throwingapples
Posts: 12
Joined: Sun Jun 04, 2023 8:03 am

Re: Poly and vertices size increasing giantic when exporting.

Post by throwingapples »

It isn't the vertices count that bothers me that much. It is just just the 170k poly difference because that is not a small amount
User avatar
Oleg
Site Admin
Posts: 14044
Joined: Fri Feb 06, 2004 3:54 am
Contact:

Re: Poly and vertices size increasing giantic when exporting.

Post by Oleg »

check the "triangles" count in ZModeler.
Poly count should not change on export at all.
throwingapples
Posts: 12
Joined: Sun Jun 04, 2023 8:03 am

Re: Poly and vertices size increasing giantic when exporting.

Post by throwingapples »

Triangles are 412461, and poly count is 240602. But after export Polycount is 411909 and zmod does not show triangles count. Something to mention is in my z3d before I export, it says Format: Mixed for triangles. Could that possible relate to all of this?
User avatar
Oleg
Site Admin
Posts: 14044
Joined: Fri Feb 06, 2004 3:54 am
Contact:

Re: Poly and vertices size increasing giantic when exporting.

Post by Oleg »

absolutely. some of your geometry has polygons not as triangles (e.g. quads, polygons). The total polygons count in such a case is not representative, rely on "triangles count" only. After an export, model has triangles only, so if you import it back, the properties window will show polygons count (and every poly is a triangle) somewhat equals to old "triangles count".

once gain, your geometry has 400k+ triangles natively and exported with 400k+ triangles. Do not pay attention to "240k polygons" at all when viewing properties for a geometry with polygons format other than "triangles". There's absolutely no meaning of the quad (made of 2 triangles) to be counted as 1 polygon in properties window, the game (DirectX) will need to draw 2 triangles, so only triangles count is meaningful.
throwingapples
Posts: 12
Joined: Sun Jun 04, 2023 8:03 am

Re: Poly and vertices size increasing giantic when exporting.

Post by throwingapples »

Thank you for helping me out with this Oleg, I am now completely aware of how the system works and how to count polys/vertices/triangles/quads etc. I greatly thank your help and wish you a good day.
Post Reply