Splits after importing?

Report about ZModeler2 bugs here and only here.

Moderators: Oleg, _RicH_

User avatar
BullseyeSBT
Posts: 17
Joined: Tue Aug 06, 2019 8:59 am

Splits after importing?

Post by BullseyeSBT »

I am have this issue whereby I get splits in my car model after importing into zmodeler, I get this issue both importing OBJ and DAE formats, I use blender 2.82 to create the models and the splits weren't there when I exported it.

Thanks in advance.


~John~
User avatar
Oleg
Site Admin
Posts: 11212
Joined: Fri Feb 06, 2004 3:54 am
Contact:

Re: Splits after importing?

Post by Oleg »

most likely geometry exceeds 64K vertices limit per one object and importer have to split it to several objects.
User avatar
BullseyeSBT
Posts: 17
Joined: Tue Aug 06, 2019 8:59 am

Re: Splits after importing?

Post by BullseyeSBT »

What would I do to fix it?
User avatar
Oleg
Site Admin
Posts: 11212
Joined: Fri Feb 06, 2004 3:54 am
Contact:

Re: Splits after importing?

Post by Oleg »

If the specified above is the actual reason, nothing can be done. ZModeler can not handle geometry object with more than 64K vertices in it. However, an exporter (GTA5 export for example) can handle groups properly. Thus, you can group these split parts together into a single object (with more than 64K vertices in total) and exporter will export it properly.

To group objects, select them in hierarchy view and press "Group" button on Structure panel. You might need to convert this group to Compound afterward (e.g. to L0 component of some object).
User avatar
BullseyeSBT
Posts: 17
Joined: Tue Aug 06, 2019 8:59 am

Re: Splits after importing?

Post by BullseyeSBT »

Is the weld tool any good for this?
User avatar
Oleg
Site Admin
Posts: 11212
Joined: Fri Feb 06, 2004 3:54 am
Contact:

Re: Splits after importing?

Post by Oleg »

no. weld tool performs per-vertex welding.

attach tool can be used. however, if you hit 64K vertices limit on attached parts, geometry will be messed (random triangles on wrong vertices).

you can select several objects and inspect Properties->Mesh->Vertices, Count. If you are within 64K limit, selected objects could be attached together.

Also, upon import from OBJ or DAE some geometries appear to be loaded with all vertices being split apart. If you can't hover some vertex so it highlight several neighbor polygons (and only one triangle gets highlighted), then your geometry as redundant/duplicated vertices. You can fix this with Weld tool operating in "Multiple targets" (see options) mode, with options: distance = 0.0001, uv distance = 0.01, Normals angle = 40.
User avatar
BullseyeSBT
Posts: 17
Joined: Tue Aug 06, 2019 8:59 am

Re: Splits after importing?

Post by BullseyeSBT »

Any chance this will be fixed in the future?
User avatar
Oleg
Site Admin
Posts: 11212
Joined: Fri Feb 06, 2004 3:54 am
Contact:

Re: Splits after importing?

Post by Oleg »

no. Objects in ZModeler will retain with 64K vertices limit. There is no obvious reason to redesign an application to avoid this limitations, as all games do have the same limitations on hardware level too. Each geometry object rendered in game does not exceed 64K vertices when being drawn. Some are split to fragments (one per material) or one per "memory fragment". Yet this is a sort of limitation for the artist to deal with when asset is being created/edited in editor, but one should pay attention to optimization rather than excessive detalization.
User avatar
BullseyeSBT
Posts: 17
Joined: Tue Aug 06, 2019 8:59 am

Re: Splits after importing?

Post by BullseyeSBT »

It's happening with vanilla cars from GTA V which is all I work with, is it possible Rockstar may have used too many verts?

It doesn't seem to affect things ingame mind..
User avatar
Oleg
Site Admin
Posts: 11212
Joined: Fri Feb 06, 2004 3:54 am
Contact:

Re: Splits after importing?

Post by Oleg »

May be I'm missing something or not getting it right, may you show some screenshots showing what exactly is wrong?
User avatar
BullseyeSBT
Posts: 17
Joined: Tue Aug 06, 2019 8:59 am

Re: Splits after importing?

Post by BullseyeSBT »

Image
User avatar
Oleg
Site Admin
Posts: 11212
Joined: Fri Feb 06, 2004 3:54 am
Contact:

Re: Splits after importing?

Post by Oleg »

this is likely to be computation inaccuracy or uv-mapping is slightly different on adjacent polygons. ZModeler can merge points of they match perfectly on all components (normals, UV, color). In general, it should be not harmful for the model to have these edges, unless you apply Surface\Normals\Calcualte to the model.

you can try to reduce the problem by selecting a group of vertices (like you've rounded them up on screenshot) and use Modify\Submesh\Weld tool with "multiple targets" mode. you can ease the constrains/precision of merging on points distance, their uv mapping distance and normals angle in flyout options window.
User avatar
BullseyeSBT
Posts: 17
Joined: Tue Aug 06, 2019 8:59 am

Re: Splits after importing?

Post by BullseyeSBT »

To be honest it's not a major issue, you can't really see it ingame, it's not likely to cause performance issues is it?
User avatar
Oleg
Site Admin
Posts: 11212
Joined: Fri Feb 06, 2004 3:54 am
Contact:

Re: Splits after importing?

Post by Oleg »

sure, not a big deal. You can import any original game model and see the same issue. E.g. the buffalo2 has the same sharp lines here and there too.
Post Reply