No Transparency in FP11

Software: Away3D 4.x

Guido, Member
Posted: 14 June 2012 08:34 AM   Total Posts: 70

Hi,

if I use view.stage3DProxy.context3D.drawToBitmapData(this.bitmapdata), is there a way to get a png-File with alpha-Transparency?

   

Shegl, Sr. Member
Posted: 14 June 2012 09:32 AM   Total Posts: 134   [ # 1 ]

Ofc yes. Use UNIQUE color for background, for example 0x330000. then just

image.bitmapData.threshold(original, rect, pt, “==”, 0xFF330000, 0x00330000, 0xFFFFFFFF, true);

   

Richard Olsson, Administrator
Posted: 16 June 2012 11:13 AM   Total Posts: 1192   [ # 2 ]

As far as I know, it won’t be possible to do it “correctly” because unless I’m mistaken the backbuffer in Stage3D does not support alpha transparency (at least when rendering to the stage.)

The hack suggested by Shegl will work as long as you don’t have the 0x330000 color in your rendered objects, although it will likely not produce very nice-looking edges.

   

Avatar
Baush, Sr. Member
Posted: 01 July 2012 11:57 PM   Total Posts: 135   [ # 3 ]

There’s a solution in:
http://away3d.com/forum/viewthread/1401/

   
   

X

Away3D Forum

Member Login

Username

Password

Remember_me



X