Get transformations from geometry

Hi Guys,

I’m implementing instancing and at the time of parsing the geometry data from model i’m identifying the duplicate geometries and creating instanced mesh for those duplicate geoms.
But during parsing i’m unable to get the transformation matrix of geometries so,
Can we calculate transformation matrix from the three js geometry itself?


You can get transformation matrix of the object, that contains geometry. object.matrixWorld

I can’t add the object to the scene as I’m working on instanced mesh.
Can we calculate it from geometry?

What model, and how do you identify the dublicates? :thinking:

I’m calculating the diagonal vector from bounding box if it is same then i’m also checking the no of faces vertices present in the geometry.

If everything is same then I’m considering it as a duplicate geometry.

If there is better way to do this, Let me know that would be really helpful. :smile: