How to merge an imported glb?

Hi everyone,

I can’t merge an imported glb, please help me.


As the error mentions, you “Cannot merge vertex data that do not have the same set of attribute”

meaning for instance if a mesh has uvs and the other one does not, you will not be able to merge them.

On a side note, you could manually remove the incompatible vertex data from the various meshes you are willing to merge to keep the common part only at the expense of the rendering result being probably not what you expect.


I found a solution with blender that i will post here later.

Now i have an issue on shadow rendering, what are these poluting “shadow lines” ? And why the FPS drop ?

thanks by advance

The bias should not be set to zero. The correct value depends on your scale and distance from the light.
When objects are small and light/shadow caster very close, the correct value might require a number of decimals (and becomes harder to adjust). Don’t ask me about the Maths to calc the value. I’m shit with Maths :grin: :face_with_hand_over_mouth:

Edit: Not sure about the performance drop (compared to?) Honestly, I didn’t notice a huge performance drop (but then, I didn’t measure it and as I said, towards what?). Still, I believe you do not need to push your mesh to the shadows render list, since you’ll hide it later anyways. Not sure it makes any difference though. I’d rather think it doesn’t. I also believe, better than mesh.isVisible, mesh.setEnabled(false) will exclude this mesh from any processing early in the process. But then again, I didn’t notice a change in perf just like that.

1 Like

I follow your recommendations and it works pretty well, thanks.

For the perfomances I looses 10 FPS when the shadows are casts. Does it mean that the shadow calculation/rendering on the car is that big to create lags ?

With shadows :
Without shadows :

PS : on the PG with shadows you can try to translate the camera until the cars go out of the canvas, you will see the 10 FPS that I mean (in theory, cause we don’t have the same computer ^^)

I’m not really a specialist for performance. What I can tell you is that indeed, the shadow generator has an impact on performance. It’s actually fairly costly. Essentially on the GPU time frame. Then the scene is limited to 60fps anyways so I have steady 60fps in this scenario. Though, I’m checking the absolute FPS as well as inter-frame and GPU times. Here the difference on these numbers is kind of obvious. Not much you can do about it except limit the number of objects that cast/receive shadows.

1 Like

This is kind of expected as you are rendering your full scene twice in the case of shadows. So it would be about twice the cost + and additional toll on your main pass to compute the shadows.

1 Like

Well, it’s good for my needs.

So to avoid the “Cannot merge vertex data that do not have the same set of attribute” issue i have 3 solutions, all with blender :

  1. Do not export the UVs

  1. Merge the mesh


  1. Add the missing UVs yourself

Please note that the method you will use will impact performance.