-
-
Notifications
You must be signed in to change notification settings - Fork 1.2k
Improve light render parity with blender #2549
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
Open
riccardobl
wants to merge
10
commits into
jMonkeyEngine:master
Choose a base branch
from
riccardobl:blenderlight
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from all commits
Commits
Show all changes
10 commits
Select commit
Hold shift + click to select a range
a5600b9
improve light render parity with blender
riccardobl 3f98354
cleanup
riccardobl e5df05b
fix merge issue
riccardobl c3580dc
Update LightsPunctualExtensionLoader.java
yaRnMcDonuts 9d25760
Accept changed screenshot reference images for blender light
richardTingle d9f11a0
cleanup and parity test
riccardobl d1569d3
Merge remote-tracking branch 'upstream/master' into blenderlight
riccardobl d08eab1
tweaks
riccardobl 8829ea0
tweaks
riccardobl e299120
screenshots
riccardobl File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
55 changes: 55 additions & 0 deletions
55
jme3-examples/src/main/java/jme3test/light/TestLightImportParity.java
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,55 @@ | ||
| package jme3test.light; | ||
|
|
||
| import com.jme3.app.SimpleApplication; | ||
| import com.jme3.environment.EnvironmentProbeControl; | ||
| import com.jme3.input.ChaseCamera; | ||
| import com.jme3.math.FastMath; | ||
| import com.jme3.math.Quaternion; | ||
| import com.jme3.math.Vector3f; | ||
| import com.jme3.post.FilterPostProcessor; | ||
| import com.jme3.post.filters.KHRToneMapFilter; | ||
| import com.jme3.scene.Node; | ||
| import com.jme3.scene.Spatial; | ||
| import com.jme3.util.SkyFactory; | ||
|
|
||
| /** | ||
| * Test how lights render compared to the same scene in Blender. Open | ||
| * jme3-testdata/src/main/resources/BlenderParity/scene.blend in blender to compare. | ||
| */ | ||
| public class TestLightImportParity extends SimpleApplication { | ||
| public static void main(String[] args) { | ||
| TestLightImportParity app = new TestLightImportParity(); | ||
| app.start(); | ||
| } | ||
|
|
||
| @Override | ||
| public void simpleInitApp() { | ||
|
|
||
| flyCam.setDragToRotate(true); | ||
| flyCam.setMoveSpeed(100f); | ||
|
|
||
| Spatial sky = SkyFactory.createSky(assetManager, "Textures/Sky/Alien.png", SkyFactory.EnvMapType.EquirectMap); | ||
| sky.rotate(new Quaternion().fromAngleAxis(FastMath.PI, Vector3f.UNIT_Y)); | ||
| rootNode.attachChild(sky); | ||
|
|
||
| EnvironmentProbeControl probe = new EnvironmentProbeControl(assetManager, 512); | ||
| rootNode.addControl(probe); | ||
| probe.tag(sky); | ||
|
|
||
| Node scene = (Node)assetManager.loadModel("BlenderParity/scene.glb"); | ||
| rootNode.attachChild(scene); | ||
|
|
||
| KHRToneMapFilter toneMap = new KHRToneMapFilter(); | ||
| FilterPostProcessor fpp = new FilterPostProcessor(assetManager); | ||
| fpp.addFilter(toneMap); | ||
| viewPort.addProcessor(fpp); | ||
|
|
||
| ChaseCamera chaseCam = new ChaseCamera(cam, scene, inputManager); | ||
| chaseCam.setDefaultDistance(100); | ||
| chaseCam.setMaxDistance(200); | ||
|
|
||
|
|
||
|
|
||
|
|
||
| } | ||
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file not shown.
Binary file not shown.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
gltf colors are srgb