Enlight a Character Model

Hi guys ,



I want to enlight my character like this picture http://img.jeuxvideo.fr/photo/00711212-photo-tales-of-vesperia.jpg , i’m using directionallight but i have a lot of reflection that is really not what i want to , spotlight was not good too , how can i do like the picture ? ( without reflection and with enlightning )

Look at the TestCartoonEdge test case.

I guess you’ll have to combine it with the bloom filter if you want to achieve the same kind of render.

that’s what i did but directionallight makes very bad reflection on the character that makes ugly , plus the fact that when the character is at the opposide side of the light it’s very dark on it.

set m_shininess of your materials to 0

Don’t do that actually.

Set m_UseMaterialColors=true and then set the m_Ambient/m_Diffuse parameters to ColorRGBA.White and m_Specular to ColorRGBA.Black.

i changed thoses parameter on my toon code effect as you said but didn’t work , i also setted thoses parameter on my material model but i still have thoses light reflections on the model. Or maybe do i have to do that on the light ?

could you post a screen

Sure :



http://img684.imageshack.us/img684/9876/screennehon.png



Thanks a lot for this



Only a Sun is implemented the sample of code is here :



[java]

Vector3f lightDir = new Vector3f(-0.8719428f, -0.46824604f, 0.14304268f);

DirectionalLight dl = new DirectionalLight();

dl.setColor(ColorRGBA.White.mult(0.8f));

dl.setDirection(lightDir);



[/java]

If you disable specular then you shouldn’t see those reflections. You might have did something wrong.

Make sure you set m_Diffuse to White and not m_Specular.

Setting Shiness to 0.5 worked , but i’m still annoyed about this m_specular story , i wish to know why it didn’t work …



Still searching how to enlight a 3D model here , if you have any ideas i’m open

Well i’m not crazy ,



http://img641.imageshack.us/i/screenmomoko.png/



i created a new material



[java]

Material mat_character = new Material(assetManager, “Common/MatDefs/Light/Lighting.j3md”);

mat_character.setFloat(“m_Shininess”, 5f);

mat_character.setColor(“m_Specular”, ColorRGBA.Black);

[/java]



Specular is at black statement and the results is very bad

do you really use the color ramp like it’s done in the testCartoonEdge?

yes



[java]

if (m.getMaterialDef().getName().equals(“Phong Lighting”)){

Texture t = assetManager.loadTexture(“Textures/ColorRamp/toon.png”);

t.setMinFilter(Texture.MinFilter.NearestNoMipMaps);

t.setMagFilter(Texture.MagFilter.Nearest);

m.setTexture(“m_ColorRamp”, t);

m.setBoolean(“m_UseMaterialColors”, true);

m.setColor(“m_Specular”, ColorRGBA.Black);

m.setColor(“m_Diffuse”, ColorRGBA.White);

m.setBoolean(“m_VertexLighting”, true);

}

[/java]