Japanese | English | Korean

Samples

Additive and subtractive blending effects

MascotCapsule V3 can apply additive and subtractive blending effects to the models, when additive and subtractive blending attributes are specified for these models. You can render the effects similar to smokes and lightning.


In order to specify settings for the additive and subtractive blending, use the setSemiTransparentEnabled( boolean isEnabled ) method in the Effect3D class. Specify true to enable the additive and subtractive blending, and specify false to disable.

/**
  * commandAction() method
  * Process when the soft key is pressed-down (changing the rendering parameter)
  */
public void commandAction( Command c, Displayable d ){
String label = c.getLabel();

/* Changing the blending method */
if( label.equals( commandLabels[ 0 ] ) ){
effect.setSemiTransparentEnabled( false );
}else if( label.equals( commandLabels[ 1 ] ) ){
effect.setSemiTransparentEnabled( true );
}
}

Lightning effect (additive blending) enabled (left), disabled (right)