Ambient light not illuminates

I’v got some problem with ambient light

   Node human=(Node)((Node)assetManager.loadModel("Models/LJRevorked/LJRevorked.j3o")).getChild(0);
    AmbientLight hL = new AmbientLight();
    hL.setColor(ColorRGBA.White.mult(1.3f));
    human.addLight(hL);
    human.setLocalTranslation(100,440,100);
human.setLocalScale(100, 100, 100);
rootNode.attachChild(human);
humanControl=human.getControl(AnimControl.class);
humanChanel = humanControl.createChannel();
humanChanel.setAnim("Stand1HSw&Shield");
humanChanel.setLoopMode(LoopMode.Loop);

    SkeletonControl skeletonControl = human.getControl(SkeletonControl.class);
    Node bone;
    bone = skeletonControl.getAttachmentsNode("Bone.004");
    
   armour =(Geometry)((Node) ((Node)assetManager.loadModel("Models/MD/ManoDestra2.j3o")).getChild(0)).getChild(0);
           ((Node)assetManager.loadModel("Models/MD/ManoDestra2.j3o")).getChild(0)).getChild(0)).getMesh());
    bone.attachChild(armour);
  armour.setLocalScale(0.06f,0.06f,0.06f);

ambient light not illuminates Human

   AmbientLight al = new AmbientLight();
    al.setColor(ColorRGBA.White.mult(1.3f));
    rootNode.addLight(al);

But if i add a pointed light to rootNode it works pretty fine

human must have a black ambient color.

WOOW soo human need a separate ambient light? i’ve puted one more for human only to try to illuminate it.Soo
if i remove AL from human and leav only AL in rootNode human will not be illuminated ?

Oh ,and not it has a white color ,just had a look,in a code here and in my it is white … damn must be some thing alse

No, I don’t think so. Why don’t you show us the code where you set the ambient color on the material?

I did what? :smiley:

I used blender for creating material and model .Well actually loaded and reworked one free

Then as I already said, it has a black ambient color… you need to the the human’s material’s ambient color to something other than black.

Getting my other “repeating myself” out of the way now:
You need to the the human’s material’s ambient color to something other than black.
You need to the the human’s material’s ambient color to something other than black.
You need to the the human’s material’s ambient color to something other than black.

https://jmonkeyengine.github.io/wiki/sdk.html

You must configure the Material - either in Java code or in SDK.
If Blender doesn’t allow you to set the Ambient color.
Example Java code:

Material sphereMat = new Material(assetManager,
    "Common/MatDefs/Light/Lighting.j3md");

sphereMat.setColor("Ambient",ColorRGBA.White);

Wiki pages for this topic:
[https://jmonkeyengine.github.io/wiki/jme3/beginner/hello_material.html]
[https://jmonkeyengine.github.io/wiki/jme3/intermediate/how_to_use_materials.html]
[https://jmonkeyengine.github.io/wiki/jme3/advanced/materials_overview.html]

But you can also try to configure the color in Blender for: Ambient, Diffuse, Specular.
If you find out how to do this, it would be nice if you post the solution here. :slight_smile:

Blender has no concept of ambient color as I understand it. Easiest way is to generate the j3m from the SDK and edit it.

Second easiest way is to grab the existing Material in code (since you already grab the geometry you know how to do this) and set the ambient color there. Sort of as ogli says.

when i make ((Geometry)human.getChild(0)).getMaterial(). i cant see any ambient ligh setter or alse

That’s because you didn’t do any of the recommended tutorials so you have no idea how to set material parameters, I guess.

Edit: you also didn’t look at the post above that already shows how to set ambient (though it leaves out the setBoolean(“UseMaterialColors”, true) part)

well i seen set color (“Ambient” *** rgb) but i’m not schure its right thing

I just dont want to mess every thing totally :slight_smile:

Someone should write up some tutorials and stuff… oh, I think they already did, though.

https://jmonkeyengine.github.io/wiki/jme3/intermediate/how_to_use_materials.html

What is the consequence of trying something and failing? Nothing, basically. Would have taken you less time than posting three responses here and you would become that much less helpless.

i’m not say they are not made bro , but i’m pretty insicure,this model was working fine,then i moded it and it stopped soo im a bit scarried :smiley: but ok thnx i will try