Display problem

hello,



I am developping a voxel engine and I have a problem with display :

  • When the light off, there is a 3D Display but not color on the objet.
  • When the light on, there is not 3D Display but there is color.



    Someone know this problem ?

    How can i solve it ?



    Thank you…






Wow, a voxel engine. Could it be used for terrain creation too? I read about some voxel algorithms lately and I'd like to see an implementation in action. :slight_smile:

desertrunner said:

Could it be used for terrain creation too?


I don't think. It is a really basic one, just for display my 3D discret objects.

Anybody know this problem ??? :frowning:

What do you mean by 3D display? It seems to me that either you are not enabling the lighting on the models or your materials are not set-up properly.

Is the behavior similar to jmetest.renderer.TestBoxColor (toggle lights with 'L')



If so, try adding this simple MaterialState to your scene:


        MaterialState ms = display.getRenderer().createMaterialState();
        ms.setColorMaterial(MaterialState.CM_DIFFUSE);


Hello,



thank you for the last answer, it's the solution of my problem.

I just prefer use :

ms.setColorMaterial(MaterialState.CM_EMISSIVE);




duenez said:

What do you mean by 3D display? It seems to me that either you are not enabling the lighting on the models or your materials are not set-up properly.

There is only a red shape on the screen, any 3D render.