How to Illuminate Sans Shadow Whole Spatials on the Scene

I read some topics for this issue but I cannot find a solution that I want. I use flyCam.setEnabled(false); and mycode:

    warcraft = assetManager.loadModel("Models/ucak.j3o"); 
    warcraft.setLocalTranslation(0, -3.2f, 0);
    rock01 = assetManager.loadModel("Models/rock01.j3o"); 
    rock01.setLocalTranslation(0, 0, 0);

    AmbientLight al = new AmbientLight();

but it doesn’t work, the whole scene is black. I added DirectionalLight but this time, some partial of rock01 got dark. What can I use, please help me.

Edit: I don’t want to add a light one by one for all spatials

We can’t see that code.

You should run through the tutorials. They will likely answer this and a few hundred other questions you didn’t know you had yet.

1 Like

Actually everybody which is new to jME should first do all the tutorials and play with and understand them. They are really really really of big help and explain a lot. At this place a big thank to those which wrote them.
I would like if we could enforce that everybody posting questions here did the tutorials before. all of them.

And for the lightning stuff there is a tutorial:

copy paste that and go from there, that way you get it faster up and running because you have sample which works. I do it that way.

OK, that’s right I’m a new to JME but I observed this tutorial. I have some prepared models that I downloaded. This models had been made by using blender and they have default materials, so I don’t define new materials and I don’t know how to use blender. I just use prepared models. I don’t know where I should resolve this in JME or in blender.

First see if you can make it work with regular JME boxes like in the samples. Then when that’s working you will know it’s something to do with your model’s materials and then you can work from there. (Easiest is to load the model in the SDK, generate materials, save the model… then you can edit the generated j3m file.)

1 Like