Repository navigation
Rotatable light probe - #3090
richardTingle wants to merge 11 commits into
Conversation
🖼️ Desktop screenshot changesℹ️ The purpose of these tests is to report when visual changes are introduced by a PR. If these 🔍 Results for 🖥️ desktop (opengl) - compared against
|
| ✨ 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.
🖥️ desktop (angle) - compared against 78c60b9
| ✨ 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.
📚 See the screenshot test README for more information.
jaime-jmebot
left a comment
There was a problem hiding this comment.
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!
🖼️ Android screenshot changes🚨 Serious visual failure for 🔍 Results for 📱 android - compared against
|
| 🚨 2 rendered differently between scenarios |
|---|
org.jmonkeyengine.screenshottests.android.light.pbr.TestLightProbeRotation.testOrientedBoxProbeRotation_f6_scenario-mismatch.png |
org.jmonkeyengine.screenshottests.android.light.pbr.TestLightProbeRotation.testSphericalProbeRotation_f6_scenario-mismatch.png |
| ✨ 3 new (no reference to compare against) |
|---|
org.jmonkeyengine.screenshottests.android.light.pbr.TestLightProbeRotation.testOrientedBoxProbeRotation_f6.png |
org.jmonkeyengine.screenshottests.android.light.pbr.TestLightProbeRotation.testProbeRotatedAgainstSky_f6.png |
org.jmonkeyengine.screenshottests.android.light.pbr.TestLightProbeRotation.testSphericalProbeRotation_f6.png |
📄 Report: download android-screenshot-report, then open extentReport/index.html from the zip.
📚 See the screenshot test README for more information.
…probe for the EnvironmentProbeControl that can lead to strange results
| setNbMipMaps(mipSizes != null ? mipSizes.length : 1); | ||
|
|
||
| setShCoeffs(baker.getSphericalHarmonicsCoefficients()); | ||
| setPosition(Vector3f.ZERO); |
There was a problem hiding this comment.
I think this was a bug (having setPosition). It has been here since the class was made and FastLightProbeFactory doesn't do this reset position thing. LightControl blats it anyway on the next tick by calling setPosition(the actual position)
…oesn't leak between jobs (as an async task)
Used in the light probe rotation scenarios which are inherantly a bit variable
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.