question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

jme3-lwjgl3 Produces Gaps Between Boxes When Using Lighting Material

See original GitHub issue

Hi,

On the latest stable JME3 release, using LWJGL3 (org.jmonkeyengine:jme3-lwjgl3:3.5.2-stable), when I place several boxes next to each other, using the Common/MatDefs/Light/Lighting.j3md material, there’s always a little dark gap between the boxes. It’s invisible when the camera is really close to it but becomes bigger the farther it is away. When I use LWJGL2 (org.jmonkeyengine:jme3-lwjgl:3.5.2-stable) there is no such problem.

LWJGL3 produces gaps (unexpected behavior): lwjgl3

LWJGL2 does not produce gaps (expected behavior): lwjgl2

Here is the test setup to reproduce the issue:

for (int x = 0; x < 10; x++) {
    for (int y = 0; y < 10; y++) {
        Box box = new Box(16, 0.1f, 16);
        Geometry geometry = new Geometry("", box);
        Material material = new Material(assetManager, "Common/MatDefs/Light/Lighting.j3md");
        material.setBoolean("UseMaterialColors", true);
        material.setColor("Diffuse", ColorRGBA.Red);
        geometry.setMaterial(material);
        geometry.setLocalTranslation(32 * x, 0, 32 * y);
        rootNode.attachChild(geometry);
    }
}
rootNode.addLight(
        new DirectionalLight(
                new Vector3f(-0.1f, -1f, -0.1f).normalizeLocal(), new ColorRGBA(2f, 2f, 2f, 1f)));

And here is the full example project: https://github.com/tilltheis/Jme3GapTest It has 1 commit linking against LWJGL2 and another commit linking against LWJGL3.

Hint: There is no issue if I use a box height of zero. Therefore I assume the problem is related to the shadow calculation.

Box box = new Box(16, 0, 16);

Please tell me if you need any more input.

Issue Analytics

  • State:closed
  • Created a year ago
  • Comments:8 (5 by maintainers)

github_iconTop GitHub Comments

1reaction
tilltheiscommented, Oct 25, 2022

It seems to have been a driver issue!

Thank you for asking me for my driver version. When I looked up my installed version (AMD Software: Adrenalin Edition 22.5.1) I saw that an upgrade was available and installed it (AMD Software: Adrenalin Edition 22.10.2). Now the problem is gone for me.

I’m very sorry to have wasted your time on this issue. But maybe others will find it useful when they run into similar problems. The learning, at least for me, is that AMD products are not the most reliable ones since this isn’t the first HW/SW problem I’ve had with them.

0reactions
riccardoblcommented, Oct 27, 2022

I’m very sorry to have wasted your time on this issue.

Don’t worry, reporting this issue was the right thing to do, and thank you for following up with the solution. Sometimes these kinds of bugs happen, and they might be related to performance or quality trade-offs enabled in the driver settings rather than the driver itself.

If it happens again, please don’t hesitate to reopen the issue.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Understanding How Soft Boxes Work - Adorama
A softbox works by confining the light from a lamp into a closed chamber and releasing it through at least one layer of...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found