Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Expose an interface to ModelInstanceCollection #7062

Closed
OmarShehata opened this issue Sep 24, 2018 · 3 comments · Fixed by #10644
Closed

Expose an interface to ModelInstanceCollection #7062

OmarShehata opened this issue Sep 24, 2018 · 3 comments · Fixed by #10644

Comments

@OmarShehata
Copy link
Contributor

The best way to have hundreds of instances that all share the same model is to use the ModelInstanceCollection class. It's currently used internally when loading 3D Tiles but there's no public interface to it.

I think it would be a good idea to allow users to create this directly.

Forum discussion.

@mramato
Copy link
Contributor

mramato commented Sep 24, 2018

I think a better approach (at least in the short term) would be to have entities take advantage of ModelInstanceCollection so that it gets used automatically if lots of models are specified (and this would help all users "for free" without having them manually manage them at the primitive layer).

@OmarShehata
Copy link
Contributor Author

Came up again here: https://groups.google.com/d/msg/cesium-dev/XLTrotCj3IY/M6mtimhcAgAJ

In the context of rendering thousands of ships.

@wejrox
Copy link

wejrox commented Feb 9, 2022

This is a great idea, however it is implemented. I'm trying to do the same thing since I'm dynamically creating thousands of objects at the moment and running into memory limits.

A solution that doesn't require user implementation sounds great if possible, as right now we can only specify the URI when creating a ModelGraphics, so it would require more interface changes.

In the mean time, @OmarShehata do you know of a method of using instances which would allow me to use them when creating an Entity?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants