Thomas Joos | mobile application developer

(re)create your thoughts and expand your limits.

Archive for the ‘3D’ Category

Is PapervisionX mobile minded?

with 2 comments

Yesterday I came across this very interesting article: PapervisionX : what it is and what it is not. In this article the guys from the Papervision crew explain what this new version is and why they are building it:

What?

PapervisionX is the next version of Papervision3D built from the ground up based on Flash10’s new 3D api.  Ralph and Tim are leading the initial efforts on the core of the engine at the time of this writing (3.16.2009).

Why?

Flash 10 added a set of native 3D features to the 3D engine. To optimally use them, PapervisionX will be a rearchitectured (from the ground up) version of Papervision3D. This way we can retain the API as much as possible, while taking full advantage of the 3D features of Flash Player 10

The first thing that popped up in my head was: ” As they are focussing on fp10, does this mean the PapervisionX engine will be mobile optimized as well? Is it time for a Flash Mobile developer to start dreaming of smooth 3D transitions, with fp10 coming to a set of powerful devices?

Advertisements

Written by vilebody

March 17, 2009 at 11:08 am

Papervision 2.0: Cube Tutorial

with 3 comments

Lee Brimelow has uploaded a new tutorial to gotoAndLearn() that shows you how to use Papervision3D 2.0 to create an interactive cube with different textures on each part of the cube. This example is using the GreatWhite branch of Papervision3D. We all know pv3d has changed the way people and developers experience the interactive web! Take a quick look if you are interested because it really kicks some serious ass.

And if you want to take ik to the next level… the guys from Boulevart also released a cool pv3d cube tutorial. It explains how you can rotate a cube using a registration or pivot point. Definately worth checking I guess!

Written by vilebody

March 24, 2008 at 3:33 pm

Posted in 3D, as3, Papervision

3D: Papervision: Plane Events

with 34 comments

We all have heard of pv3D: Papervision 3D. I have been playing with this stunning api for a while and I have noticed some problems when you want to go just a bit further than a quick demo. When you are making a project using pvd3D you obviously would like to use your plane object and make it clickable for example. Those who have been playing with papervision know that it is not possible to add an event listener directly to your plane.

There is a great tutorial on rockonflash which guides you through this proces using an interactiveSceneManager. Basically this manager handles an OBJECT_CLICK event and makes it possible to see which object (for example a plane ) has been clicked on. But there are some things that bother me. You can’t add a buttonMode to your plane so users do not see their mouse change to notify them that an object is clickable. It also is not possible to add some animation onto you pv3D object when using a MOUSE_OVER event for example.

But here you can download a fla that shows you a way to implement plane events in your project and handles these problems like buttonMode and for example an alpha change on a mouse over. Let’s get a quick view at the code:

First of all we configure our scene, import our pv3D classes etc.. we are going to make 50 icons so a nice icon is used for a bitmapassetmaterial. (yeah that’s right, it’s mike chambers! )

import org.papervision3d.scenes.*;
import org.papervision3d.cameras.*;
import org.papervision3d.objects.*;
import org.papervision3d.materials.*;
import caurina.transitions.Tweener;
//container
var container:Sprite=new Sprite();
container.x=stage.stageWidth*0.5;
container.y=stage.stageHeight*0.5;
addChild(container);
//een 3D scene maken
var scene:Scene3D=new MovieScene3D(container);
//camera aanmaken
var camera:Camera3D=new Camera3D();
//initial zoomin eigenlijk, default better view, achteraf makkelijk adjusten
//camera.zoom=5;
camera.zoom=4;
//bitmap asset material BAM
var bam:BitmapAssetMaterial = new BitmapAssetMaterial("Mike");
//show both sides, default one side
bam.oneSide=false;
//smooth true=> smoothing
bam.smooth=true;

So far so good, nothing special really. But here comes the new part, we are going to use a dictionary, this is something like an array but instead of using integers to reference as an index to our stored plane objects; we are going to use sprites. Because we are using a MovieScene3D, every 3D object we create, has an sprite property, you could say it is the object’s bounding box.

we make an instance of a dictionary and we use the sprite propertie of the plane to store our plane into the dictionary
//dictionary
var myPlaneDictionary:Dictionary=new Dictionary();
var p:Plane=new Plane(bam,128,128,2,2);
//HERE IT COMES!
var myPlaneContainer:Sprite = p.container;//we use the container sprite propertie of the plane
myPlaneDictionary[myPlaneContainer]=p;//here we have container as key and plane as value

Now we have stored our plane into a dictionary by using it’s sprite container, but now comes the cool part, we are going to use this container to add event listeners, and then we can use our dictionary to know which plane we need. We can configure this container’s buttonMode to true, so the users see their mouse change and know they can click on the object. We also use this container’s alpha property to have a plane alpha change when we have a mouseover.

myPlaneContainer.buttonMode = true;//we configure a button mode
//events koppelen aan plane container
myPlaneContainer.addEventListener( MouseEvent.ROLL_OVER, doRollOver );
myPlaneContainer.addEventListener( MouseEvent.CLICK, clicker );
myPlaneContainer.addEventListener( MouseEvent.ROLL_OUT, doRollOut );
//event functies
function doRollOver(evt:MouseEvent) {
var sprit:Sprite=evt.target as Sprite;
sprit.alpha = 0.5;
//we use the container sprite to do an alpha change

To check our performance we write a for loop that creates 50 of these objects with a listener, and it seems to run quite smoothly so lack of performance should not be an issue when trying to implement Plane Events ( or other pv3D objects ) like this.

Check it out and let me know what you think!

Written by vilebody

November 29, 2007 at 12:59 pm

Posted in 3D

3D: Room3D

with 4 comments

This video shows a project I made last week for my 3DCourse. We had to model a room and it had to be presented in a video. I went for a modern design office and here’s the result! Turn on your speakers for maximum entertainment :) Hope you like it. Please feel free to give you honest opinion. I’m sorry for the bad ass quality but in order to slow down the rendering proces, the quality of the movie is not that good. I’d even say its quite bad actually but even though I think it gives you a quick overview of the Room. Enjoy!

Written by vilebody

November 23, 2007 at 2:55 pm

Posted in 3D