jmonkeyengine icon indicating copy to clipboard operation
jmonkeyengine copied to clipboard

The PBR material looks incorrect in TestPBRLighting

Open noncom opened this issue 5 years ago • 1 comments

The hovertank PBR material in TestPBRLighting looks different from what is expected.

Expected (screenshots by Oxplay and Riccardo):

image

image

Actual (screenshots on my machine):

image

image

Notice the absense of light reflections on the hovertank.

However:

image

and, just as an example to check that environment map reflections work, with Roughness = 0 and Metallic = 0.5:

image

At the same time the capture in RenderDoc on my machine shows the correct image (with default PBR params settings of TestPBRLighting), notice how the back of the tank has light reflected from it:

image

The above RenderDoc capture: https://drive.google.com/open?id=1itHj736k8G48ahxspe86CbkaCVaF3IWb

Also, the results are strange with gamma correction on:

In JME window there are no positive changes, but everything just seems more light:

image

In the capture of RenderDoc 1.5 everything just seems darker:

image

This happens on a barebones Gradle project with all the required JME 3.3.0-beta1 dependencies and the sole java class TestPBRLighting. No filters applied and no custom or changed shaders.

noncom avatar Jan 04 '20 20:01 noncom

As i already investigated, the problem started appear most probably since this commit(change to tank material):

https://github.com/jMonkeyEngine/jmonkeyengine/commit/3ab8466075516cc26170adf19a1f59d0cd7b4e32#diff-f5f8cf2b76adfe90b04652ee2fc8d001

Because using SDK 3.2 PBRTest it look different when using 3.3(and i assume its because of jme-testdata changes).

Also i think initial issue was because of deprecated "((BoundingSphere) probe.getBounds()).setRadius(100);" that work for Tank Test, but overall cause issues(for 3.3+ version)

So my suggestion is to change:

  • replace "((BoundingSphere) probe.getBounds()).setRadius(100);" with "probe.getArea().setRadius(100);"
  • revert above link commit, or fix it, because it most probably made tank material look "less-metallic".(non metallic when looking at it).

first refer to other PBR tests probably too.

oxplay2 avatar Jan 08 '20 09:01 oxplay2