So I want to get a nice bright red and green with an outline pass, however using ColorRGBA.green yields a forest green color. (Light combine I think, however removing all light states, and setting default colors doesn't seem to help)
here is a test to show what I am talking about; press 'space bar' to toggle between outline pass (dark green) and pseudo outline pass (bright green done with a wireframe renderstate).
import com.jme.app.AbstractGame;
import com.jme.app.SimplePassGame;
import com.jme.input.KeyBindingManager;
import com.jme.input.KeyInput;
import com.jme.math.Vector3f;
import com.jme.renderer.ColorRGBA;
import com.jme.renderer.pass.OutlinePass;
import com.jme.renderer.pass.RenderPass;
import com.jme.scene.Spatial;
import com.jme.scene.shape.Box;
import com.jme.scene.state.LightState;
import com.jme.scene.state.WireframeState;
public class OutlineTest extends SimplePassGame {
Box greenBox = null;
RenderPass renderPass = null;
OutlinePass outlinePass = null;
WireframeState wireframeState = null;
public static void main( String[] args ) {
new OutlineTest();
}
public OutlineTest() {
this.setDialogBehaviour( AbstractGame.FIRSTRUN_OR_NOCONFIGFILE_SHOW_PROPS_DIALOG );
this.start();
}
@Override
protected void simpleUpdate() {
if( KeyBindingManager.getKeyBindingManager().isValidCommand( "toggle_mode", false ) ){
if( renderPass.isEnabled() ){
renderPass.setEnabled( false );
wireframeState.setEnabled( false );
greenBox.setCullMode( Spatial.CULL_ALWAYS );
outlinePass.setEnabled( true );
} else{
renderPass.setEnabled( true );
wireframeState.setEnabled( true );
greenBox.setCullMode( Spatial.CULL_NEVER );
outlinePass.setEnabled( false );
}
rootNode.updateRenderState();
}
}
@Override
protected void simpleInitGame() {
display.getRenderer().setBackgroundColor( ColorRGBA.gray.clone() );
wireframeState = display.getRenderer().createWireframeState();
wireframeState.setLineWidth( 4 );
wireframeState.setEnabled( false );
KeyBindingManager.getKeyBindingManager().set( "toggle_mode", KeyInput.KEY_SPACE );
Box whiteBox = new Box( "box", new Vector3f( -1, -1, -1 ), Vector3f.UNIT_XYZ.clone() );
whiteBox.setLightCombineMode( LightState.OFF );
whiteBox.setDefaultColor( ColorRGBA.white.clone() );
greenBox = new Box( "box", new Vector3f( -1, -1, -1 ), Vector3f.UNIT_XYZ.clone() );
greenBox.setLightCombineMode( LightState.OFF );
greenBox.setDefaultColor( ColorRGBA.green.clone() );
greenBox.setRenderState( wireframeState );
greenBox.setCullMode( Spatial.CULL_ALWAYS );
outlinePass = new OutlinePass();
outlinePass.setOutlineWidth( 4 );
outlinePass.setOutlineColor( ColorRGBA.green.clone() );
outlinePass.setEnabled( true );
outlinePass.add( whiteBox );
pManager.add( outlinePass );
renderPass = new RenderPass();
renderPass.setEnabled( false );
renderPass.add( whiteBox );
renderPass.add( greenBox );
pManager.add( renderPass );
rootNode.attachChild( whiteBox );
rootNode.attachChild( greenBox );
rootNode.updateGeometricState( 0, true );
}
}
Also, here is an example pic:

Outline Desired
Pass Results