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

Separate reference matrix computation from ImageBasedLighting #10243

Merged
merged 1 commit into from
Mar 29, 2022

Conversation

j9liu
Copy link
Contributor

@j9liu j9liu commented Mar 29, 2022

When ImageBasedLighting was introduced in #10226, it included a referenceMatrix getter and setter that was used in recomputing iblReferenceFrameMatrix. However, the referenceMatrix will be different for different models, so if multiple models use the same IBL with different model matrices, the IBL matrix that they use will be incorrect. Instead, models should manage their own iblReferenceFrameMatrix variables.

@ptrgags can you review?

@j9liu j9liu requested a review from ptrgags March 29, 2022 18:42
@cesium-concierge
Copy link

Thanks for the pull request @j9liu!

  • ✔️ Signed CLA found.
  • CHANGES.md was not updated.
    • If this change updates the public API in any way, please add a bullet point to CHANGES.md.
  • ❔ Unit tests were not updated.
    • Make sure you've updated tests to reflect your changes, added tests for any new code, and ran the code coverage tool.

Reviewers, don't forget to make sure that:

  • Cesium Viewer works.
  • Works in 2D/CV.

@ptrgags
Copy link
Contributor

ptrgags commented Mar 29, 2022

@j9liu This change looks good

To test it, I made two sandcastles where an ImageBasedLighting object is shared between multiple models:

This branch: (Model on left, ModelExperimental on right)
image

The key thing is there's a different view of the environment map between the pawns on the ground and the ones floating above them.

One thing I did notice is that the minimumPixelSize gives different results for the two versions of Model, but that's a separate issue.

@ptrgags ptrgags merged commit 6df4ebc into main Mar 29, 2022
@ptrgags ptrgags deleted the separate-reference-matrix-from-ibl branch March 29, 2022 19:30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants