AlphaMaskMethod example

Software: Away3D 4.x

julespong, Member
Posted: 17 March 2013 10:08 AM   Total Posts: 53

I’m trying to use an AlphaMaskMethod on a texture material. The texture I’m using for the AlphaMaskMethod as well as the rendered result is attached. I’m not seeing what I expected. Here’s my code:

var Plane001_Bitmap:Bitmap = Bitmap(new PlaneBitmap());
__planeMaterial = TextureMaterial( generateMaterial("material0", NaN , Plane001_Bitmap.bitmapData) );
TextureMaterial( __planeMaterial ).alphaBlending = true;
var 
alphaMaskTexture:BitmapTexture = new BitmapTexture( Bitmap( new GroundAlphaMask() ).bitmapData );
var 
alphaMaskMethod:AlphaMaskMethod = new AlphaMaskMethod( alphaMaskTexture );
TextureMaterial( __planeMaterial ).addMethod( alphaMaskMethod ); 

 

   

julespong, Member
Posted: 17 March 2013 10:11 AM   Total Posts: 53   [ # 1 ]

Here’s the result image. As you can see, the edge of the mesh/material is still visible. I thought by applying the AlphaMaskMethod the edges of my plane wouldn’t be visible. Am I thinking about this wrong?

 

   
   

X

Away3D Forum

Member Login

Username

Password

Remember_me



X