Billboard Meshes Performance?

I’ve noticed when billboarding meshes that if you have a decent number (lets say 2000), performance tanks.

It seems more performant to iterate over an array of those meshes per tick and use the lookAt function.

For some reason this does not feel right. Any ideas how to make billboard mode be more performant?

Im assuming its because of all the world matrix calculations. Maybe there would be a better way to do this?

cc @Cedric, I don’t know if we can do any better, we have to handle a number of cases in the billboard code (type of billboard, pivot point/matrix, parents, …).

If you have a simple case, like a mesh without any parent and in the “billboard_all” mode, then you can simply copy the orientation of the camera to your mesh (see my answer in your other thread).

1 Like

As @Evgeni_Popov says. bilboarding handles multiple modes (1 or multiple axis, parents,…). If you have a simpler use case for many more meshes, I think it’s a good solution to code a custom version.
For example, handling billboarding is a vertex shader can be very fast and not rely on CPU.