Skip to content

Render rings with BJ Jonsson radial profiles#2578

Draft
levinli303 wants to merge 1 commit into
CelestiaProject:masterfrom
celestiamobile:rings-new-profile
Draft

Render rings with BJ Jonsson radial profiles#2578
levinli303 wants to merge 1 commit into
CelestiaProject:masterfrom
celestiamobile:rings-new-profile

Conversation

@levinli303

Copy link
Copy Markdown
Collaborator

No description provided.

Adds an opt-in radial-profile shading mode for planetary rings based on
Bjorn Jonsson's Saturn ring profiles. When a RingSystem provides all of:
  - Texture       (RGBA profile: back/forward/unlit/transparency)
  - ColorTexture  (radial RGB color)
  - UnlitColor    (tint applied to unlit-side brightness)
the renderer switches to a phase-aware shading model that blends the
backscatter and forward-scatter profiles on the lit side and uses the
unlit-side profile (tinted by UnlitColor) on the dark side. Forward
scatter is normalized so the G channel saturates at phase = 139 degrees,
matching the capture geometry of BJ's data set.

If any of the three keys is missing, the existing diffuse shading path is
used unchanged.
@sonarqubecloud

Copy link
Copy Markdown

@AstroChara

Copy link
Copy Markdown
Contributor

Context: I asked levin to make this PR so we could see how their ring rendering implementation works.

My current thought is that I would like to explore options for theory-based rendering of ring textures (for example, calculate backlighting from transparency), since this code hard-coded the Saturn rings' optical behaviour (the 139 degrees angle that the forward scattering texture is taken from), and also forward scattering and backlighting data are not available for the vast majority of ring systems and hence this code would probably be mostly useless beyond Saturn. This will probably be done on Discord.

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.

2 participants