Hi all,
Just wondering if anyone knows why movieclips with blend modes applied do not affect the 3d scene when placed over it? Is this a Stage3D issue? I searched all over the web but can’t find any mention of it.
Here’s my sample code:
import away3d.containers.View3D;
import away3d.containers.Scene3D;
import away3d.core.render.DefaultRenderer;
import flash.events.Event;
import away3d.primitives.Sphere;
import away3d.materials.ColorMaterial;
import away3d.lights.PointLight;
import flash.geom.Vector3D;
import flash.display.MovieClip;
import flash.display.BlendMode;
var scene:Scene3D = new Scene3D();
var renderer:DefaultRenderer = new DefaultRenderer();
var view:View3D = new View3D(scene, null, renderer);
view.backgroundColor = 0xCCCCFF;
addEventListener(Event.ENTER_FRAME, renderscene);
addChild(view);
var light:PointLight = new PointLight();
light.position = new Vector3D(-220, 200, -400);
scene.addChild(light);
var orangeMat:ColorMaterial = new ColorMaterial(0xFFCC33);
orangeMat.gloss = 50;
orangeMat.specular = 0.6;
orangeMat.lights = [light];
var sphere:Sphere = new Sphere(orangeMat, 200, 50, 50);
scene.addChild(sphere);
var mc:MovieClip = new MovieClip();
mc.graphics.beginFill(0x99FF99);
mc.graphics.drawRect(0,0,256,256);
mc.graphics.endFill();
mc.blendMode = BlendMode.MULTIPLY;
addChild(mc);
function renderscene(e:Event):void{
view.render();
}
Thanks for any help.
Craig