cast shadow on transparent plane

Software: Away3D 4.x

alpoman, Jr. Member
Posted: 29 March 2016 03:08 PM   Total Posts: 40

Hello, I found in this forum a post that described how to do this, but I cant get it to work.  I can get it to work in awaybuilder, so I think it might work. in awaybuilder, I set up a white plane set to multiply and alpha to 0, added the light, hardshadow, and a floating cube above to cast a shadow - and it casts a perfect shadow on the plane with complete transparency around shadow on that plane.  perfect, but when I try this in flash, I cant get the plane to render correctly,

I’m using away3d-core-fp11_4_1_6.swc in flash animate cc

here is my code:

omaterial = new ColorMaterial(0xFFFFFF,0);
omaterial.lightPicker =lightPicker;
omaterial.shadowMethod = new HardShadowMapMethod(sunLight);
omaterial.blendMode = BlendMode.MULTIPLY;
omaterial.shadowMethod.alpha =1
bshadplane = new Mesh(new PlaneGeometry(1092,1092), omaterial);

this just renders a black square.

If I change omaterial alpha=1 on line 1, and omit the blendmode on line 5, it renders as a white square with the correct shadows cast by a cube above it- but I want the plane transparent, not white.  does anyone know why?

thanks in advance!!

here is a pic of it working in awaybuilder 1.0.0 gold,



Image Attachments


Away3D Forum

Member Login