Semi-transparency using BlendHalf
MascotCapsule V3 can render models semi-transparently, when semi-transparency attributes are specified for these models.
Use the setSemiTransparentEnabled( boolean isEnabled ) method in the Effect3D class to specify the semi-transparency setting. Specify true to enable semi-transparency, and false to disable.
/**
* commandAction() method
* Process when the soft key is pressed-down (changing the rendering parameter)
*/
public void commandAction( Command c, Displayable d ){
* 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 shading method */
if( label.equals( commandLabels[ 0 ] ) ){
}if( label.equals( commandLabels[ 0 ] ) ){
effect.setSemiTransparentEnabled( false );
}else if( label.equals( commandLabels[ 1 ] ) ){
effect.setSemiTransparentEnabled( true );
}
Semi-transparency enabled ( left ), disabled ( right )
Quick Links
- MIDP + com.mascotcapsule package (MascotCapsule V3 API)
- Basic rendering
- Rendering a 3D model / Semi-transparency using BlendHalf / Additive and subtractive blending effects / Switching the animation data / Switching the pattern using dynamic polygons / Lighting / Shading / Using the environment map / Rendering the primitives / Reducing the texture distortion / Preventing Z-sort rendering mistakes under certain circumstances / Coordinate systems and the camera / Projection methods
- Basic rendering
- Go back to Samples index

