Skip to content

Make LunarLambert phase dependent #2382

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

Draft
wants to merge 3 commits into
base: master
Choose a base branch
from

Conversation

pedro-fixingstuff
Copy link
Contributor

@pedro-fixingstuff pedro-fixingstuff commented Aug 2, 2025

This PR reworks the implementation of the lunar-Lambert shading model to match more closely the definition from works by Bonnie Buratti et al. (as an example, I cite her 2019 paper on Charon). The model is a combination of the Lambert and Lommel-Seeliger (lunar-like) disk functions, partitioned by A (which Celestia's LunarLambert parameter is meant to match)

Equation 1 from that paper shows that the Lommel-Seeliger component is dependent on the phase function f(alpha). This means that, for increasing phase angles, the shading converges to the Lambertian model.

The phase function is approximated here as an exponential in order to make it as generic as possible, and it is scaled using a derivation of Equation 3 from that paper.

Since this introduces a normalization factor to keep the overall brightness constant, I've removed the original form of it, which is the cause of #1131.

I came across some issues, however:

  • Some objects, such as Europa, became invisible from the first commit;
  • Starting on the second commit, Earth turns black.

@pedro-fixingstuff pedro-fixingstuff added the help wanted Extra attention is needed label Aug 2, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
help wanted Extra attention is needed
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant