OpenDroneMap / Obj2Tiles

Converts OBJ files to OGC 3D tiles by performing splitting, decimation and conversion
GNU Affero General Public License v3.0
196 stars 58 forks source link

Exception: The number of sub-mesh material names does not match the count of sub-mesh index arrays. #54

Open zuihuifeideyu opened 9 months ago

zuihuifeideyu commented 9 months ago

First of all, thank you for taking the time to report an issue.

Before you continue, make sure you are in the right place. Please open an issue only to report faults and bugs. For questions and discussion please open a topic on http://community.opendronemap.org/c/opendronemap.

Please use the format below to report bugs and faults.


What is the problem?

when i use Obj2Tiles to split my obj file have a exception :Exception: The number of sub-mesh material names does not match the count of sub-mesh index arrays.

What should be the expected behavior?

Please tell me , why this exception happened, and how to solve it. If it is the format of the Obj data itself, please give me an answer. Thank you very much!

How can we reproduce this? THIS IS IMPORTANT. What steps did you do to trigger the problem? If this is an issue with processing a model, YOU MUST include a copy of your model uploaded on Google Drive or Dropbox (otherwise we cannot reproduce this) along with the command line parameters you used to process it.

[Type answer here]

dashenxian commented 8 months ago

I also encountered the same problem version:v1.0.12 objfile:obj_group_xwcshy_model.zip command:.\Obj2Tiles.exe .\obj_group_xwcshy_model\build_0559d0fa28704480952f058ede210c08_3.obj .\outpu1

Cq5616 commented 4 months ago

same problem version:v1.0.12 objfile: longchuan.zip command: .\Obj2Tiles.exe .\input\longchuan\longchuan.obj .\output\longchuan

MattSmillie commented 3 months ago

So for me the issue was that the OBJ has several materials defined, however, one of the materials was right at the end of the file and no faces/triangles were assigned to it (it was just a default material). Simply removing the last line (usemtl blah_blah) of the OBJ file fixed the problem. I guess it would probably be better for the converter to log a warning instead of failing perhaps.

jingyangking commented 2 months ago

First of all, thank you for taking the time to report an issue.

Before you continue, make sure you are in the right place. Please open an issue only to report faults and bugs. For questions and discussion please open a topic on http://community.opendronemap.org/c/opendronemap.

Please use the format below to report bugs and faults.

What is the problem?

when i use Obj2Tiles to split my obj file have a exception :Exception: The number of sub-mesh material names does not match the count of sub-mesh index arrays.

What should be the expected behavior?

Please tell me , why this exception happened, and how to solve it. If it is the format of the Obj data itself, please give me an answer. Thank you very much!

How can we reproduce this? THIS IS IMPORTANT. What steps did you do to trigger the problem? If this is an issue with processing a model, YOU MUST include a copy of your model uploaded on Google Drive or Dropbox (otherwise we cannot reproduce this) along with the command line parameters you used to process it.

[Type answer here]

I also encountered the same problem, the display grid material and index array do not match. Have you resolved it

jingyangking commented 2 months ago

First of all, thank you for taking the time to report an issue. Before you continue, make sure you are in the right place. Please open an issue only to report faults and bugs. For questions and discussion please open a topic on http://community.opendronemap.org/c/opendronemap. Please use the format below to report bugs and faults.

What is the problem?

when i use Obj2Tiles to split my obj file have a exception :Exception: The number of sub-mesh material names does not match the count of sub-mesh index arrays.

What should be the expected behavior?

Please tell me , why this exception happened, and how to solve it. If it is the format of the Obj data itself, please give me an answer. Thank you very much!

How can we reproduce this? THIS IS IMPORTANT. What steps did you do to trigger the problem? If this is an issue with processing a model, YOU MUST include a copy of your model uploaded on Google Drive or Dropbox (otherwise we cannot reproduce this) along with the command line parameters you used to process it.

[Type answer here]

I also encountered the same problem, the display grid material and index array do not match. Have you resolved it

When I export the model as OBJ, I can convert it well when I choose materials and UV textures that are not retained, which means the main reason lies in the texture and material