Hi everybody,
Since the outer glow is not yet available on Away 3D 4.0, I decided to replace the solar system’s star by a plane.
I dynamically load a PNG, create a BitmapTexture from its BitmapData and apply it to the mesh.
// creating the sun
var plane:PlaneGeometry = new PlaneGeometry(256,256,8,8);
var sun:Mesh = new Mesh(plane);
scene.addChild(sun);
// loading texture
var url:String = 'soleil.png';
var Ldr:Loader = new Loader();
Ldr.load(new URLRequest(url));
Ldr.contentLoaderInfo.addEventListener(Event.COMPLETE, onComplete);
function onComplete(e:Event):void
{
var texture:BitmapTexture = new BitmapTexture(e.target.data);
texture_mat.texture = texture;
sun.material = texture_mat;
}
Unfortunately, the material is not transparent like the png.
In the attached example, you can see:
- on the top left corner: the png included in a sprite (without Away 3D)
- on the center: the mesh with the png as a texture.
As you can see, the render is quite different!
What should I do?
Thank you a lot for reading this post and maybe to answer to it.
Dr Schizo