[SOLVED] Update IDE from 3.3.2 to 3.5.2 Graphic output to dark

Hello,

I have just updated my IDE from 3.3.2 to 3.5.2.
I could not update into the same folder because the installer said it has to be empty.
So I installed into a new folder an now have two installations on my PC.
But when I open my Project in the new Version something is wrong with the graphics as you can see on the two pictures.
But there are no errors.
Any ideas what classes could cause the problems or how I could find out?

Have there been any changes to the PointLight-Class?

When I run the following program in both versions the Lighting seems different and I can’t change the background in V3.5.2.
It seems that the intensity of the lights has changed because when I zoom in it gets brighter.

package mygame;

import com.jme3.app.SimpleApplication;
import com.jme3.light.PointLight;
import com.jme3.material.Material;
import com.jme3.math.ColorRGBA;
import com.jme3.math.Vector3f;
import com.jme3.renderer.RenderManager;
import com.jme3.scene.Geometry;
import com.jme3.scene.shape.Box;

/**
 * This is the Main Class of your Game. You should only do initialization here.
 * Move your Logic into AppStates or Controls
 * @author normenhansen
 */
public class Main extends SimpleApplication {

    public static Main app;
    
    public static void main(String[] args) {
        app = new Main();
        app.start();
    }

    @Override
    public void simpleInitApp() {
        Box b = new Box(1, 1, 1);
        Geometry geom = new Geometry("Box", b);

        Material mat = new Material(assetManager, "Common/MatDefs/Light/Lighting.j3md");
        
        mat.setBoolean("UseMaterialColors",true);
        mat.setColor("Ambient", ColorRGBA.Yellow);
        mat.setColor("Diffuse", ColorRGBA.Yellow);
        mat.setFloat("Shininess", 50);
        mat.setColor("Specular", ColorRGBA.White);
        
        geom.setMaterial(mat);

        rootNode.attachChild(geom);
        
        PointLight light = new PointLight();
        light.setEnabled(true);
        light.setColor(ColorRGBA.White);
        light.setPosition(new Vector3f(2,2,10));
        light.setRadius(500);
        app.rootNode.addLight(light);
    }

    @Override
    public void simpleUpdate(float tpf) {
        //TODO: add update code
    }

    @Override
    public void simpleRender(RenderManager rm) {
        //TODO: add render code
        app.getViewPort().setBackgroundColor(new ColorRGBA(0.0f , 0.0f , 0.1f, 1));
    }
}


Hello,

I ran the test case you provided, in JME 3.5.2 (I ran it with Gradle and IntelliJ IDEA, not the JME SDK though), and the viewport background color and point light seem to work fine for me.

https://imgur.com/5mp1Bgg.png

The screenshots you provided seem to be from a different scene.

Can you please provide a screenshot with the same test case you provided for us, above?

I don’t know if I’ve run two different installations. But could it be that the “default” settings are different between the two instances? Don’t know what settings, though. Gamma correction only applies to PBR?
If you do

AppSettings settings = new AppSettings(true);
app.setSettings(settings);

Is there a difference in any of the examples?

Iirc, settings may be cached per application in the SDK. Which leads to confusion at times.

No. Gamma affects everything. Scenes not ready for it are usually brighter, though.

When gamma is enabled then textures are loaded differently (converted from srgb to linear) and the framebuffer is gamma corrected before rendering (effectively turning linear color back to srgb for display).

1 Like

The problem was the gamma correction. I turned it of ( settings.setGammaCorrection(false) )and averything works fine. In 3.3.2 I didn’t set gamma correction at all. That’s why I couldn’texplain why it looked different.

Thank you all very much for your fast answers !!!

2 Likes

I think perhaps the default setting for gamma correction changed between the two versions.

1 Like