How to highlight specific mesh in 3d model with glow?

Software: Away3D 4.x

ZeroPoid, Newbie
Posted: 16 June 2012 11:36 AM   Total Posts: 1

I need to highlight objects within loaded 3d model with glowfilter kind effect, but when I do that all the meshes highlighted even if I get one specific on mouseover event. If I use this:

protected function onItemOver(event:Event):void
   {
    
var targetMesh:Mesh event.target as Mesh;
    
   
    var 
data:BitmapData BitmapTexture(TextureMaterial(targetMesh.material).texture).bitmapData.clone();
    
// change the color of the image in blue
    
var texture:BitmapTexture = new BitmapTexture(data);
    var 
material:TextureMaterial = new TextureMaterial();
    
material.texture texture;
    
material.alphaBlending true;
    
material.addMethod(new OutlineMethod(0xcc0000,10,true,true));
    
targetMesh.material =  material;
   

I also get “Error: Error #3691: Resource limit error
at flash.display3D::Context3D/createTexture()” after some time.
   
If I just do:  TextureMaterial(targetMesh.material).addMethod(new OutlineMethod(0xcc0000,10,true,true));  it outlines the whole model confused

   
   

X

Away3D Forum

Member Login

Username

Password

Remember_me



X