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

3D Tiles - ModelInstanceCollection has no ShadowMode option to conserve performance. #4340

Closed
HeercoGrond opened this issue Sep 19, 2016 · 3 comments
Labels
good first issue An opportunity for first time contributors

Comments

@HeercoGrond
Copy link

HeercoGrond commented Sep 19, 2016

Hi,

Currently I'm using openstreetmaps to load forestdata to use for rendering trees in cesium using the ModelInstanceCollection of the 3D Tiles branch. The problem is that the ModelInstanceCollection has no options for setting the ShadowMode of the models contained within. Some of the objects in our scene require the shadows, and the trees are more there for cosmetic value so disabling shadows in the general sense of Cesium is not an option for us. Adding a shadowmode option to the ModelInstanceCollection might help in regards to usage and performance. It seems checked off in #3241 but isn't implemented. I tested it by adding it in our local branch and it seems to work well (only really tested with the ShadowMode.ENABLED and ShadowMode.DISABLED).

Kind regards,

Heerco

@lilleyse lilleyse added the good first issue An opportunity for first time contributors label Sep 19, 2016
@lilleyse
Copy link
Contributor

Thanks for submitting this, adding a shadows property to ModelInstanceCollection and the 3D Tiles Contents would be very useful. This will be a good starter issue for @JudyWeng or @sumitshyamsukha.

@HeercoGrond
Copy link
Author

The implementation for this looks to be very easy, mostly adding another parameter called shadows, adding this._shadows below the variables that get passed onto the model and adding it to the createModel function's parameters for the model. This seems to do the trick.

HeercoGrond pushed a commit to HeercoGrond/cesium that referenced this issue Sep 19, 2016
This is a possible solution for Issue CesiumGS#4340.
HeercoGrond pushed a commit to HeercoGrond/cesium that referenced this issue Sep 20, 2016
Changed a typo, changed position of some lines to adhere to consistency and added a getter/setter property shadows for the active model within the ModelInstanceCollection to edit shadows in runtime instead of only on creation.
HeercoGrond pushed a commit to HeercoGrond/cesium that referenced this issue Sep 20, 2016
@lilleyse
Copy link
Contributor

Fixed in #4341

HeercoGrond pushed a commit to HeercoGrond/cesium that referenced this issue Sep 21, 2016
Per Request - Added our Organization details and my name to Contributors.md
lilleyse added a commit that referenced this issue Sep 21, 2016
Update with credentials (see #4340 and #4341)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
good first issue An opportunity for first time contributors
Projects
None yet
Development

No branches or pull requests

2 participants