Hi there,
Anyone knows how to animate an alpha mask?
The idea is to have a moving alpha hole on a plane.
Treid AlphaMaskMethod, but i can’t find any way to animate the secondaryUVs…
Thanks for your help,
best regards
Animated AlphaMaskSoftware: Away3D 4.x |
||
Paul Schlichter, Newbie
Posted: 04 May 2012 04:22 PM Total Posts: 13 Hi there, Anyone knows how to animate an alpha mask? The idea is to have a moving alpha hole on a plane.
|
||
Paul Schlichter, Newbie
Posted: 07 May 2012 10:39 AM Total Posts: 13 [ # 1 ] Found a solution: You can use ProjectiveTextureMethod to project an alpha texture on a textured mesh. All you need is a MaterialBase with alphaBlending enabled, a BitmapTexture with alpha channel to sample alpha from.
projectedAlphaHole = new BitmapTexture( new BitmapWithTransparency().bitmapData ); To make this work you need to add a new BlendMode to ProjectiveTextureMethod.as. Search for the follwing lines:
if (_mode == MULTIPLY) and add the follwing for an “alpha stencil”:
else if ( _mode == ALPHA ) Finally add a static const on top of class to identify the new BlendMode:
public static const ALPHA : String = "alpha";
ProjectiveTextureMethod( texProjector, ProjectiveTextureMethod.ALPHA );
|