Pixel3D – The New Additions to Papervision3D Effects


pixels1.jpg

I just added some new classes to the Effects branch which allow you to render pixels in 3D space onto a BitmapEffectLayer's canvas. 

Click here to see a demo I made rendering 13,000 3D pixels, while applying other BitmapLayerEffects at the same time.

Adding pixels is easy - you start by creating a Pixels object, then add a Pixel3D to it - or 100 - or 10000:

Actionscript:
  1. //create pixels obect (bfx = BitmapEffectLayer)
  2. var pixels:Pixels = new Pixels(bfx);
  3.  
  4. //add 100 new Pixel3Ds to Pixel object
  5. for(var i:int=0;i<100;i++)
  6. pixels.addPixel3D(new Pixel3D(0xFF0000, 100, 100,100));
  7.  
  8. scene.addChild(pixels);

All the pixel classes do is render 3D points to a BitmapEffectLayer canvas.  All properties and behaviors are still available on the BitmapEffectLayer - including sorting and adding effects.

motioneffect.jpg

Somewhat unrelated - I have also added a BitmapMotionEffect class to the repository.  It simply renders out whatever pixels have changed since the last render - effectively showing any "motion" on the layer.   It is a normal effect type that you can apply to any BitmapEffectLayer.

Actionscript:
  1. //add Red effect to BitmapEffectLayer
  2. bfx.addEffect(new BitmapMotionEffect(0xFF0000));

 See a demo here using this effect.

[update]

I just threw this demo together using the pixels - i thought it was cool...  click and drag to move it:

This movie requires Flash Player 9

[/update]

 Enjoy!


18 Comments, Comment or Ping

  1. alberto

    Thanks Andy for both the tools and the inspiration you’re giving us!
    Outstanding!

    December 16th, 2007

  2. Jarrad

    wow, this is extremly impressive

    December 16th, 2007

  3. hristo

    mate …

    December 16th, 2007

  4. Great examples, congratulations!!

    Do you can give the source for us?

    December 16th, 2007

  5. Holy smokes that update is so cool. I want to do that right away!

    December 16th, 2007

  6. that stuff is just plain sick.
    thanks for all the new effects classes, I can’t wait to have time to dive into them!

    December 16th, 2007

  7. Absolutely gorgeous! Extremely nice work you’ve been doing for Papervision3D!

    December 17th, 2007

  8. slopester

    amazing stuff

    December 17th, 2007

  9. I’d love to see a step-by-step tutorial on using papervision. or even just a sample fla file that does a very simple animation so that i could have something to start with. the code snippets dont help because i’m not sure i have the latest papervision class or have it installed properly. I see papervision scene components in my library, but I’m not sure how to use them, or the code snipets you provide on the blog.

    January 24th, 2008

  10. Draco

    Can You share source code?
    I have problem with running pixels3D.

    February 22nd, 2008

  11. Logan

    Whenever I use the BitmapMotionEffect, it just makes a blank screen D:

    March 13th, 2008

  12. @Logan – It will make a blank screen if 1) there is no motion, or 2) the material you are using is very homogonous. Try fixing either of those and you should be alright.

    hth!

    March 15th, 2008

  13. I have check the papervision3d svn to find the class but i can’t..

    What is the package?
    Is it working with the Great White version ?

    Thanks for the amazing demos !

    May 6th, 2008

  14. Joee

    @andy,

    i experience same thing. what i would like is for bitmapmotioneffect() to come in effect as i move my camera.

    how can i do this ?

    thanks!

    June 15th, 2008

  15. Thanks for the amazing demos !

    September 12th, 2008

  16. Whenever I use the BitmapMotionEffect, it just makes a blank screen D:

    September 12th, 2008

Reply to “Pixel3D – The New Additions to Papervision3D Effects”