3MFConsortium / spec_core

3MF's Core specification
BSD 2-Clause "Simplified" License
55 stars 16 forks source link

Is it possible to share vertices across multiple mesh objects? #30

Closed pierre-leon closed 5 years ago

pierre-leon commented 5 years ago

Is there any way to use one vertex buffer as a resource for all mesh objects? The logic here is that when the output is an assembly (made of multiple objects that are fused together to form one object) there would be multiple shared vertices and the file size may grow exponentially. image image from here

martinweismann commented 5 years ago

Hi @pierre-leon , as of now, it is not possible to reuse vertices from one in another. There are two workarounds: a) Define a mesh for the outer shell (in your example all of the organ including the veins) that also covers the inner structure (veins) with material and color you desire. Then, define for each vein a new mesh with the desired properties. This way, the interface (and their vertices) between vein and outer organs needs to be defined only once. The rule that decides which property will win (in this case the veins' properties) is specified at the end of this section. b) Define one mesh object that contains all shells (for outer organ hull and veins). vertices for the different shells are shared then.