mergeVertices colors mapping problem

Hi.

I am using Geometry.mergeVertices method and I have realized that colors are not properly mapped after merging.

In my case I have a IndexedBufferGeometry which I convert into a geometry with:
geometry = new THREE.Geometry().fromBufferGeometry( geometry );

After doing this colors i Geometry are ok.

But after applying mergeVertice they don’t.
geometry.mergeVertices();

It seems that this method doesn’t take in mind colors.

Is there any fix for this?

Best regards

Any chances to demonstrate this issue with a live example? Right now, it’s hard to understand the expected and actual visual result.

Hi.

Today I will try to push a live example.

It’s quite easy to demonstrate with a merged BufferGeometry composed of multiple bufferGeometries with different colors.

Best regards

mergeVertices in the BufferGeometryUtils example should (if I remember right) account for multiple vertex attributes in a geometry and correctly retain vertex colors:

I think in general it’s considered best to not use Geometry if you can avoid it.

1 Like

Hi

Very sorry for the delay.

I have been on vacations in a place with no internet connection. Really nice.

: )

I will try this option and will keep you informed,

Best regards