Skybox problem (and more) with new version of jme

Hi all, I've just upgraded to the new version of jme.  The previous version I had I downloaded from the cvs in febuary.  I've noticed a few problems since I have upgraded.



The first problem is skyboxes are not working right.  Not only are they not working right in my own code, but the skybox test is not working right.  There seem to be two problems with the skyboxes.  The first problem is they now want to respond to lighting (so they are dark).  I have tried to set the light combine mode to off.  It is my understanding that this will disable lighting on an object, but it has had not effect.  This is done before updaterenderstate is called on the scene so that is not the issue.



The second problem with skyboxes is they are not being physically set up right as a box.  Some sides are either missing or just set up wrong.  In my own program none of the walls are set up correctly.  In the skybox test some are set up correctly and some are not.





Another problem I have since updating is my water is not behaving.  I have been using a node that contains a cloth patch for water.  The problem is now the water refuses to rotate so  i have a vertical wall of water.  I used to setlocalrotation on the cloth patch with a quaternion but it is refusing to rotate now.  I also tried rotating the node but that did not do anything.  But the water still responds to translations.



This code below is what I used to use to rotate the water


Quaternion q = new Quaternion();
      
q.fromAngleAxis(-FastMath.PI/2, new Vector3f(1,0,0));
cloth.setLocalRotation(q);



One last issue I'm having is problems with getting normals on md2 models to work properly but this has nothing to do with the new version of the code.  It seems like they are too weak.  Like it should be brighter.  A lit md2 is significantly darker than everything around it that is lit.  But I suppose I should move on to a more modern format.

Any ideas?

In the Skybox.java source file the line 224:



            skyboxQuads.setLightCombineMode(LightState.REPLACE);



should be changed to:



            skyboxQuads.setLightCombineMode(LightState.OFF);



Hope that helps  :wink:

I put that in CVS. Thanks Squid.

Running TestSkybox from webstart does not show the missing side issue…  perhaps the dark lighting is what you mean (if you turn off lighting with 'L' you can see the sides are indeed there.)  Looks like originally Skybox had a default - disabled - lightstate set which was removed when we did a checkin…  sorry!



For cloth, hard to say.  Have you triedgiving it a parent Node and rotating that instead?



For your md2 model, you might try setting the has normalized normals flag.  That will trigger opengl autonormalizing…  you'll have to write a simple recursive method to dive down through your model tree setting it as it goes down.

The lighting issue fixed the skybox test.  But my skybox still has fouled up geometry.

The cloth does have a parent node and I have tried rotating that and it doesn’t work.



Here is a screenshot looking down from the terrain to the bottom corner of the skybox.  You can see one wall is working right and on the left there are two walls folded on top of each other.



Ok, well, I've found and squashed several bugs in jME in the course of redoing batches to properly work with all existing jME features.  I'd say wait for that to be checked in and then we can go over this in more detail if the problems still exist.  The fact that the test works though would say that you are doing something different that was relying on something that may or may not have been an intentional engine "feature"