Can not compact blend mesh on material

2k Czech Mafia II game modding.

Moderator: Oleg

huckleberrypie
Posts: 17
Joined: Wed Dec 18, 2019 3:30 pm

Can not compact blend mesh on material

Post by huckleberrypie »

Hmm, for some reason ZM3 glitched out on me recently with this:
Image

Steps to reproduce:
• Extract franca.sds using SDS Tool GUI
• Create franca.txt in franca folder, rename it as franca.mafia and import it in Zmodeler as usual
• Edit or perhaps do nothing at all
• Export it to franca.mafia and get the following error message:

Code: Select all

Can not compact blend mesh on material "FRANCAb". Detach polygons on this material. file:exportblendmesh.cpp line:857
I tried both rigging a new model to the franca skeleton and just importing and re-exporting the model as is but still no dice. This appears to be a rather glaring glitch from what I can tell; I haven't tried it on Vito or the others yet but still...
User avatar
Oleg
Site Admin
Posts: 14022
Joined: Fri Feb 06, 2004 3:54 am
Contact:

Re: Can not compact blend mesh on material

Post by Oleg »

mesh compacting requires vertices rearranging across entire geometry with a descent set of limitations and constrains that could cause this process to fail.

In attempt to avoid it, you should have fewer polygons that use one material. For example, if your entire model uses this material, you can create several copies of this material and assign head onto original material, hands and torso onto the first copy, legs onto the second copy. Then try to export.

P.S. ped/character models should be imported with skeleton. do not slice them to parts.
huckleberrypie
Posts: 17
Joined: Wed Dec 18, 2019 3:30 pm

Re: Can not compact blend mesh on material

Post by huckleberrypie »

Oleg wrote:mesh compacting requires vertices rearranging across entire geometry with a descent set of limitations and constrains that could cause this process to fail.

In attempt to avoid it, you should have fewer polygons that use one material. For example, if your entire model uses this material, you can create several copies of this material and assign head onto original material, hands and torso onto the first copy, legs onto the second copy. Then try to export.

P.S. ped/character models should be imported with skeleton. do not slice them to parts.
I've been told of the same thing by Sliderv2 yesterday actually. Are there any workarounds besides this? As this can be quite inconvenient especially if you deal with higher-poly ped models like the GTA V conversions agens made lately.
User avatar
Oleg
Site Admin
Posts: 14022
Joined: Fri Feb 06, 2004 3:54 am
Contact:

Re: Can not compact blend mesh on material

Post by Oleg »

no, there is no any other solution for this particular issue.
huckleberrypie
Posts: 17
Joined: Wed Dec 18, 2019 3:30 pm

Re: Can not compact blend mesh on material

Post by huckleberrypie »

Oleg wrote:no, there is no any other solution for this particular issue.
OK, but is this what you meant?
Image
I made duplicates of each material and sliced my model up to more manageable chunks.
User avatar
Oleg
Site Admin
Posts: 14022
Joined: Fri Feb 06, 2004 3:54 am
Contact:

Re: Can not compact blend mesh on material

Post by Oleg »

You should duplicate the exact material you get an error report for. You have a "Copy" button in material editor that does the trick. Then you assign one copy of your material onto some selected polygons of the model. You do not need to slice or detach model, just need a copy of material be assigned onto a set of polygons.

For example, head uses quite a lot of bones, so selecting a head polygons and assigning them their own unique copy of your "body" material is a good start. Then left and right hands - both use quite a lot of bones too, so use another copy of "body" material on selected polygons of left and right hands. Make an export attempt each time you duplicate material and assign it onto a portion of polygons. Mind, it is safe to assign material onto "left only" selection or "right only" selection of polygons, it will work too. I remind some original model required me two or three copies of material to get re-exported. A poly/vertices detail of your model does not actually matter, only skeleton and bones weighting does. Assuming you have the same skeleton as original model and you've copied weights from original model, it is likely you will need two or three copies of problematic material to fix the given issue.
Post Reply