cnr-isti-vclab / meshlab

The open source mesh processing system
http://www.meshlab.net
GNU General Public License v3.0
4.72k stars 822 forks source link

glTF2 format support #441

Open vpenades opened 5 years ago

vpenades commented 5 years ago

It could be nice if MeshLab could provide support for the glTF format.

There's already a number of libraries in C++ for it, like https://github.com/Microsoft/glTF-Toolkit

stale[bot] commented 4 years ago

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

goldragoon commented 4 years ago

Is there any progress on this issue? If not, I'd like to start with it.

alemuntoni commented 4 years ago

Hi @goldragoon, sorry but there is no progress on this :( But PRs are welcome :)

alemuntoni commented 3 years ago

Hi everybody, I've just added a gltf importer into meshlab! Right now, only .gltf files are supported (some material info, animations, skeleton etc. are ignored since they are not supported natively into meshlab). I plan to add support also for importing .glb files and exporting gltf/glb in the future, therefore we can say that this feature request is done at 25% :). I still don't know when though. You can try the importer by downloading the last nightly build, and of course it will be included in the next meshlab version. Looking forward for your feedbacks!

alemuntoni commented 3 years ago

Another small update: now also *.glb files are supported (it was easier than I thought), therefore we can say that we are at 50%. :) Hope to add the exporter in the near future!

Tzanker commented 3 years ago

@alemuntoni thanks for the work so far! Do you have any update on exporting glb or gltf? I would find it really helpful!

alemuntoni commented 3 years ago

@Tzanker nope, sorry. It will require some time to implement it. Hope to have it by October/November..

vpenades commented 3 years ago

@alemuntoni Regarding writing glTFs, I would like to give you some advices:

It's not my use case, but I am aware that many MeshLab users do use it with models with millions of polygons. Now, glTF does support very large meshes, but only under certain conditions.

So, for relatively (*) small meshes, I would use a generic glTF exporter... but for very large meshes, I would use a domain specific exporter, where, each individual mesh would have a separated binary blob for positions, normals and UV coords. That way, the maximum number of vertices for a single mesh could be increased to 2Gb / 12 = 178 million vertices.

alemuntoni commented 3 years ago

Thanks for letting me know this, @vpenades! I need to check if tinygltf allows to control these scenarios, since it is the library we use for parse gltf in the importer, but should be fine.

vanous commented 3 years ago

This is very awesome, having the possibility to use pymeshlab and export glb would be really great!

alemuntoni commented 3 years ago

@vanous see #911

vanous commented 3 years ago

Yes, yes, i corrected myself fast, after noticing it :) . I just tested pymeshlab and it works well, great job!

alemuntoni commented 3 years ago

Oh ok, sorry @vanous! I still receive questions asking for meshlabserver, therefore it's kind of automatic for me to link that issue :D

elenzil commented 3 years ago

thrilled to see glb and gltf in meshlab! seeing some issues, tho, and filed this.

ttsesm commented 2 years ago

@alemuntoni I am trying to load some .gltf files downloaded from the sketchfab, e.g. https://sketchfab.com/3d-models/hydria-apothecary-vase-7d6938c0c0b54b06a0210a982a73023e however there is no texture loaded: image

Any idea what could be wrong?

mikeucfl commented 2 years ago

@Tzanker nope, sorry. It will require some time to implement it. Hope to have it by October/November..

Just curious if there has been any new updates for gLTF exporting, thanks!

mark2142 commented 2 years ago

I am using pymeshlab. I am trying to export a glb to obj. I am getting this error. failed to save ouput file Image processed/texture_1 cannot be saved. Your MeshLab version has not plugin to save file format. What format is it trying to save? Can it be fixed?

gunmiosb commented 2 years ago

I wanted to do the something similar as @mark2142

The problem seems to be embedded images in the gltf/glb file. If i use gltf/glb with external buffers/images the conversion works.

malkasem commented 5 months ago

Hi everybody, I've just added a gltf importer into meshlab! Right now, only .gltf files are supported (some material info, animations, skeleton etc. are ignored since they are not supported natively into meshlab). I plan to add support also for importing .glb files and exporting gltf/glb in the future, therefore we can say that this feature request is done at 25% :). I still don't know when though. You can try the importer by downloading the last nightly build, and of course it will be included in the next meshlab version. Looking forward for your feedbacks!

Hi, I want to ask please, if there is now possiblity to use MeshLab for importing *.glb files and exporting gltf/glb ?I appreciate it in advance!

ccdejene commented 1 month ago

same issue:

texture_0 cannot be saved. Your MeshLab version has not plugin to save file format.

any update on this ?