Posts Tagged ‘ Papervision 3D ’

 
Monday, October 6th, 2008

I’m digging into MMOs, now testing papervision2 cow model (unfortunately i’m not a modeler, but i’m a pretty good thief :) ) and put it on my testing stage…here’s the result…40 COWS! quite good uh? :)

cows! :D

Let me know how it runs on your machines ;)

Stay tuned :)

 
Friday, October 3rd, 2008

Here is my very first test on MMOs with Papervision3D on Flash Player 10 (needed to watch properly).

pv3d_isometric_01

here’s the link http://www.flashfuck.it/test/pv3d_isometry_01/

this is just the beginning…it has to be tuned and refined but, yes, it can be done ;)

PS: I stolen the model somewhere on the web…please if it is yours don’t offend yourself, i stole it because it’s good ;) (anyway let me know so i can put your name somewhere :) )

 
Thursday, July 3rd, 2008

It’s PaperKing time!!!  :D

A new contest has been lauched by pv3d guys. Just make an opensource “something” using Papervision3D framework and submit!

Deadline is 15th August…then a new PaperKing will sit on his 3D Throne :D

Get here for more information :D

stay tuned ;)

 
Thursday, June 26th, 2008

I just moved to my fresh new country  and started studing for my new job :)

I’m trying to get a usual “virtual world” scene (such as second life’s) using (possibly free and open) as3 3D frameworks, so my first choice has been papervision3D.

Unfortunately I’m not a 3D modeler so I had to get models from the web, anyway google sketchup warehouse is a very good resource to collect DAEs (but remember they may be not parsable by ascollada).
For the human model I’ve just “stolen” a walking girl from 3Dflasho.
…and here‘s what I got combining the 2 models: a girl walking in a stadium. (girl is automatically walking forward, just use left and right arrows to make her turn)

pv3dstadium.jpg

(note: textures are about 7 mb and the whole swf is very cpu intensive) 

Take a look to the profiler, you can notice that framerate is very low even on a very good machine (i had a value range from 12 to 18 with everything loaded and 26\28 for the girl only on a macbookpro 2.4ghz and flash player 9.0.124 debug).

Next steps for me are:

1) try the same models on Away3D and maybe on Alternativa

2) search for better models (expecially for the stadium which generates too many culling issues on the ground)

3) have a mana potion

I hope to get good news from papervision and away3d mailing lists about flash 10 implementations, expecially about both engines’ drawing speed..in the while I’m going on with my tests :D

Here’s two big interviews. Guys from “Papervision Daily” and “Dreaming in Flash” (be sure to have both links among your bookmarks :) ) had the good idea to take an interview from Ralph Hauwert (from Papervision3D core team) and Rob Bateman (from Away3D core team).
Both interviews are about what’s next to new Astro features and what kind of benefits is PixelBender (AIF) giving to their engines.

I highly suggest to take a look to those interviews, just to be aware of what’s going on :)

here’s the links:

..and here’s the little summary:

  1. Features such as native 3D APIs won’t affect both engines because they’re based on drawing triangles (skewing)
  2. Otherwise, new drawing APIs will strongly improve both engines performances, vectors of drawTriangle instruction will replace arrays of very long drawing instructions
  3. PixelBender will enhace shaders’ performances, Ralph talks about 10 times faster… Both are quite sure this technology will be used on shaders.
  4. Both are assuming it would be great (but not a priority) to implement vector render (as Five3D already does)

stay tuned,

byez

 
Sunday, June 1st, 2008

June is starting from two big hot news for flash 3D fans and devs:

ist2_5320460_calendar_june.jpg

  1. Papervision team merged Great White and Effects branches, now effects are considered “stable” (as a beta can be :) ) and they’ve been included in the project core. There’s a plenty of synthax and logic changes but the result is pretty awesome, so update your working copy from great white svn and visit Zupko’s blog to keep you up to date. Note for devs: From now on “effects” branch on svn is to be considered deprecated.
  2. Alternativa Platform is ready to try!!!!! From Russia with love, this cutting edge 3D project finally is available for download and test. The major interest for me is to try out a 3d engine already cooked for flash player 10. Anyway keep calm your blood, whilst Alternativa is a really kickin ass project it’s not free nor open, so if you’re already planning to build up something that will be commercial you have to send some roubles there in Russia :D

