[Papervision3D] Drop Shadow and Blur effects on 3D objects, how?

sean m seantheflashguy at gmail.com
Thu Jul 12 14:28:06 EDT 2007


Any tips on implementing this in a Flex project (not Flex ActionScript
Project) would be greatly appreciated.

Thanks again for your time and help!!!!!!


On 7/12/07, sean m <seantheflashguy at gmail.com> wrote:
>
> Thanks so much for the help guys. I am off to try this code now.
>
> Thanks again!!!
>
> Sean
>
> On 7/12/07, laurent < laurent at logiquefloue.org> wrote:
> >
> > That's cool!
> >
> > xero a écrit :
> > >
> > > here's a quick little demo.
> > > i use 3 glow filters, and i
> > > threw in a drop shadow for ya!
> > > (built in flex)
> > >
> > > // MMVII xero harrison
> > > // http://the.fontvir.us
> > > package {
> > >  import flash.display.*;
> > >  import flash.events.*;
> > >  import flash.filters.*;
> > >  import flash.text.*;
> > >  import flash.media.Sound;
> > >  import flash.media.SoundMixer;
> > >  import flash.net.URLRequest;
> > >  import flash.utils.ByteArray ;
> > >
> > >  import org.papervision3d.core.proto.*;
> > >  import org.papervision3d.scenes.*;
> > >  import org.papervision3d.cameras.* ;
> > >  import org.papervision3d.objects.*;
> > >  import org.papervision3d.materials.*;
> > >  import com.caurina.transitions.Tweener;
> > >  import org.papervision3d.core.Number3D;
> > >
> > >  [SWF(backgroundColor="0x000000", frameRate="300")]
> > >
> > >  public class testFilters extends MovieClip {
> > >
> > > //
> > _______________________________________________________________________
> > >
> > //                                                                    vars
> > >  public var container : Sprite;
> > >  public var scene  : MovieScene3D;
> > >  public var camera  : FreeCamera3D;
> > >  public var sphereObj : DisplayObject3D;
> > > //
> > _______________________________________________________________________
> > > //
> > > Constructor
> > >  public function testFilters(){
> > >      this.addEventListener(Event.ENTER_FRAME,loop3D);
> > >      init();
> > >  }
> > > //
> > _______________________________________________________________________
> > > //
> > > Init
> > >  public function init():void{
> > >      container = new Sprite();
> > >      addChild(container);
> > >      container.x = this.stage.stageWidth  / 2;
> > >      container.y = this.stage.stageHeight / 2;
> > >      scene = new MovieScene3D( container );
> > >      camera=new FreeCamera3D(1,1000);
> > >
> > >      sphereObj = new Sphere(ColorMaterial(0xFFFF33, 1),100,16,16);
> > >      scene.addChild(sphereObj);
> > >
> > >  }
> > > //
> > _______________________________________________________________________
> > > //
> > loop3D
> > >  public function loop3D(event:Event):void {
> > >   //influence camera with mouse
> > >      sphereObj.rotationY+=container.mouseX/200;
> > >      sphereObj.rotationX+=container.mouseY/200;
> > >
> > >   //create filters
> > >   var filter:Array = new Array();
> > >   //outer blend glow
> > >   filter.push(new GlowFilter(0xCCCC00, 1, 10, 10, 2, 1, false,
> > false));
> > >   //inner face glow
> > >    filter.push(new GlowFilter(0x00FF00, 1, 50, 50, 2, 1, true,
> > false));
> > >   //shadow glow
> > >   filter.push(new GlowFilter(0x00AA00, 1, 90, 90, 1, 1, false,
> > false));
> > >   //drop shadow
> > >   filter.push(new DropShadowFilter(4, 45, 0xcc0000, 1, 4, 4, 1, 1,
> > > false, false));
> > >   //apply filters
> > >   this.container.filters = filter;
> > >
> > >   //render the scene
> > >   this.scene.renderCamera( camera );
> > >  }
> > >   }
> > > }
> > >
> > >
> > > ____  ___
> > > \   \/  /___________  ____
> > > .\     // __ \_  __ \/  _ \
> > > ./     \  ___/|  | \(  <_> )
> > > /___/\  \___  >__|---\____/
> > > |     \_/   \/        |
> > > | xero harrison       |
> > > | x at xero.nu <mailto:x at xero.nu>           |
> > > | http://xero.nu <http://xero.nu>      |
> > > | http://fontvir.us   |
> > > | http://xero.owns.us |
> > > `---------------------'
> > >
> > >
> > >     ---------- Forwarded message ----------
> > >     From: "sean m" <seantheflashguy at gmail.com
> > >     <mailto:seantheflashguy at gmail.com>>
> > >     To:  Papervision3D at osflash.org <mailto:Papervision3D at osflash.org>
> > >     Date: Thu, 12 Jul 2007 06:06:22 -0700
> > >     Subject: [Papervision3D] Drop Shadow and Blur effects on 3D
> > >     objects, how?
> > >     Hello Papervision Developers,
> > >
> > >     Can anyone help me get the Drop Shadow and Blur effects working on
> >
> > >     Papervision 3D objects? Note: I tried the examples that I found
> > >     through google and they are not working. Any advice is greatly
> > >     appreciated.
> > >
> > >     Also, any direction on setting up event listeners for mouse clicks
> >
> > >     on 3D objects would be stellar.
> > >
> > >     Thanks for your time,
> > >
> > >     Sean
> > >
> > >
> > ------------------------------------------------------------------------
> > >
> > > _______________________________________________
> > > Papervision3D mailing list
> > > Papervision3D at osflash.org
> > > http://osflash.org/mailman/listinfo/papervision3d_osflash.org
> > >
> >
> >
> > _______________________________________________
> > Papervision3D mailing list
> > Papervision3D at osflash.org
> > http://osflash.org/mailman/listinfo/papervision3d_osflash.org
> >
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://osflash.org/pipermail/papervision3d_osflash.org/attachments/20070712/85dbbd04/attachment.html 


More information about the Papervision3D mailing list