Joining several decals in one mesh

Hi, I am trying to cover a single 3D mesh (race track) with decals - the decals are of such size that I need around 200 of them to cover the track. Each decal is added to the scene (actually it is attached to the track mesh - via .attach(decal)) each decal uses exactly the same asphalt texture image - only that due to different rotations of the decals I achieve that repetition pattern of the texture on the final track does not exist.
The problem is that this procedure generates 200 calls during render time (plus 300 for the sand for which I do the same procedure with decals now with sand texture).
Is there a way to generate a single track mesh from those decals? I can do similar thing manually in blender3d - adding squares with asphalt texture and then just joining them in single mesh object.

thanks a lot!


You probably want to merge the decal geometries via BufferGeometryUtils.mergeBufferGeometries(). Since decals are based on DecalGeometry, all instances should have compatible buffer attributes (which is a prerequisite for using the above function).

Merging geometries with this method is demonstrated in different examples like:

Thanks a lot, man! This is exactly what I needed - works like charm!
This would be a good example to make - how to make non repetitive texture by sticking bunch of decals but in the end as a single object! Very nice!