jME3 render issue?

Sorry if this is the wrong place to post this (or I'm just doing something incorrectly), but the behaviours only seems to be with respect to JME3:



Attached a few Mesh shapes (Box, Sphere etc.) to the root node with materials set.  Also loaded  a (ogremesh) model. Finally created and attached a PointLight.



Depending on the renderer chosen, I have noticed the following behaviour (based upon the attached code):



JOGL:



The Mesh shapes and associated materials appear to display (correctly?).  However there seems to be no change in their appearance whether the PointLight is attached or not or whether is color is changed or not.



The model (ogremesh) shows, however it renders with ascii characters instead of the pertinent material.  The model rendes whether the PointLight is attached or not, however it's rendered color does appear to be dependent upon the PointLight color.



LDWJGL-OPENGL2:





The Mesh shapes rendener WITHOUT the set material.  They render yellow (or maybe green… sorry I'm color blind and have trouble distiguishing between those two),  requardless of PointLight color or whether the PointLight  is attached.



The model (ogremesh) renders correctly with respect to it's material,  PointLight color and whether the PointLight is attached (i.e. can't be seen if the light is not attached, and can if it the PointLight is attached).





Based upon the statistics diplayed on the window/screen, the triangles/meshes/shapes appear to be rendering to the screen, they just show the above behaviour.



This is my display info:


       Card name: Intel(R) Q45/Q43 Express Chipset
     Manufacturer: Intel Corporation
        Chip type: Intel(R) 4 Series Express Chipset Family
         DAC type: Internal
       Device Key: EnumPCIVEN_8086&DEV_2E12&SUBSYS_3035103C&REV_03
   Display Memory: 1024.0 MB
     Current Mode: 1280 x 1024 (32 bit) (60Hz)
          Monitor: Plug and Play Monitor
  Monitor Max Res: 1600,1200
      Driver Name: igxprd32.dll
   Driver Version: 6.14.0010.4990 (English)
      DDI Version: 9 (or higher)
Driver Attributes: Final Retail
 Driver Date/Size: 9/11/2008 09:51:28, 57344 bytes
      WHQL Logo'd: Yes
  WHQL Date Stamp: n/a
              VDD: n/a
         Mini VDD: igxpmp32.sys
    Mini VDD Date: 9/11/2008 09:52:48, 6047904 bytes
Device Identifier: {D7B78E66-6D52-11CF-F260-3F10A2C2CB35}
        Vendor ID: 0x8086
        Device ID: 0x2E12
        SubSys ID: 0x3035103C
      Revision ID: 0x0003
      Revision ID: 0x0003
      Video Accel:
 Deinterlace Caps: n/a
         Registry: OK
     DDraw Status: Enabled
       D3D Status: Enabled
       AGP Status: Not Available
DDraw Test Result: Not run
 D3D7 Test Result: Not run
 D3D8 Test Result: Not run
 D3D9 Test Result: Not run



(If necessary I will attach the jme.log files for each type of renderer execution)

public class TestBox extends SimpleApplication
{

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

     @Override
     public void simpleInitApp()
     {
          Vector3f v3F = new Vector3f(10, 10, 10);
          PointLight pl = new PointLight();
          pl.setColor(ColorRGBA.Brown);
          pl.setPosition(v3F);
          pl.setRadius(1000f);
         // rootNode.addLight(pl);
          rootNode.updateGeometricState();

          getCamera().setLocation(new Vector3f(0.f,0.f,50f));
          getCamera().setFrustumFar(1000f);
          Material mat = new Material(assetManager, "Common/MatDefs/Misc/Particle.j3md");
          TextureKey key = new TextureKey("Interface/Logo/Monkey.jpg", true);
          key.setGenerateMips(true);
          Texture tex = assetManager.loadTexture(key);
          mat.setTexture("m_ColorMap", tex);

          Node model = (Node)getAssetManager().loadModel("Common/Models/Test/Squat.mesh.xml");
          Geometry geom = (Geometry) model.getChild(0);
          geom.setName("TEST_SHAPE");
          geom.updateGeometricState();
          rootNode.attachChild(geom);

          Box s1 = new Box(Vector3f.ZERO,1.f,1.f,1f);
          Geometry g1 = new Geometry("S1",s1);
          g1.setMaterial(mat);
          v3F.set(-10.f , 10.f, 10.0f);
          g1.setLocalTranslation(v3F);
          g1.updateGeometricState();
          rootNode.attachChild(g1);

          Sphere s2 = new Sphere(10,10,1f);
          Geometry g2 = new Geometry("S2",s2);
          g2.setMaterial(mat);
          v3F.set(10f, 10f, 10f);
          g2.setLocalTranslation(v3F);
          g2.updateGeometricState();
          rootNode.attachChild(g2);

          Box b2 = new Box(Vector3f.ZERO,2.f,2.f,2f);
          Geometry g3 = new Geometry("STATICBOX",b2);
          g3.setMaterial(mat);
          v3F.set(8.f , 0.f, 2.0f);
          g3.setLocalTranslation(v3F);
          g3.updateGeometricState();
          rootNode.attachChild(g3);
     }



I tried your code and everything seems fine. The material you're using for the shapes, "Particle.j3md" does not support lighting, that's why adding or removing the light doesn't change anything. If you want textured shapes without lighting, use "Common/MatDefs/Misc/SimpleTextured.j3md" like in the TestBox test. If you want lit shapes, use "Common/MatDefs/Light/Lighting.j3md" like in the TestSimpleLighting test.

Ahh.  My appologies for my incomplete knowlege and understanding,  and my sincere thanks for your time and help.

Sorry for ‘opening’ this thread again…



I want to make sure I understand what the correct behaviour is supposed to be.  Just to reiterate,  the behaviour I am seeing:



I if use “Common/MatDefs/Misc/SimpleTextured.j3md” for the material definition without defining or adding a light and rendering with LWJGL the shape does not display.  The shape does   display if I render with JOGL.



Is the is correct behaviour?



Thanks.








Yes it is, jogl does not support extended ogl2 material options and just replaces them with defaults. Only in lwjgl you can see that your material is messed up :wink: