Papervision 2.0 BorgEffects - Flash Version

Papervision 2.0 BorgEffects Flash Version

Yesterday I snagged Andy Zupko's super-amazing BorgEffects download which demos his new Effects branch for Papervision 2.0. It's very exciting stuff!

Since I'm not a big-time Flex user, I converted his borgEffects.as for use in the Flash IDE and decided to make it available for download. I thought it might be helpful to those struggling with Flex to Flash conversions.

Of course, I couldn't resist making a few changes by just messing around;

randomly changing the colorTransform settings onClick

using a different texture

changing the clippingPoint

etc...

To highlight the Flex to Flash diffs, I've commented my BorgEffects_flash.as like so:

  1. // the FLEX WAY
  2. //dae.load(XML(new shipAsset()), mats);
  3. // the FLASH WAY
  4. dae.load("cube.dae", mats);

To make it all hum, you'll need the latest build from the Papervision respository and be sure to point the BorgEffects_flash.fla Actionscript 3.0 Classpath to the class files in /branches/Effects/src.

Download the source files and have fun.

EDIT: I'm not sure exactly which revision of Great White this demo used, but since 2007 I'm sure a lot has changed. Proceed with caution!

29/12/2007 in Articles, Design, Flash, Notes




Comments

Bookmarks Tagged Flash said:

[...] bookmarks tagged flash Papervision 2.0 BorgEffects - Flash Version saved by 19 others     liesje07 bookmarked on 12/29/07 | [...]

December 29th, 2007 at 9:44 pm


Chris said:

thanks man !! thats it !! Flex sux

January 3rd, 2008 at 4:16 pm


brandon said:

I just downloaded Andy’s version today — couldn’t figure why it wouldn’t compile in Flash IDE (whoops its for Flex) — read through the comments and found your version, and it compiled right away in the Flash IDE with some nice interactive surprise… thanks!

January 4th, 2008 at 12:38 pm


Tadhg McCarthy said:

I downloaded your source files, and when I try to run them I get the following error:

TriangleMesh3D.as, Line 110 1023: Incompatible override.

Any thoughts?

Thanks for sharing!

January 9th, 2008 at 7:30 am


Tara said:

I don’t know if it’s just me but I wasn’t able to extract the files. I’m on a mac and it isn’t my program as I am able to extract other files. Could it be possible the file is corrupt? I downloaded it a second time, with the same result.

January 17th, 2008 at 11:35 am


Dave said:

That’s the first I’ve heard of a problem with the zip. No ideas on that one. Sorry!

January 17th, 2008 at 10:14 pm


t said:

Weird. I get a black screen and:
Papervision3D Public Alpha 2.0 - Great White (3.12.07)

PV3D 2.0a WARNING : DO NOT USE WITH BETA 9 PLAYERS. ONLY WITH OFFICIAL TO TEST.
CHECK YOUR VERSION!
DisplayObject3D: null
DisplayObject3D: null
init3d
DisplayObject3D: null
ReferenceError: Error #1069: Property addRenderLayer not found on org.papervision3d.view.Viewport3D and there is no default value.
at BorgEffectsflash/init3d()
at flash.display::DisplayObjectContainer/addChild()
at BorgEffects
flash/init()
at BorgEffectsflash$iinit()
DisplayObject3D: COLLADA
root
DisplayObject3D: Box01
DisplayObject3D: null

January 20th, 2008 at 4:26 am


Ozgur Uksal said:

Hi, I received the following error:

Location: TriangleMaterial.as
Description: 1020: Method marked override must override another method.
source: override public function drawTriangle(face3D:Triangle3D, graphics:Graphics, renderSessionData:RenderSessionData, altBitmap:BitmapData = null, altUV:Matrix=null):void
{
}

sincerely,
Ozgur

February 20th, 2008 at 6:23 am


Ozgur Uksal said:

I found the solution:
After you update papervision3D packages, you make sure that the class path points at branchesEffectssrc rather than as3trunksrc
Sincerely,
Ozgur Uksal

February 20th, 2008 at 6:32 am


Darryl said:

Thanks Ozgur,

I had the same problem. When I changed the class paths as you suggested, everything worked

April 10th, 2008 at 12:34 pm


zaheer said:

hi there if anyone can help PLEASE DO…
im using flash cs3 with paper vision 1.5 on mac, and have tried several times to use papervision, specifically the tutorial in computer arts however when i place the Papervision component i get an output message of:
DisplayObject3D: null
Papervision3D Beta 1.5 (23.07.07)
please help!!!
thanks

May 14th, 2008 at 12:38 pm


Sathya said:

Please help.
I am getting the same problem

Location: TriangleMaterial.as
Description: 1020: Method marked override must override another method.
source: override public function drawTriangle(face3D:Triangle3D, graphics:Graphics,

As suggested I downloaded latest version rev-357 of brances/effects directory and pointed by class path to this directory.
But I am still seeing this problem.
Could you please let me know which svn version you guys are using that seems to work.
Thanks
Sathya

sincerely,
Sathya

June 4th, 2008 at 3:21 pm


RJ Forbes said:

For those of you getting the TriangleMaterial error, I was receiving that before when i had the latest alpha in one directory and had flash loading it into the class path but the old , pv3d classes in a local path as well. Was fixed by removing one or the other out of the path.

July 7th, 2008 at 5:35 am


William said:

Hi there, I am using the latest build of GreatWhite and set the proper classpath in my publish settings in Flash CS3.

It throws 2 errors:

1046: Type was not found or was not a compile-time constant: BitmapEffectLayer. — public var bfx:BitmapEffectLayer;

1046: Type was not found or was not a compile-time constant: EffectLayer. — var fx:EffectLayer = new EffectLayer();

Is this flash version too old to work with the latest GreatWhite? If anyone can help me you would help me not go crazy with this struggle - I’m just totally lost.

August 17th, 2008 at 1:04 pm


William said:

As an addition to my comment : the files refer to directories that aren’t in the same places in the newest GreatWhite build.

org.papervision3d.core.layers.BitmapEffectLayer;
org.papervision3d.core.layers.EffectLayer;
org.papervision3d.core.layers.utils.RenderLayerManager;
org.papervision3d.core.layers.utils.RenderLayerSortMode;

There is no ‘layers’ folder. What’s the deal?

August 17th, 2008 at 1:13 pm


William said:

Ok so I’m gathering that GreatWhite somehow doesn’t use the RenderLayerManager, etc anymore. How should I approach converting this ‘older’ code demo to the newest version?

August 17th, 2008 at 1:20 pm


Leave a Comment