vpenades / SharpGLTF

glTF reader and writer for .NET Standard
MIT License
476 stars 75 forks source link

Merge Meshes #126

Closed famda closed 2 years ago

famda commented 2 years ago

Hi, Is is possible to merge meshes and the materials of those meshes as one?

Could you help, please?

Thanks in advance.

vpenades commented 2 years ago

https://github.com/vpenades/SharpGLTF/issues/79

https://github.com/vpenades/SharpGLTF/issues/104

famda commented 2 years ago

Hi, Thank you for the quick reply but, unfortunatly, that is not what I'm looking for. This video explains the problem that I'm not being able to solve so far.

https://youtu.be/6APzUgckV7U

The idea is to have 1 model with multiple meshes and be able to merge those meshes together as 1.

Thanks in advance.

vpenades commented 2 years ago

if you simply want to "merge" multiple meshes into one, you must create a new MeshBuilder and aggregate the vertices of the source meshes into that MeshBuilder.

Notice that "merging" meshes is not the same as fusing the meshes with a boolean operation (add, subtract, etc) which is not supported by the library

famda commented 2 years ago

I can try that and see what happens. 😀

I'm not sure I understand the fusing part. Sorry about that, I'm still new to this 3d world.

Thanks.