MaterialState vs Alphastate


here's my question:

If I use AlphaState for the transparency of the objects I've to to turn off the lights.

Btw I need to add lights to my scene…

So I've to use MaterialState(?).

I tried this way:

Sphere s = new Sphere("MySphere", new Vector3f(100, 100, 100), 20, 20, 300f);

Node sphere = new Node("SphereNode");


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




Is it correct?

If yes, why doesn't it work?

If no(and I hope so), what has to be done?

Thank you!  :slight_smile:

You need both an AlphaState and MaterialState to do what you are trying to do.  See TestRenderQueue for an example.

Thank you renanse,

always helpful  :smiley:

I solved doing


then applying the AlphaState so the effect of the AlphaState is not erased by the lights of the scene.


Ok, not exactly what you said you wanted earlier, but as long as it gives you the results you like I guess. :slight_smile: