Is it possible to do a ColorRamp styled lightning on textures?

Ive seen the example on post filter processing about cartoony edges, so i wanted to know if its possible to do a colorramped styled lightining, so textures would look cartoonish.

For now im using the normal Lightining.j3m with a texture on diffuse map, but it doesnt looks that nice hehe…

Thanx alot for your attention.

If I’m not wrong, the lightning material has a color ramp param.

1 Like

yes it is, see the TestCartoonEdge test case the method “makeToonish”

1 Like

Ive had this idea checking that example. When i add colorramp to a material its textures becomes blank/null.

But just noticed that if i use vertex lightining the light becomes way better :smiley: But still couldnt ramp it out. Ty for the help.

Also the makeToonish use some materials i dont know where they are physically to check how they are and make it like it, so i only could draw that lines on sprite borders but couldnt use the ‘makeToonish’

EDIT: what i mean is, how can i try doing something if i cant acess assetManager.loadTexture(“Textures/ColorRamp/toon.png”); , i dont know how this toon.png is build so i can use it… Where are those base resources that comes with jmonkey i couldnt find it.

Plz i would apreciate any help. Yes ive seen examples and docs about lightining, couldnt manage to do it.

On the example i have a texturized mesh, then i apply the whole spatial a texture it gets black… this is really weird

[java]if (m.getMaterialDef().getName().equals(“Phong Lighting”)){ // wtf is phong light ?

Texture t = assetManager.loadTexture(“Textures/ColorRamp/toon.png”); // i cant see this !!! hwo can i do like it ?

// t.setMinFilter(Texture.MinFilter.NearestNoMipMaps);

// t.setMagFilter(Texture.MagFilter.Nearest);

m.setTexture(“ColorRamp”, t);

m.setBoolean(“UseMaterialColors”, true);

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

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

m.setBoolean(“VertexLighting”, true);