Skip to content

Rotatable light probe - #3090

Draft
richardTingle wants to merge 5 commits into
jMonkeyEngine:masterfrom
richardTingle:rotatable-light-probe
Draft

richardTingle wants to merge 5 commits into
jMonkeyEngine:masterfrom
richardTingle:rotatable-light-probe

Conversation

@richardTingle

@richardTingle richardTingle commented Nov 15, 2026 •

Copy link
Copy Markdown
Member

What this changes

This allows a light probe to be rotated after it is baked

Why I would want this

I have a control platform that the player stands on, and a scene in miniature that the player look at. Rotation command rotate that miniature scene (and the sky). The light probe is a one time back of sky.

This would be easy; rotate the sky, rotate the node the miniature is connected to and be done. However because the light probe can't be rotated that doesn't work and instead I have to move everything except the scene including moving and rotating the camera and the platform to give the impression the scene rotated.

image

@github-actions

github-actions Bot commented Nov 15, 2026 •

Copy link
Copy Markdown

🖼️ Desktop screenshot changes

ℹ️ The purpose of these tests is to report when visual changes are introduced by a PR. If these
visual changes are intended, no action is required.

🔍 Results for 7b30140 (workflow run). Each report shows the reference image,
the new image and a diff side by side; artifact downloads need you to be signed in to GitHub.

🖥️ desktop (angle) - compared against 3a352fd

✨ 3 new (no reference to compare against)
org.jmonkeyengine.screenshottests.light.pbr.TestLightProbeRotation.testOrientedBoxProbeRotation_f6_angle.png
org.jmonkeyengine.screenshottests.light.pbr.TestLightProbeRotation.testProbeRotatedAgainstSky_f6_angle.png
org.jmonkeyengine.screenshottests.light.pbr.TestLightProbeRotation.testSphericalProbeRotation_f6_angle.png

📄 Report: download screenshot-test-report-angle, then open ScreenshotDiffReport.html from the zip. ⚠️ The report is produced by this pull request's code, so only open it if you trust the pull request.

🖥️ desktop (opengl) - compared against 3a352fd

✨ 3 new (no reference to compare against)
org.jmonkeyengine.screenshottests.light.pbr.TestLightProbeRotation.testOrientedBoxProbeRotation_f6.png
org.jmonkeyengine.screenshottests.light.pbr.TestLightProbeRotation.testProbeRotatedAgainstSky_f6.png
org.jmonkeyengine.screenshottests.light.pbr.TestLightProbeRotation.testSphericalProbeRotation_f6.png

📄 Report: download screenshot-test-report-opengl, then open ScreenshotDiffReport.html from the zip. ⚠️ The report is produced by this pull request's code, so only open it if you trust the pull request.

📚 See the screenshot test README for more information.

@jaime-jmebot jaime-jmebot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hi Richard, thanks for putting this together. The change gives probes a useful world-space orientation while keeping the capture, runtime lighting, and control paths connected, and the example makes the intended behavior easy to understand.

I reviewed the probe’s rotation and serialization state, the optional rotated-bake path, the shader inputs for both diffuse and specular IBL, and LightControl synchronization. In particular, carrying an oriented-box area through the same rotation delta as the probe preserves any pre-existing box alignment, while keeping the new baker overload backward-compatible for implementations that only support identity rotation is a thoughtful touch. The added unit and screenshot coverage exercise the core behavior and provide a practical visual check.

The main build and static-analysis checks are passing; one desktop-angle job is reported as failed, so it would be worth confirming whether that is environmental or needs follow-up before merge. I didn’t find a code issue requiring changes in this review. Nice work!

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