Hey Doug have you tried setting the blendMode of the material? composite materials allow each child mateiral to be blended any way you see fit. so for alpha, try something like:
var myComposite:CompositeMaterial = new CompositeMaterial(); var myTexture:BitmapMaterial = new BitmapMaterial(myTextureBitmap); var myOverlay:BitmapMaterial = new BitmapMaterial(myOverlayBitmap); myOverlay.blendMode = BlendMode.MULTIPLY; myComposite.addMaterial(myTexture); myComposite.addMaterial(myOverlay); experiment with different blendmode types to see which one give you the desired effect Rob On Fri, Oct 2, 2009 at 4:04 PM, Douglas <[email protected]>wrote: > > Hi rob thanks for the quick reply, i saw that one before and it does > help me with one version of the game which is on a black background, > but the other one is an AR project and I need it to blend into a video > feed, i was hoping i could set the alhpa value of the composite > texture to the alpha value of the blend material i.e. > floormaterial.alpha = alphamaterial.alpha, but this doesnt work :S > > thanks > doug > > On Oct 2, 10:26 am, Rob Bateman <[email protected]> wrote: > > Hey Douglas > > > > this demo does something similar to what you dscibe - the horizon fades > to a > > darker colur thanks to a transparent png overlayed on the repeating > texture, > > using compositemateiral > > > > http://www.infiniteturtles.co.uk/blog/away3d-salt-flats-ferrari > > > > source available in the right-click menu > > > > Rob > > > > On Thu, Oct 1, 2009 at 3:51 PM, Douglas <[email protected] > >wrote: > > > > > > > > > Hi guys Im trying to make a rolling road on a plane, i have the road > > > texture scrolling easily with the TransformBitmapMaterial class, and > > > now im trying to make the road fade in and out at both edges, i > > > figured id do this using a compositematerial object with the diffuse > > > road texture combined with a stationary alpha map, but i cant seem to > > > get the the two to mix the way i want, anybody know how to do this or > > > know of any other way to achieve this effect. > > > > > thanks in advance > > > dug > > > > -- > > Rob Bateman > > Flash Development & Consultancy > > > > [email protected] -- Rob Bateman Flash Development & Consultancy [email protected] www.infiniteturtles.co.uk www.away3d.com
