I create through a model collada something I know to import it into jme no problem there is no pixel ranging from all sides
I also know convert to have a texture and a cel shading outline
However, I have a problem I would like to add a texture keeping cel shading effect
The outline disappears but no dice that I add a second texture al'objet
The effect of cel shading shadow disappears I find myself with my chucking texture in its place
How to add a 2nd textutre and more without losing effect
Shadow of shading I do not speak of the effect of outline, but the shadow effect
with a color modeling outline cel shading

with a color modeling outline cel shading and shadow of cel shading activate

what the problem ?
i m import my collada object
Node mu = ColladaImporter.getModel();
i m create two object 1 shaded and one outline
SharedNode outlinedModel = new SharedNode("outlined", mu);
SharedNode SharedModel = new SharedNode("shared", mu);
Spatial shaded = createShaded(SharedModel);
Spatial outline =createOutline(outlinedModel);
private Spatial createShaded(Spatial g) {
//Load the vertex program from a file and bind it to a render state
VertexProgramState vp = display.getRenderer().createVertexProgramState();
vp.setParameter(lightPosition, 2);
vp.load(TestVertexProgramState.class.getClassLoader().getResource(
"jmetest/data/images/celshaderARB.vp"));
vp.setEnabled(true);
//Bind a 1-dimensional luminance texture for use by the vertex program
TextureState ts = display.getRenderer().createTextureState();
ts.setEnabled(true);
Texture t1 = TextureManager.loadTexture(
TestBoxColor.class.getClassLoader().getResource(
"jmetest/data/images/shader.png"),
Texture.MM_NEAREST,
Texture.FM_NEAREST);
ts.setTexture(t1, 0);
g.setRenderState(vp);
g.setRenderState(ts);
return g;
}
private Spatial createOutline(Spatial g) {
CullState cs = display.getRenderer().createCullState();
cs.setCullMode(CullState.CS_FRONT);
cs.setEnabled(true);
WireframeState ws = DisplaySystem.getDisplaySystem().getRenderer().createWireframeState();
ws.setFace(WireframeState.WS_FRONT);
ws.setLineWidth(6.0f);
ws.setAntialiased(true);
ws.setEnabled(true);
LightState noLights = DisplaySystem.getDisplaySystem().getRenderer().createLightState();
noLights.setGlobalAmbient(ColorRGBA.black.clone());
noLights.setEnabled(true);
TextureState noTexture = DisplaySystem.getDisplaySystem().getRenderer().createTextureState();
noTexture.setEnabled(true);
AlphaState alphaState = DisplaySystem.getDisplaySystem().getRenderer().createAlphaState();
alphaState.setSrcFunction(AlphaState.SB_SRC_ALPHA);
alphaState.setDstFunction(AlphaState.DB_ONE_MINUS_SRC_ALPHA);
alphaState.setBlendEnabled(true);
alphaState.setEnabled(true);
g.setRenderState(cs);
g.setRenderState(ws);
g.setRenderState(noLights);
g.setRenderState(noTexture);
g.setRenderState(alphaState);
return g;
}