…no doubts about this is a good way to begin summer time :D

 
Sunday, April 27th, 2008

Finally they did it!:D

Carlos & co put online dev.papervision3d.org , ie: what every wannabe pv3d developer was waiting for :)

This new blog section is to be intended as a melting pot of pv3d tutorials\working projects and job offers.
stay tuned!:D

 
Sunday, April 13th, 2008

Hi there!
It’s sunday…wonderful day to publish some 360 pic on flickr. Go take a look at those photos, here two links of my album and my friend luca’s too.

flickr_pigiuz.png

flickr_luca.png

Got pics? Send me the link so we can build up one big album! :D

 
Thursday, April 10th, 2008

Directly from paperworld blog this working demo (up to 10 users per room) presented at FITC Toronto!

So…have a nice trip on your spaceship! :D

 
Sunday, April 6th, 2008

Domani inizia la prima 360 Conference europea, l’eccitazione è alle stelle…Stasera ci sarà il ricevimento degli speakers in quel di Milano, finalmente stringerò la mano a Tom e John…e da domani YEAH, 3 giornate ricche di sessions!Ricordo che la prima giornata (domani, lunedì 7) è GRATUITA, mentre la sera ci sarà un “evento nell’evento” aperto a tutti organizzato da Actionscript.it in cui si discuteranno i temi caldi della giornata :)
Vi lascio con questo esempio in papervision e vi aspetto alla mia session martedì :D

Questo il codice sorgente:

