Archive for the ‘Links’ Category

Saqoosha’s “hole” Effect

Friday, April 10th, 2009

http://saqoosha.net/

so after much searching and still not finding what i’m really looking for wich is the recipe to capture bitmapdata off the marker.rect or something along those lines, i tackled “the virtual hole” with the samples from Saqoosha’s site and a little hacking away of useless code i made it work. Woo!

virtual hole

and the code that got me here.


import flash.display.Bitmap;
import flash.display.Sprite;
import flash.display.StageQuality;
import flash.display.StageScaleMode;
import flash.events.Event;
import flash.events.KeyboardEvent;
import flash.filters.ColorMatrixFilter;
import flash.text.TextField;
import flash.text.TextFieldAutoSize;
import flash.text.TextFormat;

import org.papervision3d.lights.PointLight3D;
import org.papervision3d.materials.WireframeMaterial;
import org.papervision3d.materials.shadematerials.FlatShadeMaterial;
import org.papervision3d.materials.utils.MaterialsList;
import org.papervision3d.objects.primitives.Cube;
import org.papervision3d.objects.primitives.Sphere;
import org.papervision3d.objects.primitives.Plane;
import org.papervision3d.core.math.Matrix3D;
import org.papervision3d.render.BasicRenderEngine;
import org.papervision3d.render.*;
import org.papervision3d.scenes.Scene3D;
import org.papervision3d.view.Viewport3D;
import org.papervision3d.view.stats.StatsView;
import org.papervision3d.materials.MovieAssetMaterial;
import org.papervision3d.materials.*;
import org.papervision3d.materials.BitmapAssetMaterial;
import org.papervision3d.materials.BitmapFileMaterial;
import org.papervision3d.materials.BitmapMaterial;
import org.papervision3d.materials.special.*;
import org.papervision3d.materials.shaders.*;
import org.papervision3d.materials.shadematerials.*;
import org.papervision3d.materials.utils.*;
import org.papervision3d.objects.special.*;
import org.papervision3d.objects.primitives.*;
import org.papervision3d.objects.primitives.Sphere;
import org.papervision3d.objects.parsers.DAE;
import org.papervision3d.objects.DisplayObject3D;

import org.papervision3d.cameras.Camera3D;
import org.papervision3d.materials.BitmapMaterial;
import org.papervision3d.materials.ColorMaterial;
import org.papervision3d.materials.utils.BitmapMaterialTools;
import org.papervision3d.materials.utils.MaterialsList;
import org.papervision3d.objects.primitives.Cube;
import org.papervision3d.view.BasicView;

  [Embed(source='../assets/bg.png')]
  var bgTextureClass:Class;
  [Embed(source='../assets/cube-side.png')]
  var cubeSideTextureClass:Class;
  [Embed(source='../assets/cube-bottom.png')]
  var cubeBottomTextureClass:Class;

  var _green:Cube;

var sp:Sprite = new Sprite();
addChild(sp);

var viewport:Viewport3D = new Viewport3D( 960, 720, true, true, true, true );
sp.addChild(viewport);
viewport.buttonMode = false;

var renderer:BasicRenderEngine = new BasicRenderEngine();
var scene:Scene3D = new Scene3D();
var camera:Camera3D = new Camera3D();
camera.zoom = 11;
camera.focus = 100;

  var cmats:BitmapMaterial = BitmapMaterialTools.createBitmapMaterial(cubeSideTextureClass);
  var cmatb:BitmapMaterial = BitmapMaterialTools.createBitmapMaterial(cubeBottomTextureClass);
  var hole:Cube = this.scene.addChild(new Cube(new MaterialsList({all: cmats, bottom: cmatb}), 300, 300, 300, 1, 1, 1, Cube.ALL, Cube.TOP)) as Cube;
  this._green = this.scene.addChild(new Cube(new MaterialsList({all: new ColorMaterial(0x00ff00)}), 300, 300, 300, 1, 1, 1, 0, Cube.TOP)) as Cube;
  hole.y = this._green.y = -150;

  this.filters = [
   new ColorMatrixFilter([
    1, 0, 0, 0, 0,
    0, 1, 0, 0, 0,
    0, 0, 1, 0, 0,
    1, -1, 1, 1, 0
   ])
  ];

 this.addEventListener(Event.ENTER_FRAME, this._update);

  function _update(e:Event):void {
   renderer.renderScene(scene, camera, viewport);
   camera.orbit(this.stage.mouseY / 600 * 90, this.stage.mouseX / 800 * 180);
  }

