Hi,
I have a model with many individual meshes that I want to pick individually in Cesium.
First issue: Performance
If I export from Blender a single Collada file, and convert it into glTF, the picking works fine but the performance is horrendous.
I suspect that there are too many draw calls (e.g. one per mesh).
If I merge all meshes within Blender and export to Collada and then to glTF, the picking only selects the entire model.
However, the performance is great! Once again, it seems that this is due to using one draw call for the whole model.
Second issue: Picking methods
Continuing from the first issue described, I have more thoughts about picking.
One workaround I’m thinking about, is to somehow use a duplicate model with individual meshes for picking, but showing only the model with merged meshes.
On the other hand, I’m also thinking about using the model’s vertex attributes or uv coordinates to conduct picking.
Is there any way I can retrieve the vertex attributes of a model based on a picked position?
I wouldn’t mind tweaking Cesium’s source code to have a custom build, but I’m not sure where to start.
In summary, my questions are:
- Performance: is there a way to create a ModelCollection? E.g. allowing many models to be drawn using just one draw call like Billboards
- This would allow me to export each mesh as an individual model, and combined them in Cesium
- Picking: is there a way to use a duplicate model with individual meshes just for picking, but what is shown is the model with merged meshes?
- Picking: is there a way to find the vertex attributes of the model, at the face that was picked?
I’m a beginner just starting out with Cesium, loving it for all the things it can do, but I’m currently stuck on the issues above.
Would love some help from the Cesium community!
Cheers!