package{
	import flash.display.BlendMode;
	import flash.display.Sprite;
	import flash.events.AsyncErrorEvent;
	import flash.events.Event;
	import flash.events.NetStatusEvent;
	import flash.events.SecurityErrorEvent;
	import flash.geom.ColorTransform;
	import flash.media.Video;
	import flash.net.NetConnection;
	import flash.net.NetStream;
	import org.papervision3d.cameras.Camera3D;
	import org.papervision3d.core.effects.BitmapFireEffect;
	import org.papervision3d.core.effects.utils.BitmapDrawCommand;
	import org.papervision3d.core.geom.renderables.Vertex3D;
	import org.papervision3d.core.layers.BitmapEffectLayer;
	import org.papervision3d.materials.BitmapMaterial;
	import org.papervision3d.materials.VideoStreamMaterial;
	import org.papervision3d.objects.primitives.Plane;
	import org.papervision3d.render.BasicRenderEngine;
	import org.papervision3d.scenes.Scene3D;
	import org.papervision3d.view.Viewport3D;
	[SWF(width="400",height="400",frameRate="24",backgroundColor="0x111111")]
	public class Flag3D extends Sprite	{
		[Embed (source="assets/360.png")] private var FlagAsset:Class;
		private var _scene:Scene3D;
		private var _cam:Camera3D;
		private var _view:Viewport3D;
		private var _render:BasicRenderEngine;
		private var _bfx:BitmapEffectLayer;
		private var _p:Plane;
		private var _bgp:Plane;
		private var _sine:Number=0;
		private var _srcs:Array = [
		//"http://www.youtube.com/get_video?video_id=Qk1qSpM63u4&t=OEgsToPDskIHja8NsMXSksfwHJKkwY2t",
		"http://www.flashfuck.it/360/get_video.flv"
		];
		private var _conn:NetConnection;
		private var _video:Video;
		private var _stream:NetStream;

		public function Flag3D()
		{
			super();
			stage.scaleMode = "noScale";
			stage.align = "TL";
			initVideo();
			init3D();
		}

		private function initVideo():void
		{
			_video = new Video(320,240);
			connection();
			trace("init video")
		}

		private function init3D():void
		{
			trace("init 3d")
			_view = new Viewport3D(0,0,true,true,true,true);
			_view.addEventListener(Event.ADDED_TO_STAGE,onViewPortReady);
			_cam = new Camera3D();
			_cam.focus=100;
			_cam.zoom=11;
			_cam.z=-1000;
			_scene = new Scene3D();
			_render = new BasicRenderEngine();
			addChild(_view);
		}

		private function onViewPortReady(e:Event):void
		{
			addElements();
			setupEffects();
		}

		private function setupEffects():void
		{
			_bfx = new BitmapEffectLayer(_view.width,_view.height);
			_bfx.addEffect( new BitmapFireEffect(1,1,1,1) );
			_bfx.drawCommand = new BitmapDrawCommand(null,new ColorTransform(1,1,1,1),BlendMode.HARDLIGHT,true);
			_bfx.drawLayer.blendMode = BlendMode.OVERLAY;
			_view.addRenderLayer(_bfx);
			_p.material.renderLayer = _bfx;
		}

		private function addElements():void
		{
			trace("add plane");
			_p = createFlag();
			_scene.addChild(_p);
			_bgp = createBG();
			_scene.addChild(_bgp);
			startRendering();
		}

		public function startRendering():void
		{
			this.addEventListener(Event.ENTER_FRAME,render);
		}

		public function stopRendering():void
		{
			this.removeEventListener(Event.ENTER_FRAME,render);
		}

		private function createFlag():Plane
		{
			trace("plane");
			var p:Plane = new Plane(createBitmapMaterial(),200,200,5,5);
			return p;
		}

		private function createBG():Plane
		{
			trace("plane");
			var p:Plane = new Plane(createVideoMaterial(),3200,2400,5,5);
			p.z = 1800;
			return p;
		}

		private function createBitmapMaterial():BitmapMaterial
		{
			var m:BitmapMaterial = new BitmapMaterial(new FlagAsset().bitmapData);
			m.doubleSided=true;
			m.smooth=true;
			return m;
		}

		private function createVideoMaterial():VideoStreamMaterial
		{
			var m:VideoStreamMaterial = new VideoStreamMaterial(_video,_stream);
			m.smooth=true;
			m.doubleSided=true;
			return m;
		}

		private function render(e:Event=null):void
		{
			_cam.hover(1,_view.containerSprite.mouseX/400,_view.containerSprite.mouseY/400);
			_p.yaw(.2);
			_render.renderScene(_scene,_cam,_view);
			_sine++;
			tweenPlaneMesh();
		}

		private function tweenPlaneMesh():void
		{
			var _deltaZ:Number= 30;
			var count:int=0;
			//plane waving:)
			for each(var v:Vertex3D in _p.geometry.vertices){
				var _vz:Number = Math.sin((count+_sine)/10)*_deltaZ;
				v.z = _vz;
				count++;
			}
		}
		private function connection():void
		{
			_conn = new NetConnection();
			_conn.addEventListener(NetStatusEvent.NET_STATUS,netHandler);
			_conn.addEventListener(SecurityErrorEvent.SECURITY_ERROR,crossdomainHandler);
			_conn.connect(null);
		}
		private function netHandler(e:NetStatusEvent):void
		{
			switch(e.info.code){
			case "NetConnection.Connect.Success":
                    startVideo();
                break;
                case "NetStream.Play.StreamNotFound":
                    trace("404!");
           		break;
			}
		}

		private function crossdomainHandler(e:SecurityErrorEvent):void
		{
			trace("security error: "+e);
		}

		private function startVideo():void
		{
			_stream = createStream();
			_video.attachNetStream(_stream);
			_stream.play(_srcs[0]);
		}

		private function createStream():NetStream
		{
			var stream:NetStream = new NetStream(_conn);
			stream.addEventListener(AsyncErrorEvent.ASYNC_ERROR,manageAsync);
			stream.addEventListener(NetStatusEvent.NET_STATUS,netHandler);
			return stream;
		}

		private function manageAsync(e:AsyncErrorEvent):void
		{
			//nada de nada :D
		}
	}
}

Download Source