You’ll need to find the newyears source on saqooshas blog for the .png’s but theyre just a grey-white gradient. could be generated on the spot.

A few words about papervision 3D

Sunday, March 8th, 2009

 http://www.papervision3d.org/ first go here, let it load, look around and come back if youre not allready familiar.

Before i jump into talking about papervision code and stuff i wanted to say a few words about it.

First the differance between papervision and pay per view(ive been asked a few times now) is you have to wait till tomorrow to download a pay per view event, but you can download papervision now. http://code.google.com/p/papervision3d/

you’ll need to download the tortise SNV whammy to get the full source. its not that hard. post if you cant work it out, i’ll put something up on how svn’s work to the best of my knowledge. please dont ask me to do it, you’re WAY better off finding a tutorial by someone who actually knows what theyre talking about.  Now that i think about it, there just isnt enough BS on the internet. maybe i’ll do a tut on it just because i dont know what i’m talking about. wait and see.

Papervision has become my white whale.

Papervision 3D is an open source 3d rendering “environment” for the flash player.

It can be compiled in a number of programs, flex and flash to name a few.

there in lies one of the major double edged swords. about 1/2 the tutorials out there are written in Flex( I dont flex) and half the remaining tutorials are written in AS3 class files. the remainder are written in flash on the main timeline or via “other” methods of compiling. so finding tutorials you can use without being nearly fluent in at least flex AND flash is frustrating at best.

NOW on to the branch trunk system. if you can find the branch(dead or not), or trunk version that the person writing any instructions or a tutorial used consider it an acomplishment. I stood up and did a little dance a few times here just after getting a demo running.

Papervision’s core and extended group of contributers are in my opinion some of the greatest minds AS programming has to offer at the moment. The stuff that comes from those labs makes my nipples more than a little stiff.
Just a side note. i love these guys taste in music. its allways nice to go to a computeSpectrum example and want to turn the music UP or hitting refresh just to hear the song again instead of leaping for mute. thx.

heres a few sites ive driven the hit counters up quite a bit recently.

http://blog.papervision3d.org/

i tripped out on this page for a while
http://mrdoob.com/

http://www.sebleedelisle.com/

http://blog.zupko.info/

http://rockonflash.wordpress.com/

goToandLearn.com

Sunday, March 8th, 2009

Lee Brimlowe is without a doubt one of my heros.

he’s up there with Alton Brown.

if youre beginning flash, or looking to expand your pallate lee’s work is so easy to understand, he has a great library of free video tutorials. if you dont know allready goToandLearn ASAP

http://www.gotoandlearn.com

sources included with tutorials

THE HOLY GRAIL!!

Sunday, March 8th, 2009

abudaan youve made me a verry happy man. and eaten any amount of free time i may have had.

http://code.google.com/u/abudaan/

:)

Pulse Particles

Sunday, March 8th, 2009

AWESOME particle engine

FREE

EASY

bitmapeffects were pretty easy to apply. theres a whole bitmapEmitter class.

you can find the API on google code theres a link to it from the rogue-development site.

I’m still having a few issues scoping individual particles once they’ve been generated.

the samples and (i loosely use the word) tutorials on the site are def informative and show the potential of the classes, but they dont really scratch the surface of the real possabilities. plus ive had a hard time getting support for it and ive yet to find a community around it(what do i want its not papervision?).

with those things in mind i still give it a 9 out of 10 easily.

marc did a slammin job in my opinion

http://rogue-development.com/

TweenMax

Sunday, March 8th, 2009

I use alot of the tweenMax classes the old caurina classes are still good, but ive started to use the tweenMax ones more and more.

http://blog.greensock.com/tweenmaxas3/

here they are.

I’ll try to give as much credit as i can where credit is due. if i forget someone I’m sorry but i go through a TON of tutorials on a daily and weekly basis, i’m bound to forget someone, sorry if its you.

Ripple class

Sunday, March 8th, 2009

So heres a ripple effect i absolutely love. I like it so much i made it my banner. Really simple to use, runs pretty damn smooth if i do observe correctly. thats pretty good for all the bitmap data that used to and still can completely bog a system. 

You’ll see later it can be applied to a live webcam :)

 http://www.derschmale.com/2008/08/03/water-ripples-revisited-as3-only-version/

heres the tutorial i got it from i think.

enjoy :)