You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
as @aothms suggested in another thread, there is a fairly simple way to implement colors.
It would require to change the output format a bit, though.
First step would be to use geometryData.getMaterialIndices to split the vertex stream of an object in parts with same material, and export each piece as a separate geometry.
ThreeJS handles geometry without indices quite fine, so index stream can be omitted. On a side note, I see no reason why each triangle is exported two times in the current version.
Second step would be to change the "objects" part of the stream, so that it can support segmented objects. The easiest way would be to attach them as children to the Mesh3D objects, and assign individual materials. Each material can be accessed from the 'geometryData.getMaterials'. I'm guessing stream is four float values per material (RGBA).
The text was updated successfully, but these errors were encountered:
as @aothms suggested in another thread, there is a fairly simple way to implement colors.
It would require to change the output format a bit, though.
First step would be to use
geometryData.getMaterialIndices
to split the vertex stream of an object in parts with same material, and export each piece as a separate geometry.ThreeJS handles geometry without indices quite fine, so index stream can be omitted. On a side note, I see no reason why each triangle is exported two times in the current version.
Second step would be to change the "objects" part of the stream, so that it can support segmented objects. The easiest way would be to attach them as children to the Mesh3D objects, and assign individual materials. Each material can be accessed from the 'geometryData.getMaterials'. I'm guessing stream is four float values per material (RGBA).
The text was updated successfully, but these errors were encountered: