FITC 2009 - Amsterdam ROCKED!!!
Posted on February 25, 2009
Filed Under Events | Leave a Comment
Ok it’s bin a blast! Seeing GMunk, Mario Klingemann, Keith Peters and many others presentations, most inspiring! They had a really high end speakers list, so unfortunately you can’t see all presentations.
A couple of things that I really think are true is what Aral Balkan said in his presentation (The future is so bright, I need to wear shades) - Ask yourself the question: ‘Does it give me joy?’ if not change it! It is so important to have fun in the work you do it only helps getting the end result perfect or at least better than that you don’t like what you are working on. This is also something you can see when you watch all the presentations/lectures, they all have so much passion in the way they talk about their work it’s addictive and inspiring. You know what I mean when you are at a presentation and you get inspired the only thing you want to do is start playing around with your own ideas or start projects with your friends just for fun and explore all the possibilities to learn from eachother and create some cool projects.
I want to end with some cool links to projects that they showed us at FITC Amsterdam 2009:
Seb Lee-DeLisle - BBC Game site for Big & Small. watch.
Seb Lee-DeLisle – Papervision3D Simplified. watch.
GMunk - New Showreel. watch.
Ralph Hauwert - Realtime SID (Sound Interface Device) Playback in flash. watch.
Joshua Davis - All his work. watch.
Andre Michelle - AudioTool. watch.
Keith Peters - Art from Code. watch.
Mario Klingemann - The Tinkerer’s box. Probably in the near future his presentation will be available here. But check out his site as well. watch.
Theo Watson - Openframeworks. watch.
Note - Most experiments make use of WismanAS3Lib
Posted on February 16, 2009
Filed Under General, Opensource, experiments | Leave a Comment
Ola peeps, some of my experiments use classes from wismanas3lib repository, so please get a copy from the repository so you can retrieve possible updates aswell. Or download them here (!! the classes will get updated so it’s better to use the googlecode repository !!).
Thanx for the understanding!
Cheers JW
Siftables, are AWESOME
Posted on February 16, 2009
Filed Under Events, Interaction, experiments | Leave a Comment
MIT grad student David Merrill demos Siftables — cookie-sized, computerized tiles you can stack and shuffle in your hands. These future-toys can do math, play music, and talk to their friends, too. Is this the next thing in hands-on learning? Go and read his full bio on TED.
Flash On Tap 09 Pre-Interview with Keith Peters
Posted on February 11, 2009
Filed Under Events | Leave a Comment
This thurday, feb 11th Interview with Keith Peters! Make sure you join, its free!!!
Get your free ticket here.
For more information read ActionscriptHero.org’s post. Hope to see you there!
PV3D - Playing with light and cubes
Posted on February 5, 2009
Filed Under Actionscript 3.0, Papervision, experiments | 8 Comments
Little thingy in between, playing with light in the most simplest way there is. It has no purpose…, but thought he why not. Click and drag the cube. On click the light will tween out of the center outside the cubes, onrelease move back to the center. At this point i’m still looking around to play with multiple lights so if anyone has suggestions of ideas…leave a message
And here is the code:
-
package
-
{
-
// tweener
-
import gs.easing.Back;
-
import caurina.transitions.Tweener;
-
-
// flash
-
import flash.events.MouseEvent;
-
import flash.filters.BlurFilter;
-
import flash.events.Event;
-
import flash.display.Sprite;
-
-
// papervision
-
import org.papervision3d.view.BasicView;
-
import org.papervision3d.objects.DisplayObject3D;
-
import org.papervision3d.materials.shadematerials.FlatShadeMaterial;
-
import org.papervision3d.objects.primitives.Cube;
-
import org.papervision3d.lights.PointLight3D;
-
import org.papervision3d.materials.utils.MaterialsList;
-
import org.papervision3d.view.AbstractView;
-
import org.papervision3d.core.proto.CameraObject3D;
-
import org.papervision3d.core.proto.MaterialObject3D;
-
-
[SWF(width="500", height="500", backgroundColor="#000000", frameRate="60")]
-
public class LightDemo3D extends Sprite
-
{
-
//
-
// private constants
-
//
-
private static const GRID_SPACE:int = 50;
-
private static const CUBE_SIZE:int = 150;
-
-
//
-
// private properties
-
//
-
private var _viewBasic:BasicView;
-
private var _mList:MaterialsList;
-
private var _pl:PointLight3D;
-
private var _flatMat:FlatShadeMaterial;
-
private var _mainCube:DisplayObject3D;
-
private var _isDown:Boolean;
-
private var _prevMouseX:Number;
-
private var _prevMouseY:Number;
-
private var _cameraPitch:Number = 90;
-
private var _cameraYaw:Number = 270;
-
private var _cameraTarget:DisplayObject3D;
-
-
//////////////////////////////////////////////////////////////////////////////////////
-
//
-
// Constructor
-
//
-
//////////////////////////////////////////////////////////////////////////////////////
-
-
// ———————————————————————————–
-
public function LightDemo3D()
-
{
-
addEventListener(Event.ADDED_TO_STAGE, initialize);
-
}
-
-
//////////////////////////////////////////////////////////////////////////////////////
-
//
-
// Public methods
-
//
-
//////////////////////////////////////////////////////////////////////////////////////
-
-
// ———————————————————————————–
-
// none
-
-
//////////////////////////////////////////////////////////////////////////////////////
-
//
-
// Private methods
-
//
-
//////////////////////////////////////////////////////////////////////////////////////
-
-
// ———————————————————————————–
-
private function initialize(event:Event):void
-
{
-
removeEventListener(Event.ADDED_TO_STAGE, initialize);
-
-
// setup view
-
initView();
-
-
// materials
-
initMaterials();
-
-
// objects
-
initObjects();
-
-
// listeners
-
addEventListener(Event.ENTER_FRAME, render);
-
-
stage.addEventListener(MouseEvent.MOUSE_DOWN, mouseDownHandler);
-
stage.addEventListener(MouseEvent.MOUSE_UP, mouseUpHandler);
-
stage.addEventListener(MouseEvent.MOUSE_MOVE, mouseMoveHandler);
-
stage.addEventListener(Event.MOUSE_LEAVE, mouseLeaveHandler);
-
}
-
-
private function initView():void
-
{
-
_viewBasic = new BasicView(800, 600, true, true);
-
addChild(_viewBasic);
-
-
_viewBasic.viewport.filters = [new BlurFilter(2,2,1)];
-
-
// Camera
-
_cameraTarget = _viewBasic.scene.addChild(new DisplayObject3D());
-
_viewBasic.camera.lookAt(_cameraTarget);
-
_viewBasic.camera.z = -1200;
-
-
// PointLight
-
_pl = new PointLight3D(true);
-
-
}
-
-
private function initMaterials():void
-
{
-
_flatMat = new FlatShadeMaterial(_pl, 0×7DC202, 0×000000);
-
_flatMat.doubleSided = false;
-
_flatMat.fillAlpha = .85;
-
-
_mList = new MaterialsList();
-
_mList.addMaterial(_flatMat, "all");
-
}
-
-
private function initObjects():void
-
{
-
/*
-
* create grid of 4×4x4 cubes with a
-
* space of 10px between all objects
-
*/
-
var rows:int = 0;
-
var cols:int = 0;
-
var depth:int = 0;
-
-
_mainCube = new DisplayObject3D();
-
_viewBasic.scene.addChild(_mainCube);
-
-
for (var i:int = 0; i < 64; i++)
-
{
-
var cube:Cube = new Cube(_mList, CUBE_SIZE, CUBE_SIZE, CUBE_SIZE, 2, 2, 2);
-
cube.name = "cube_" + i;
-
cube.x = -320 + rows * (CUBE_SIZE + GRID_SPACE);
-
cube.y = -320 + cols * (CUBE_SIZE + GRID_SPACE);
-
cube.z = -320 + depth * (CUBE_SIZE + GRID_SPACE);
-
-
if (++rows > 3)
-
{
-
rows = 0;
-
if (++depth > 3)
-
{
-
depth = 0;
-
cols++;
-
}
-
}
-
-
_mainCube.addChild(cube);
-
}
-
-
// place light in the center
-
_pl.x = _mainCube.x;
-
_pl.y = _mainCube.y;
-
_pl.z = _mainCube.z;
-
}
-
-
private function mouseDownHandler(event:MouseEvent):void
-
{
-
_isDown = true;
-
_prevMouseX = event.stageX;
-
_prevMouseY = event.stageY;
-
-
Tweener.addTween(_pl, {time: 2, z: 1500, transition: Back.easeInOut});
-
}
-
-
private function mouseUpHandler(event:MouseEvent = null):void
-
{
-
_isDown = false;
-
-
Tweener.addTween(_pl, {time: 2, z: -320, transition: Back.easeInOut});
-
}
-
-
private function mouseMoveHandler(event:MouseEvent):void
-
{
-
var differenceX:Number = event.stageX - _prevMouseX;
-
var differenceY:Number = event.stageY - _prevMouseY;
-
-
if(_isDown)
-
{
-
// with many thanx to Lee Brimelow
-
// blog post: http://pv3d.org/tag/orbit/
-
_cameraPitch += differenceY;
-
_cameraYaw += differenceX;
-
-
_cameraPitch %= 360;
-
_cameraYaw %= 360;
-
-
_cameraPitch = _cameraPitch > 0 ? _cameraPitch : 0.0001;
-
_cameraPitch = _cameraPitch < 90 ? _cameraPitch : 89.9999;
-
-
_prevMouseX = event.stageX;
-
_prevMouseY = event.stageY;
-
-
_viewBasic.camera.orbit(_cameraPitch, _cameraYaw, true, _mainCube);
-
}
-
-
}
-
-
private function mouseLeaveHandler(event:Event):void
-
{
-
mouseUpHandler();
-
}
-
-
private function render(event:Event):void
-
{
-
_viewBasic.singleRender();
-
}
-
}
-
}
Update - Code snippets will be placed ASAP
Posted on January 22, 2009
Filed Under General | Leave a Comment
After request and feedback from friends I’ll also place code hilights/snippets in the post itself, if you than still like it or have feedback on the code leave a comment and use codexperiments.googlecode.com to get the source files.
Cheers Paul for the feedback!
PV3D - Changing Cube Materials at runtime
Posted on January 21, 2009
Filed Under Actionscript 3.0, Opensource, Papervision, experiments | 3 Comments
A little demo illustrating how to change cube materials at runtime. In this demo you can click to go to the next side of the cube. Or just use your left and right arrow keys,
-
_sidesLeftToRight = ["back", "right", "front", "left"];
-
_currpageID = 0;
-
-
private function updateSkin():void
-
{
-
var faceName:String = _sidesLeftToRight[(_currpageID % _sidesLeftToRight.length)];
-
var material:MovieAssetMaterial = new MovieAssetMaterial(_list[_currpageID], true, true, true, true);
-
material.animated = true;
-
material.doubleSided = true;
-
_cube.replaceMaterialByName(material, faceName);
-
}
Where _list is an array with all the linkId’s to library assets. And _currPageID is updated by using the arrow keys (left & right) or mouse.
Will commit it to codexperience at googlecode soon
Free Carlos Ulloa - Papervision3D - Audio Session
Posted on January 20, 2009
Filed Under Events, Papervision | Leave a Comment
Just fun with dragging 3D Object
Posted on January 18, 2009
Filed Under Actionscript 3.0, experiments | 5 Comments
With many thanx to Andy Zupko. Next step adding more objects to it and apply some physics (JigLibFlash) to it.
[UPDATE] Had to remove ground texture, file became way to big.
-
/**
-
* with many thanx to: Andy Zupko
-
*/
-
package
-
{
-
// FLASH
-
import flash.filters.BlurFilter;
-
import flash.display.Sprite;
-
import flash.ui.Mouse;
-
import flash.display.Bitmap;
-
import flash.events.Event;
-
-
// PAPERVISION
-
import org.papervision3d.materials.MovieMaterial;
-
import org.papervision3d.core.proto.LightObject3D;
-
import org.papervision3d.materials.BitmapMaterial;
-
import org.papervision3d.materials.special.CompositeMaterial;
-
import org.papervision3d.view.layer.util.ViewportLayerSortMode;
-
import org.papervision3d.lights.PointLight3D;
-
import org.papervision3d.materials.shadematerials.FlatShadeMaterial;
-
import org.papervision3d.core.math.Quaternion;
-
import org.papervision3d.objects.primitives.Sphere;
-
import org.papervision3d.core.math.Plane3D;
-
import org.papervision3d.core.math.Number3D;
-
import org.papervision3d.objects.DisplayObject3D;
-
import org.papervision3d.materials.ColorMaterial;
-
import org.papervision3d.objects.primitives.Plane;
-
import org.papervision3d.view.BasicView;
-
import org.papervision3d.view.layer.ViewportLayer;
-
import org.papervision3d.core.proto.MaterialObject3D;
-
-
[SWF(width="640", height="480", backgroundColor="#000000", frameRate="60")]
-
public class MouseDepth extends BasicView
-
{
-
private var _plane:Plane;
-
private var _lookAt:DisplayObject3D;
-
private var _vz:Number = 0;
-
private var _vy:Number = 0;
-
private var _vx:Number = 0;
-
private var _plane3d:Plane3D;
-
private var _sphere:Sphere;
-
private var _radius:Number = 50;
-
private var _light:PointLight3D;
-
private var _ground:Plane;
-
private var _globalLight:LightObject3D;
-
private var _shadowPlane:Plane;
-
-
[Embed(source="tennisball.jpg")]
-
public var ball:Class;
-
-
public function MouseDepth()
-
{
-
initPapervision();
-
}
-
-
private function initPapervision():void
-
{
-
Mouse.hide();
-
-
// set sortmode
-
viewport.containerSprite.sortMode = ViewportLayerSortMode.INDEX_SORT;
-
-
// create light for ball
-
_light = new PointLight3D(false);
-
_light.y = 300;
-
-
// create general light
-
_globalLight = new PointLight3D(true);
-
_globalLight.y = 400;
-
_globalLight.x = 300;
-
-
// create plane3d
-
_plane3d = new Plane3D();
-
_plane3d.setNormalAndPoint(new Number3D(0, 1, 0), new Number3D(0, 0, 0));
-
-
// ground
-
// add some effect to it
-
var gravelFM:FlatShadeMaterial = new FlatShadeMaterial(_globalLight, 0xFFFFFF, 0×333333);
-
gravelFM.fillAlpha = .2;
-
_ground = new Plane(gravelFM, 2000,2000);
-
_ground.rotationX = 90;
-
scene.addChild(_ground);
-
viewport.getChildLayer(_ground).layerIndex = 0;
-
-
// create mouse object
-
var cm:ColorMaterial = new ColorMaterial(0×333333);
-
cm.fillAlpha = .5;
-
-
_plane = new Plane(cm, 50, 50, 2, 2);
-
_plane.rotationX = 90;
-
-
// -radius, to place the sphere right on top of our plane
-
_plane.y = -_radius;
-
scene.addChild(_plane);
-
viewport.getChildLayer(_plane).layerIndex = 1;
-
-
// create materials for sphere
-
var bmat:BitmapMaterial = new BitmapMaterial(Bitmap(new ball()).bitmapData, true);
-
bmat.tiled = true;
-
bmat.smooth = true;
-
-
var fm:FlatShadeMaterial = new FlatShadeMaterial(_light, 0xFFFFFF, 0×333333);
-
fm.fillAlpha = .5;
-
-
var sm:CompositeMaterial = new CompositeMaterial();
-
sm.addMaterial(bmat);
-
sm.addMaterial(fm);
-
-
// create sphere
-
_sphere = new Sphere(sm, _radius, 20, 18);
-
scene.addChild(_sphere);
-
viewport.getChildLayer(_sphere).layerIndex = 3;
-
-
// object to look at
-
_lookAt = new DisplayObject3D();
-
camera.focus = 100;
-
camera.zoom = 11;
-
camera.lookAt(_lookAt);
-
-
// place camera higher up
-
camera.y = 800;
-
-
createShadow();
-
-
// render
-
startRendering();
-
}
-
-
public function createShadow():void
-
{
-
var floorSprite:Sprite = new Sprite();
-
floorSprite.graphics.beginFill(0xdddddd, 0);
-
floorSprite.graphics.drawRect(0, 0, 400, 400);
-
floorSprite.graphics.endFill();
-
-
var shadow:Sprite = new Sprite();
-
shadow.graphics.beginFill(0×101010, 1);
-
shadow.graphics.drawCircle(0, 0, 100);
-
shadow.graphics.endFill();
-
floorSprite.addChild(shadow);
-
-
shadow.filters = [new BlurFilter(30, 30, 8)];
-
shadow.x = 200;
-
shadow.y = 200;
-
-
_shadowPlane = new Plane(new MovieMaterial(floorSprite, true, false, true), 200, 200, 1, 1);
-
_shadowPlane.pitch(90);
-
scene.addChild(_shadowPlane);
-
_shadowPlane.y = -_radius;
-
viewport.getChildLayer(_shadowPlane).layerIndex = 2;
-
}
-
-
override protected function onRenderTick(event:Event = null):void
-
{
-
// move plane
-
var cameraPosition:Number3D = new Number3D(camera.x, camera.y, camera.z);
-
-
//get the direction vector of the mouse position
-
var ray:Number3D = camera.unproject(viewport.containerSprite.mouseX, viewport.containerSprite.mouseY);
-
-
//convert ray to a 3d point in the ray direction from the camera
-
ray = Number3D.add(ray, cameraPosition);
-
-
//find the intersection of the line defined by the camera and the ray position with the plane3D
-
var intersect:Number3D = _plane3d.getIntersectionLineNumbers(cameraPosition, ray);
-
-
//find distance to object and add to velocity
-
_vx += (_sphere.x-intersect.x)/1200;
-
_vy += (_sphere.y-intersect.y)/100;
-
_vz += (_sphere.z-intersect.z)/1200;
-
-
// update vel
-
_vx *= .98;
-
_vy *= .94;
-
_vz *= .98;
-
-
// move out plane to mouse coordinates
-
_plane.x -= (_plane.x - intersect.x)/4;
-
_plane.z -= (_plane.z - intersect.z)/4;
-
-
// apply vel
-
_sphere.x -= _vx;
-
_sphere.y -= _vy;
-
_sphere.z -= _vz;
-
-
// move shadow allong with sphere
-
_shadowPlane.x = _sphere.x;
-
_shadowPlane.z = _sphere.z;
-
-
// move light with ball
-
_light.x = _sphere.x;
-
_light.z = _sphere.z;
-
-
// the function written by Andy Zupko (blog.zupko.info), so usefull!
-
rollMe(_vx, _vy, _vz);
-
-
super.onRenderTick(event);
-
}
-
-
private function rollMe(vx:Number, vy:Number, vz:Number):void
-
{
-
// var pos:Number3D = new Number3D(_sphere.x, _sphere.y, _sphere.z);
-
var dif:Number3D = new Number3D(-vx, -vy, -vz);
-
var dist:Number = Math.sqrt(dif.x*dif.x+dif.z*dif.z);
-
-
//find the cross of the up axis with the direction vector
-
var rotAxis:Number3D = Number3D.cross(dif, new Number3D(0, 1, 0));
-
rotAxis.normalize();
-
-
//rotate around that axis by how long the direction vector is relative to the radius
-
var rotation:Quaternion = Quaternion.createFromAxisAngle(rotAxis.x, rotAxis.y, rotAxis.z, dist/_radius);
-
rotation.normalize();
-
-
_sphere.transform.calculateMultiply3×3(rotation.matrix, _sphere.transform);
-
}
-
}
-
}
The Eco Zoo, wins the S.O.T.Y
Posted on January 15, 2009
Filed Under Actionscript 3.0, General | Leave a Comment
The Eco Zoo. Totally agree with the judges in this case, the guy who made it created his own 3D enigne for it called Sharikura 3D (I hope he is still working on it to make it opensource). Check this site out ones more and do not forget to visit the maker (Masayuki Kido) of this awesome project! « go back — keep looking »

