Everything is inside out on standard game

I just can’t figure this out.

Everything is inside out. Ignore the missing textures, i’ve moved stuff since i last ran the top program. But the angle is almost the same. It is however, using the exact same models without change. The biggest difference between the two is that one is done using simplegame, the other using standardgame and gamestates. But I dont’ know what I did wrong. I’ll post some code later.



At first glance it appears you are missing a ZBufferState on the root node. A second possibility is incorrect cullstate settings, but I think the first is more likely.

I agree…

check in this order:



Missing an UpdateGeometricState

Missing an UpdateRenderState

Checking… it looks like it happens once i apply a texture.

Main app

        StandardGame app;
        if (gametype == CLIENT) {
            app = new StandardGame("client"); // Create Object
            app = new StandardGame("Dedicated Server", StandardGame.GameType.HEADLESS);
        app.start(); // Start the program

        tmpCodeTester tmpGS = new tmpCodeTester("tmp Tester");

        Node scene = new Node("Scene graph node");
        URL model = tmpCodeTester.class.getClassLoader().getResource("data/models/BF.obj");
        FormatConverter converter = new ObjToJme();
        // Point the converter to where it will find the .mtl file from
        converter.setProperty("mtllib", model);
        //load model
        ByteArrayOutputStream BO = new ByteArrayOutputStream();
        try {
            // Use the format converter to convert .obj to .jme
            converter.convert(model.openStream(), BO);
            TriMesh battlefield = (TriMesh) BinaryImporter.getInstance().load(new ByteArrayInputStream(BO.toByteArray()));
            // shrink this baby down some
            battlefield.setModelBound(new BoundingSphere());
            TextureState tsTmp = DisplaySystem.getDisplaySystem().getRenderer().createTextureState();

            URL urlTmp = tmpCodeTester.class.getClassLoader().getResource(

            Texture baseMap = TextureManager.loadTexture(urlTmp, Texture.MM_LINEAR, Texture.FM_LINEAR);
            // Put her on the scene graph
        } catch (IOException e) {   // Just in case anything happens
            System.out.println("Damn exceptions!" + e);
        PointLight light = new PointLight();
        light.setDiffuse( new ColorRGBA( 0.75f, 0.75f, 0.75f, 0.75f ) );
        light.setAmbient( new ColorRGBA( 0.5f, 0.5f, 0.5f, 1.0f ) );
        light.setLocation( new Vector3f( 100, 100, 100 ) );
        light.setEnabled( true );
        LightState lightState = DisplaySystem.getDisplaySystem().getRenderer().createLightState();
        lightState.setEnabled( true );
        lightState.attach( light );

        ZBufferState buf = DisplaySystem.getDisplaySystem().getRenderer().createZBufferState();
        buf.setEnabled( true );
        buf.setFunction( ZBufferState.CF_LEQUAL );
        this.getRootNode().setRenderState( buf );

        scene.setRenderState( lightState );
        //scene.updateGeometricState(0.0f, true);

you are not calling this.getRootNode().updateRenderState();

Boooo. I can't believe it was something that simple.

(I'm booing myself)

Thanks so much. I'll continue to facepalm all day now.

It was on my list  :smiley:

I had to walk through each one of my files as there's about 20+ to find that one of them had a missing update.

Trussell said:

It was on my list  :D

you wish  ;)
dhdd said:

Trussell said:

It was on my list  :D

you wish  ;)

Now you're on the list.
Trussell said:

dhdd said:

Trussell said:

It was on my list  :D

you wish  ;)

Now you're on the list.

hehe  ;)