CesiumGS / cesium

An open-source JavaScript library for world-class 3D globes and maps :earth_americas:
https://cesium.com/cesiumjs/
Apache License 2.0
12.82k stars 3.46k forks source link

Will the ModelInstanceCollection class be restored? #10846

Open zhwy opened 2 years ago

zhwy commented 2 years ago

I've noticed the ModelInstanceCollection has been removed since 1.96. It used to be placed in the Development category in the Cesium sandcastle. image ModelInstanceCollection is really useful and efficient to display a large amount of same models. Will it be restored in a subsequent version?

ggetz commented 2 years ago

Hi @zhwy, ModelInstanceCollection was marked as a private class, so it was not an official part of the API and was subject to change.

@j9liu Is there anyway for a user to hook into model instancing without 3D Tiles?

j9liu commented 2 years ago

Hi @zhwy,

Models can be instanced on the GPU if they contain the EXT_mesh_gpu_instancing extension, but as of now there's no class to instance models without the extension, or instance them on the CPU.

You can still manually create a collection of Models with different model matrixes -- is there a reason that you needed ModelInstanceCollection in particular?

zhwy commented 1 year ago

Hi @j9liu ,

I use ModelInstanceCollection to generate large batches of models dynamiclly. One application is that I need to display many vehicle models based on GPS data and update each instance's model matrix regularly.

j9liu commented 1 year ago

Hi @zhwy,

Thanks for the response. I'm not sure how much effort this would be to implement since ModelInstanceCollection may not be compatible with the new Model architecture. For now I've marked this as an enhancement to consider adding this in the future.

kikitte commented 1 year ago

+1. The same usage like what zhwy said, displaying large numbers of the same model. It would be nice to see that.

lhgbird1206 commented 1 year ago

+1,ModelInstanceCollection is convenient for implementing gltf instance,Look forward to seeing this feature again.

abearxiong commented 1 year ago

has other way ?

ggetz commented 1 year ago

@ptrgags Would you be able to advise on how something like ModelInstanceCollection could be implemented with the new model architecture?

yjwbill commented 1 year ago

Using ModelInstanceCollection to creating gltf instances is efficient and it can raplace the modelMatrix of each instance.Creating hundreds of moving cars is an easy thing by using ModelInstanceCollection ,but now i cannot do it. Looking forward to seeing this feature again.

ptrgags commented 1 year ago

Thinking about this a bit, rendering a static set of instances would be relatively straightforward to implement, since all the building blocks exist from the EXT_mesh_gpu_instancing code. However, dynamic updating of the model matrices would take more thought.

Let's start with the static case:

As for the dynamic case (updating the model matrices on the fly):

ggetz commented 1 year ago

Also requested on the forum: https://community.cesium.com/t/the-modelinstancecollection-is-canceled-how-can-i-load-thousands-dynimic-models-in-cesium/21797/2.

llauren48 commented 1 year ago

So is that possible to restore the ModelInstanceCollection class or add a class that has similar functionality in the new version of Cesium? Our projects about geographic visualization really need it!

lhgbird1206 commented 1 year ago

hi, @ggetz, Is there a plan to restore this functionality with the new model architecture?

lucy1564351 commented 1 year ago

地理类项目无比需要这个功能

MeanYou commented 1 year ago

This feature is used in many scenarios, hope to see it again.🙂

LastPoem commented 1 year ago

hope to see it come back, we need this

ggetz commented 11 months ago

Also requested in https://community.cesium.com/t/using-modelinstancecollection/7473/6

vsharma-next commented 8 months ago

Hi, any update on this ? Like many others in this issue thread, I generate glb blobs on the fly and then need a way to make 100s/1000s of instancing of this one model. ThreeJS supports it out of the box as you know and CesiumJS used to ... please bring it back :) Even static model instancing as suggested by @ptrgags is sufficient for now !

javagl commented 7 months ago

Sounds like another case where this would be a desired solution: https://community.cesium.com/t/gltf-scenes-to-3d-tiles/30305/4

mickae1 commented 6 months ago

Hi I'm also interesting of this feature.

Thanks,

vsharma-next commented 6 months ago

Bump :)

lqzv commented 5 months ago

badly needed

shaonianla1997 commented 5 months ago

How is the progress?

ggetz commented 5 months ago

There hasn't been any activity on this item recently, but we are definitely receiving the message that this is an important feature!

If you are interesting in contributing, please let us know and we'd be happy to discuss implementation or review a PR.

lucy1564351 commented 5 months ago

badly needed

giswrok commented 4 months ago

badly needed +1

lucy1564351 commented 3 months ago

So is that possible to restore the ModelInstanceCollection class or add a class that has similar functionality in the new version of Cesium? Our projects about geographic visualization really need it!

lucy1564351 commented 3 months ago

really need it!

javagl commented 3 months ago

It keeps popping up in the forum: https://community.cesium.com/t/using-modelinstancecollection/7473/7

mulfvik commented 2 months ago

Needed feature