Start simple and move to more complex techniques if you are not happy.
Not perfect, but easy as hell. (Might be better to scale the highlight mesh on the shader in the direction of the normal)
package mygame;
import com.jme3.app.SimpleApplication;
import com.jme3.light.AmbientLight;
import com.jme3.material.Material;
import com.jme3.material.RenderState;
import com.jme3.math.ColorRGBA;
import com.jme3.math.Vector3f;
import com.jme3.renderer.RenderManager;
import com.jme3.scene.Geometry;
import com.jme3.scene.Spatial;
import com.jme3.scene.shape.Box;
/**
* test
* @author normenhansen
*/
public class Main extends SimpleApplication {
public static void main(String[] args) {
Main app = new Main();
app.start();
}
@Override
public void simpleInitApp() {
Spatial jaime = this.assetManager.loadModel("Models/Jaime/Jaime.j3o");
Material unshaded=new Material(this.assetManager,"Common/MatDefs/Misc/Unshaded.j3md");
Spatial jaimeClone=jaime.clone();
unshaded.setColor("Color", ColorRGBA.Blue);
unshaded.getAdditionalRenderState().setFaceCullMode(RenderState.FaceCullMode.Front);
jaimeClone.setMaterial(unshaded);
jaimeClone.scale(1.02f);
jaimeClone.move(0, -0.01f,0);
rootNode.attachChild(jaime);
rootNode.attachChild(jaimeClone);
/** A white ambient light source. */
AmbientLight ambient = new AmbientLight();
ambient.setColor(ColorRGBA.White);
rootNode.addLight(ambient);
}
@Override
public void simpleUpdate(float tpf) {
//TODO: add update code
}
@Override
public void simpleRender(RenderManager rm) {
//TODO: add render code
}
}