Hey,
I'm looking for a way to reproduce this foggy-sphere-glowing effect using Java3D.
http://bzflag.org/screenshots/bzfi0021.jpg http://bzflag.org/screenshots/bzfi0019.jpg http://bzflag.org/screenshots/bzfi0022.jpg
I'm creating a transform group with a point light source and an emissive-material-sphere, but I can't reproduce the foggyness.
Ideas?
Thanks!
============ SOLUTION (Thanks to Ricket) ===========
try
{
TextureLoader myLoader = new TextureLoader( new File("./data/grad.png").toURI().toURL(), this );
ImageComponent2D myImage = myLoader.getImage( );
Raster raster = new Raster( );
raster.setPosition( new Point3f( 0.0f, 0.0f, 0.0f ) );
raster.setType( Raster.RASTER_COLOR );
raster.setSize( 50, 50);
raster.setImage( myImage );
TransparencyAttributes ta = new TransparencyAttributes( TransparencyAttributes.BLENDED, 0.0f );
Appearance app = new Appearance();
app.setTransparencyAttributes( ta );
objScale.addChild( new OrientedShape3D(raster, app, OrientedShape3D.ROTATE_ABOUT_POINT, new Point3f( 0.0f, 0.0f, 0.0f )));
}
catch (MalformedURLException e) { throw new RuntimeException(); }