ESPYS.tv done with PV3D

16 messages Options
Embed this post
Permalink
Juan Charvet

ESPYS.tv done with PV3D

Reply Threaded More More options
Print post
Permalink
Some javascript/style in this post has been disabled (why?)
Vote on this past year’s best sports moments and see some behind the scenes content with Samuel L. Jackson at the upcoming ESPY awards show.

http://www.espys.tv/

It’s my first full site build utilizing the PV3D framework, so I’ll appreciate any criticism, no matter how harsh!

Key challenges
Creating an interesting way to deliver content in both English and Spanish, bound to a 1024x768 resolution with advertising space in mind.
Site was directed, designed and developed within a four week window.

Key benefits
I got to work with Samuel Jackson!

And many apologies in advance for the advertising that lies below the site.

**

Juan Charvet
VML | Lead Developer, Rich Media
jcharvet@...

_______________________________________________
Papervision3D mailing list
[hidden email]
http://osflash.org/mailman/listinfo/papervision3d_osflash.org
Merrill, Jason

Re: ESPYS.tv done with PV3D

Reply Threaded More More options
Print post
Permalink
Some javascript/style in this post has been disabled (why?)

Awesome work, I love it!  You were able to map alpha-channel video to 3D space?  Very nice – hadn’t seen that done before (personally I mean, I’m guessing its’ been done before with alpha channel video) – any clues on how you managed that?

 

 

Jason Merrill

Bank of  America smallLogo  Global Learning

Shared Services Solutions Development


Monthly meetings on the Adobe Flash platform for rich media experiences - join the Bank of America Flash Platform Community

 

 



_______________________________________________
Papervision3D mailing list
[hidden email]
http://osflash.org/mailman/listinfo/papervision3d_osflash.org
Patrick Matte-2

Re: ESPYS.tv done with PV3D

Reply Threaded More More options
Print post
Permalink
In reply to this post by Juan Charvet
Some javascript/style in this post has been disabled (why?)
Re: [Papervision3D] ESPYS.tv done with PV3D Nice. The only problem I found is with the movement of the camera tied to the mouse movement. The moving zone on the x axis is very very small, like 50 pixels from each side of the center, past that, the mouse has no effect on the camera, that’s a little strange, it causes the camera to shift from left to right really fast when you move your mouse on screen.

As for the rotation on the y axis, it’s just messed up. Just try slowly moving you mouse up and down, and the camera will do very weird things.



From: Juan Charvet <[hidden email]>
Reply-To: <[hidden email]>
Date: Tue, 30 Jun 2009 14:01:01 -0400
To: <[hidden email]>
Subject: [Papervision3D] ESPYS.tv done with PV3D

Vote on this past year’s best sports moments and see some behind the scenes content with Samuel L. Jackson at the upcoming ESPY awards show.

http://www.espys.tv/

It’s my first full site build utilizing the PV3D framework, so I’ll appreciate any criticism, no matter how harsh!

Key challenges
Creating an interesting way to deliver content in both English and Spanish, bound to a 1024x768 resolution with advertising space in mind.
Site was directed, designed and developed within a four week window.

Key benefits
I got to work with Samuel Jackson!

And many apologies in advance for the advertising that lies below the site.

**

Juan Charvet
VML | Lead Developer, Rich Media
[hidden email]

_______________________________________________
Papervision3D mailing list
[hidden email]
http://osflash.org/mailman/listinfo/papervision3d_osflash.org
This e-mail is intended only for the named person or entity to which it is addressed and contains valuable 
business information that is proprietary, privileged, confidential and/or otherwise protected from disclosure.

If you received this e-mail in error, any review, use, dissemination, distribution or copying of this e-mail 
is strictly prohibited. Please notify us immediately of the error via e-mail to [hidden email] and 
please delete the e-mail from your system, retaining no copies in any media. We appreciate your cooperation.


_______________________________________________
Papervision3D mailing list
[hidden email]
http://osflash.org/mailman/listinfo/papervision3d_osflash.org
Juan Charvet

Re: ESPYS.tv done with PV3D

Reply Threaded More More options
Print post
Permalink
In reply to this post by Merrill, Jason
Some javascript/style in this post has been disabled (why?)
Mapping video in 3D space is doable by using the VideoStreamMaterial in PV3D. I think the bigger challenge was really being able to switch the material from the placeholder image to the video based on the activation of the section and the NetStream buffering events dispatched by the video. Feel free to inquire should you have more in-depth questions about the issue.

On Jun 30, 2009, at 2:28 PM, Merrill, Jason wrote:

Awesome work, I love it!  You were able to map alpha-channel video to 3D space?  Very nice – hadn’t seen that done before (personally I mean, I’m guessing its’ been done before with alpha channel video) – any clues on how you managed that?
 
 
Jason Merrill 

Bank of  America <image001.jpg>  Global Learning
Shared Services Solutions Development

Monthly meetings on the Adobe Flash platform for rich media experiences - join the Bank of America Flash Platform Community
 
 
_______________________________________________
Papervision3D mailing list
[hidden email]
http://osflash.org/mailman/listinfo/papervision3d_osflash.org

**

Juan Charvet
914.282.0965

57 E. 97th Street Apt 5   |   New York NY 10029






_______________________________________________
Papervision3D mailing list
[hidden email]
http://osflash.org/mailman/listinfo/papervision3d_osflash.org
Juan Charvet

Re: ESPYS.tv done with PV3D

Reply Threaded More More options
Print post
Permalink
In reply to this post by Patrick Matte-2
Some javascript/style in this post has been disabled (why?)
You're absolutely right about that - I would say that it's completely messed up, though. The camera does shift based on mouse movement, and the level of rotation is very minimal. I decided to do it this way to give it just enough amount of depth without fully distorting the content that was active at any time. Many changes were made in the design in order to adhere to the interactivity/functionality of the site. I think one of the biggest challenges of the camera movement was that we wanted to be able to traverse through the thumbnails in a way where we could position the "prev" and "next" buttons to be both close to the images and have the mouse rotate the interface enough so that the image(s) would tween in Z axis, but not necessarily look like it was going right towards the user. Adjusting the sensitivity of the screen may have affected the overall rotation in a negative way, but it definitely enhanced it for other interactions. In some situations, our client requested to slow down/lock rotation when rolling over certain UI elements such as scrollbars or buttons, or locking the movie to face 2D when playing a video. Nonetheless, I do agree, that it could probably use a bit more tweaking.

As for moving the mouse up and down, I'm now seeing the little glitch you're talking about. I'll definitely have a look into that - looks like the centerpoint is getting confused at times.

On Jun 30, 2009, at 2:52 PM, Patrick Matte wrote:

Nice. The only problem I found is with the movement of the camera tied to the mouse movement. The moving zone on the x axis is very very small, like 50 pixels from each side of the center, past that, the mouse has no effect on the camera, that’s a little strange, it causes the camera to shift from left to right really fast when you move your mouse on screen.

As for the rotation on the y axis, it’s just messed up. Just try slowly moving you mouse up and down, and the camera will do very weird things.



From: Juan Charvet <[hidden email]>
Reply-To: <[hidden email]>
Date: Tue, 30 Jun 2009 14:01:01 -0400
To: <[hidden email]>
Subject: [Papervision3D] ESPYS.tv done with PV3D

Vote on this past year’s best sports moments and see some behind the scenes content with Samuel L. Jackson at the upcoming ESPY awards show.

http://www.espys.tv/

It’s my first full site build utilizing the PV3D framework, so I’ll appreciate any criticism, no matter how harsh!

Key challenges
Creating an interesting way to deliver content in both English and Spanish, bound to a 1024x768 resolution with advertising space in mind.
Site was directed, designed and developed within a four week window.

Key benefits
I got to work with Samuel Jackson!

And many apologies in advance for the advertising that lies below the site.

**

Juan Charvet
VML | Lead Developer, Rich Media
[hidden email]

_______________________________________________
Papervision3D mailing list
[hidden email]
http://osflash.org/mailman/listinfo/papervision3d_osflash.org
This e-mail is intended only for the named person or entity to which it is addressed and contains valuable 
business information that is proprietary, privileged, confidential and/or otherwise protected from disclosure.

If you received this e-mail in error, any review, use, dissemination, distribution or copying of this e-mail 
is strictly prohibited. Please notify us immediately of the error via e-mail to [hidden email] and 
please delete the e-mail from your system, retaining no copies in any media. We appreciate your cooperation.

_______________________________________________
Papervision3D mailing list
[hidden email]
http://osflash.org/mailman/listinfo/papervision3d_osflash.org


_______________________________________________
Papervision3D mailing list
[hidden email]
http://osflash.org/mailman/listinfo/papervision3d_osflash.org
Merrill, Jason

Simple Cube w/Texture

Reply Threaded More More options
Print post
Permalink
Some javascript/style in this post has been disabled (why?)

Hey all,

 

I’m new developing with Papervision3d (though not new to Flash/Flex/Actionscript) and have a really basic problem. I was able to display my first code-generated plane and rotate it, and also load a model collada file built with Swift3d.  Now I am trying to create a box with texture, but having problems.  Here is the relevant part of my code:

 

(CubeTexture is a bitmap in Flash CS3 with linkage exported as class: CubeTexture and base class: flash.display.BitmapData)

 

var bitmap:Bitmap = new Bitmap(new CubeTexture(0,0));

material = new MaterialObject3D();

material.bitmap = bitmap.bitmapData;

 

materials = new MaterialsList();

materials.addMaterial(material);

 

primitive = new Cube(materials, 200, 200, 200);

scene.addChild(primitive);

 

I get this error:

 

“WARNING: Required material not found in given materials list. Supported materials are: front, back, right, left, top, bottom & all.”

 

Any ideas what I’m doing wrong?  Thanks.

 

 

Jason Merrill

Bank of  America smallLogo  Global Learning

Shared Services Solutions Development


Monthly meetings on the Adobe Flash platform for rich media experiences - join the Bank of America Flash Platform Community

 



_______________________________________________
Papervision3D mailing list
[hidden email]
http://osflash.org/mailman/listinfo/papervision3d_osflash.org
Maggical

Re: Simple Cube w/Texture

Reply Threaded More More options
Print post
Permalink
Try this out instead, it seems that you are using a cube and aren't loading the material list correctly.

            wireframeMaterial = new WireframeMaterial(0x333333);
            wireframeMaterial.doubleSided = true;
            ///
            //BitmapFileMaterial, doubleSided draws the color on both sides of the geometry normals
            bitmapFileMaterial = new BitmapFileMaterial("AJ.png");
            bitmapFileMaterial.doubleSided = true;
            ///
            var materialsList:MaterialsList = new MaterialsList();
            materialsList.addMaterial(wireframeMaterial, "front");
            materialsList.addMaterial(wireframeMaterial, "back");
            materialsList.addMaterial(bitmapFileMaterial, "left");
            materialsList.addMaterial(wireframeMaterial, "right");
            materialsList.addMaterial(wireframeMaterial, "top");
            materialsList.addMaterial(wireframeMaterial, "bottom");
            ///
            //cube = new Cube(MaterialList applied to object, width, depth, height, wSegments, dSegments, hSegments);
            cube = new Cube(materialsList, 200, 200, 200, 3, 3, 3);
            scene.addChild(cube);


That's a quick example that loads a bitmap on a side of the cube, and renders a wireframe material on the other sides...

Hope it helps =)

Javier

On Tue, Jun 30, 2009 at 4:48 PM, Merrill, Jason <[hidden email]> wrote:

Hey all,

 

I’m new developing with Papervision3d (though not new to Flash/Flex/Actionscript) and have a really basic problem. I was able to display my first code-generated plane and rotate it, and also load a model collada file built with Swift3d.  Now I am trying to create a box with texture, but having problems.  Here is the relevant part of my code:

 

(CubeTexture is a bitmap in Flash CS3 with linkage exported as class: CubeTexture and base class: flash.display.BitmapData)

 

var bitmap:Bitmap = new Bitmap(new CubeTexture(0,0));

material = new MaterialObject3D();

material.bitmap = bitmap.bitmapData;

 

materials = new MaterialsList();

materials.addMaterial(material);

 

primitive = new Cube(materials, 200, 200, 200);

scene.addChild(primitive);

 

I get this error:

 

“WARNING: Required material not found in given materials list. Supported materials are: front, back, right, left, top, bottom & all.”

 

Any ideas what I’m doing wrong?  Thanks.

 

 

Jason Merrill

Bank of  America smallLogo  Global Learning

Shared Services Solutions Development


Monthly meetings on the Adobe Flash platform for rich media experiences - join the Bank of America Flash Platform Community

 


_______________________________________________
Papervision3D mailing list
[hidden email]
http://osflash.org/mailman/listinfo/papervision3d_osflash.org



_______________________________________________
Papervision3D mailing list
[hidden email]
http://osflash.org/mailman/listinfo/papervision3d_osflash.org
Merrill, Jason

Re: Simple Cube w/Texture

Reply Threaded More More options
Print post
Permalink
Some javascript/style in this post has been disabled (why?)

Thanks Javier – that explains a lot more.  However, I tried your code out, and while I didn’t get any errors, I didn’t see any cube either (whereas I did when I made an added a simple plane in the same file).  The .jpg (my file is city.jpg, and I changed that in your code) is in the same folder location as the host HTML and .swf.  I get this message:

 

“INFO: BitmapFileMaterial: Loading bitmap from city.jpg”

 

Here is all my code (a few things are irrelevant since I was messing around with some other things):

 

package

{

            import flash.display.Bitmap;

            import flash.display.BitmapData;

            import flash.display.Sprite;

            import flash.events.Event;

            import flash.events.MouseEvent;

            import org.papervision3d.core.proto.MaterialObject3D;

            import org.papervision3d.materials.BitmapFileMaterial;

            import org.papervision3d.materials.BitmapMaterial;

            import org.papervision3d.materials.utils.MaterialsList;

            import org.papervision3d.materials.WireframeMaterial;

            import org.papervision3d.objects.primitives.Cube;

            import org.papervision3d.view.Viewport3D;

            import org.papervision3d.scenes.Scene3D;

            import org.papervision3d.cameras.Camera3D;

            import org.papervision3d.materials.ColorMaterial;

            import org.papervision3d.render.BasicRenderEngine;

 

            public class MyPV3DTest extends Sprite

            {

                       

                        private var viewport: Viewport3D;

                        private var scene: Scene3D;

                        private var camera: Camera3D;

                        private var material:MaterialObject3D;

                        private var materials:MaterialsList;

                        private var primitive:Cube

                        private var renderer: BasicRenderEngine;

                       

                        public function MyPV3DTest ():void

                        {

                                    //viewport = new Viewport3D(w, h, scaleToStage, interactive);

                                    viewport = new Viewport3D(550, 400, false, true);

                                    addChild(viewport);

 

                                    //instantiates a Scene3D instance

                                    scene = new Scene3D();

 

                                    //instantiates a Camera3D instance

                                    camera = new Camera3D();

 

                                    //renderer draws the scene to the stage

                                    renderer = new BasicRenderEngine();

 

                                    var wireframeMaterial:WireframeMaterial = new WireframeMaterial(0x333333);

                                    wireframeMaterial.doubleSided = true;

 

                                    var bitmapFileMaterial:BitmapFileMaterial = new BitmapFileMaterial("city.jpg");

                                    bitmapFileMaterial.doubleSided = true;

           

                                     var materialsList:MaterialsList = new MaterialsList();

                                     materialsList.addMaterial(wireframeMaterial, "front");

                                     materialsList.addMaterial(wireframeMaterial, "back");

                                     materialsList.addMaterial(bitmapFileMaterial, "left");

                                     materialsList.addMaterial(wireframeMaterial, "right");

                                     materialsList.addMaterial(wireframeMaterial, "top");

                                     materialsList.addMaterial(wireframeMaterial, "bottom");

 

                                     var cube:Cube = new Cube(materialsList, 200, 200, 200, 3, 3, 3);

                                    scene.addChild(cube);

                        }

            }

}

 

 

 

 

Jason Merrill

Bank of  America smallLogo  Global Learning

Shared Services Solutions Development


Monthly meetings on the Adobe Flash platform for rich media experiences - join the Bank of America Flash Platform Community

 

 

 

 

From: [hidden email] [mailto:[hidden email]] On Behalf Of Javier España | javierespana.com
Sent: Tuesday, June 30, 2009 4:13 PM
To: [hidden email]
Subject: Re: [Papervision3D] Simple Cube w/Texture

 

Try this out instead, it seems that you are using a cube and aren't loading the material list correctly.

            wireframeMaterial = new WireframeMaterial(0x333333);
            wireframeMaterial.doubleSided = true;
            ///
            //BitmapFileMaterial, doubleSided draws the color on both sides of the geometry normals
            bitmapFileMaterial = new BitmapFileMaterial("AJ.png");
            bitmapFileMaterial.doubleSided = true;
            ///
            var materialsList:MaterialsList = new MaterialsList();
            materialsList.addMaterial(wireframeMaterial, "front");
            materialsList.addMaterial(wireframeMaterial, "back");
            materialsList.addMaterial(bitmapFileMaterial, "left");
            materialsList.addMaterial(wireframeMaterial, "right");
            materialsList.addMaterial(wireframeMaterial, "top");
            materialsList.addMaterial(wireframeMaterial, "bottom");
            ///
            //cube = new Cube(MaterialList applied to object, width, depth, height, wSegments, dSegments, hSegments);
            cube = new Cube(materialsList, 200, 200, 200, 3, 3, 3);
            scene.addChild(cube);


That's a quick example that loads a bitmap on a side of the cube, and renders a wireframe material on the other sides...

Hope it helps =)

Javier

On Tue, Jun 30, 2009 at 4:48 PM, Merrill, Jason <[hidden email]> wrote:

Hey all,

 

I’m new developing with Papervision3d (though not new to Flash/Flex/Actionscript) and have a really basic problem. I was able to display my first code-generated plane and rotate it, and also load a model collada file built with Swift3d.  Now I am trying to create a box with texture, but having problems.  Here is the relevant part of my code:

 

(CubeTexture is a bitmap in Flash CS3 with linkage exported as class: CubeTexture and base class: flash.display.BitmapData)

 

var bitmap:Bitmap = new Bitmap(new CubeTexture(0,0));

material = new MaterialObject3D();

material.bitmap = bitmap.bitmapData;

 

materials = new MaterialsList();

materials.addMaterial(material);

 

primitive = new Cube(materials, 200, 200, 200);

scene.addChild(primitive);

 

I get this error:

 

“WARNING: Required material not found in given materials list. Supported materials are: front, back, right, left, top, bottom & all.”

 

Any ideas what I’m doing wrong?  Thanks.

 

 

Jason Merrill

Bank of  America Error! Filename not specified.  Global Learning

Shared Services Solutions Development


Monthly meetings on the Adobe Flash platform for rich media experiences - join the Bank of America Flash Platform Community

 


_______________________________________________
Papervision3D mailing list
[hidden email]
http://osflash.org/mailman/listinfo/papervision3d_osflash.org

 



_______________________________________________
Papervision3D mailing list
[hidden email]
http://osflash.org/mailman/listinfo/papervision3d_osflash.org
mlecho

Re: Simple Cube w/Texture

Reply Threaded More More options
Print post
Permalink
In reply to this post by Merrill, Jason
Some javascript/style in this post has been disabled (why?)
i assume it's there, but just to make sure, there is an onenterframe in your code to render the scene?

[Sent from mobile...]

On Jun 30, 2009, at 1:35 PM, "Merrill, Jason" <[hidden email]> wrote:

Thanks Javier – that explains a lot more.  However, I tried your code out, and while I didn’t get any errors, I didn’t see any cube either (whereas I did when I made an added a simple plane in the same file).  The .jpg (my file is city.jpg, and I changed that in your code) is in the same folder location as the host HTML and .swf.  I get this message:

 

“INFO: BitmapFileMaterial: Loading bitmap from city.jpg”

 

Here is all my code (a few things are irrelevant since I was messing around with some other things):

 

package

{

            import flash.display.Bitmap;

            import flash.display.BitmapData;

            import flash.display.Sprite;

            import flash.events.Event;

            import flash.events.MouseEvent;

            import org.papervision3d.core.proto.MaterialObject3D;

            import org.papervision3d.materials.BitmapFileMaterial;

            import org.papervision3d.materials.BitmapMaterial;

            import org.papervision3d.materials.utils.MaterialsList;

            import org.papervision3d.materials.WireframeMaterial;

            import org.papervision3d.objects.primitives.Cube;

            import org.papervision3d.view.Viewport3D;

            import org.papervision3d.scenes.Scene3D;

            import org.papervision3d.cameras.Camera3D;

            import org.papervision3d.materials.ColorMaterial;

            import org.papervision3d.render.BasicRenderEngine;

 

            public class MyPV3DTest extends Sprite

            {

                       

                        private var viewport: Viewport3D;

                        private var scene: Scene3D;

                        private var camera: Camera3D;

                        private var material:MaterialObject3D;

                        private var materials:MaterialsList;

                        private var primitive:Cube

                        private var renderer: BasicRenderEngine;

                       

                        public function MyPV3DTest ():void

                        {

                                    //viewport = new Viewport3D(w, h, scaleToStage, interactive);

                                    viewport = new Viewport3D(550, 400, false, true);

                                    addChild(viewport);

 

                                    //instantiates a Scene3D instance

                                    scene = new Scene3D();

 

                                    //instantiates a Camera3D instance

                                    camera = new Camera3D();

 

                                    //renderer draws the scene to the stage

                                    renderer = new BasicRenderEngine();

 

                                    var wireframeMaterial:WireframeMaterial = new WireframeMaterial(0x333333);

                                    wireframeMaterial.doubleSided = true;

 

                                    var bitmapFileMaterial:BitmapFileMaterial = new BitmapFileMaterial("city.jpg");

                                    bitmapFileMaterial.doubleSided = true;

           

                                     var materialsList:MaterialsList = new MaterialsList();

                                     materialsList.addMaterial(wireframeMaterial, "front");

                                     materialsList.addMaterial(wireframeMaterial, "back");

                                     materialsList.addMaterial(bitmapFileMaterial, "left");

                                     materialsList.addMaterial(wireframeMaterial, "right");

                                     materialsList.addMaterial(wireframeMaterial, "top");

                                     materialsList.addMaterial(wireframeMaterial, "bottom");

 

                                     var cube:Cube = new Cube(materialsList, 200, 200, 200, 3, 3, 3);

                                    scene.addChild(cube);

                        }

            }

}

 

 

 

 

Jason Merrill

Bank of  America <image001.jpg>  Global Learning

Shared Services Solutions Development


Monthly meetings on the Adobe Flash platform for rich media experiences - join the Bank of America Flash Platform Community

 

 

 

 

From: [hidden email] [mailto:[hidden email]] On Behalf Of Javier España | javierespana.com
Sent: Tuesday, June 30, 2009 4:13 PM
To: [hidden email]
Subject: Re: [Papervision3D] Simple Cube w/Texture

 

Try this out instead, it seems that you are using a cube and aren't loading the material list correctly.

            wireframeMaterial = new WireframeMaterial(0x333333);
            wireframeMaterial.doubleSided = true;
            ///
            //BitmapFileMaterial, doubleSided draws the color on both sides of the geometry normals
            bitmapFileMaterial = new BitmapFileMaterial("AJ.png");
            bitmapFileMaterial.doubleSided = true;
            ///
            var materialsList:MaterialsList = new MaterialsList();
            materialsList.addMaterial(wireframeMaterial, "front");
            materialsList.addMaterial(wireframeMaterial, "back");
            materialsList.addMaterial(bitmapFileMaterial, "left");
            materialsList.addMaterial(wireframeMaterial, "right");
            materialsList.addMaterial(wireframeMaterial, "top");
            materialsList.addMaterial(wireframeMaterial, "bottom");
            ///
            //cube = new Cube(MaterialList applied to object, width, depth, height, wSegments, dSegments, hSegments);
            cube = new Cube(materialsList, 200, 200, 200, 3, 3, 3);
            scene.addChild(cube);


That's a quick example that loads a bitmap on a side of the cube, and renders a wireframe material on the other sides...

Hope it helps =)

Javier

On Tue, Jun 30, 2009 at 4:48 PM, Merrill, Jason <[hidden email]> wrote:

Hey all,

 

I’m new developing with Papervision3d (though not new to Flash/Flex/Actionscript) and have a really basic problem. I was able to display my first code-generated plane and rotate it, and also load a model collada file built with Swift3d.  Now I am trying to create a box with texture, but having problems.  Here is the relevant part of my code:

 

(CubeTexture is a bitmap in Flash CS3 with linkage exported as class: CubeTexture and base class: flash.display.BitmapData)

 

var bitmap:Bitmap = new Bitmap(new CubeTexture(0,0));

material = new MaterialObject3D();

material.bitmap = bitmap.bitmapData;

 

materials = new MaterialsList();

materials.addMaterial(material);

 

primitive = new Cube(materials, 200, 200, 200);

scene.addChild(primitive);

 

I get this error:

 

“WARNING: Required material not found in given materials list. Supported materials are: front, back, right, left, top, bottom & all.”

 

Any ideas what I’m doing wrong?  Thanks.

 

 

Jason Merrill

Bank of  America Error! Filename not specified.  Global Learning

Shared Services Solutions Development


Monthly meetings on the Adobe Flash platform for rich media experiences - join the Bank of America Flash Platform Community

 


_______________________________________________
Papervision3D mailing list
[hidden email]
http://osflash.org/mailman/listinfo/papervision3d_osflash.org

 

_______________________________________________
Papervision3D mailing list
[hidden email]
http://osflash.org/mailman/listinfo/papervision3d_osflash.org


_______________________________________________
Papervision3D mailing list
[hidden email]
http://osflash.org/mailman/listinfo/papervision3d_osflash.org
speedok1

Re: ESPYS.tv done with PV3D

Reply Threaded More More options
Print post
Permalink
In reply to this post by Juan Charvet
Aloha Juan,

Very nice work.

The thing you might want to do is optimize it, it's now at 52% cpu usage at a quad core cpu. Even when it's not moving or playing a video. Good luck.

Juan Charvet wrote:
Vote on this past year’s best sports moments and see some behind the  
scenes content with Samuel L. Jackson at the upcoming ESPY awards show.

http://www.espys.tv/

It’s my first full site build utilizing the PV3D framework, so I’ll  
appreciate any criticism, no matter how harsh!

Key challenges
Creating an interesting way to deliver content in both English and  
Spanish, bound to a 1024x768 resolution with advertising space in mind.
Site was directed, designed and developed within a four week window.

Key benefits
I got to work with Samuel Jackson!

And many apologies in advance for the advertising that lies below the  
site.

**

Juan Charvet
VML | Lead Developer, Rich Media
jcharvet@vml.com
_______________________________________________
Papervision3D mailing list
Papervision3D@osflash.org
http://osflash.org/mailman/listinfo/papervision3d_osflash.org
Merrill, Jason

Re: Simple Cube w/Texture

Reply Threaded More More options
Print post
Permalink
In reply to this post by mlecho
Some javascript/style in this post has been disabled (why?)

>> i assume it's there, but just to make sure, there is an onenterframe in your code to render the scene?

 

No – you have to animate the scene /  refresh frames in order for it to render?  I’m new to Papervision, so I’m unfamiliar with these kinds of requirements.  I know how to create onEnterFrame events of course, but what needs to animate/refresh and how in the Papervision library?

 

 

Jason Merrill

Bank of  America smallLogo  Global Learning

Shared Services Solutions Development


Monthly meetings on the Adobe Flash platform for rich media experiences - join the Bank of America Flash Platform Community

 

 

 

 

From: [hidden email] [mailto:[hidden email]] On Behalf Of Eric McConkie
Sent: Wednesday, July 01, 2009 12:23 AM
To: [hidden email]
Subject: Re: [Papervision3D] Simple Cube w/Texture

 

i assume it's there, but just to make sure, there is an onenterframe in your code to render the scene?

[Sent from mobile...]


On Jun 30, 2009, at 1:35 PM, "Merrill, Jason" <[hidden email]> wrote:

Thanks Javier – that explains a lot more.  However, I tried your code out, and while I didn’t get any errors, I didn’t see any cube either (whereas I did when I made an added a simple plane in the same file).  The .jpg (my file is city.jpg, and I changed that in your code) is in the same folder location as the host HTML and .swf.  I get this message:

 

“INFO: BitmapFileMaterial: Loading bitmap from city.jpg”

 

Here is all my code (a few things are irrelevant since I was messing around with some other things):

 

package

{

            import flash.display.Bitmap;

            import flash.display.BitmapData;

            import flash.display.Sprite;

            import flash.events.Event;

            import flash.events.MouseEvent;

            import org.papervision3d.core.proto.MaterialObject3D;

            import org.papervision3d.materials.BitmapFileMaterial;

            import org.papervision3d.materials.BitmapMaterial;

            import org.papervision3d.materials.utils.MaterialsList;

            import org.papervision3d.materials.WireframeMaterial;

            import org.papervision3d.objects.primitives.Cube;

            import org.papervision3d.view.Viewport3D;

            import org.papervision3d.scenes.Scene3D;

            import org.papervision3d.cameras.Camera3D;

            import org.papervision3d.materials.ColorMaterial;

            import org.papervision3d.render.BasicRenderEngine;

 

            public class MyPV3DTest extends Sprite

            {

                       

                        private var viewport: Viewport3D;

                        private var scene: Scene3D;

                        private var camera: Camera3D;

                        private var material:MaterialObject3D;

                        private var materials:MaterialsList;

                        private var primitive:Cube

                        private var renderer: BasicRenderEngine;

                       

                        public function MyPV3DTest ():void

                        {

                                    //viewport = new Viewport3D(w, h, scaleToStage, interactive);

                                    viewport = new Viewport3D(550, 400, false, true);

                                    addChild(viewport);

 

                                    //instantiates a Scene3D instance

                                    scene = new Scene3D();

 

                                    //instantiates a Camera3D instance

                                    camera = new Camera3D();

 

                                    //renderer draws the scene to the stage

                                    renderer = new BasicRenderEngine();

 

                                    var wireframeMaterial:WireframeMaterial = new WireframeMaterial(0x333333);

                                    wireframeMaterial.doubleSided = true;

 

                                    var bitmapFileMaterial:BitmapFileMaterial = new BitmapFileMaterial("city.jpg");

                                    bitmapFileMaterial.doubleSided = true;

           

                                     var materialsList:MaterialsList = new MaterialsList();

                                     materialsList.addMaterial(wireframeMaterial, "front");

                                     materialsList.addMaterial(wireframeMaterial, "back");

                                     materialsList.addMaterial(bitmapFileMaterial, "left");

                                     materialsList.addMaterial(wireframeMaterial, "right");

                                     materialsList.addMaterial(wireframeMaterial, "top");

                                     materialsList.addMaterial(wireframeMaterial, "bottom");

 

                                     var cube:Cube = new Cube(materialsList, 200, 200, 200, 3, 3, 3);

                                    scene.addChild(cube);

                        }

            }

}

 

 

 

 

Jason Merrill


Bank of  America <image001.jpg>  Global Learning

Shared Services Solutions Development


Monthly meetings on the Adobe Flash platform for rich media experiences - join the Bank of America Flash Platform Community

 

 

 

 

From: [hidden email] [mailto:[hidden email]] On Behalf Of Javier España | javierespana.com
Sent: Tuesday, June 30, 2009 4:13 PM
To: [hidden email]
Subject: Re: [Papervision3D] Simple Cube w/Texture

 

Try this out instead, it seems that you are using a cube and aren't loading the material list correctly.

            wireframeMaterial = new WireframeMaterial(0x333333);
            wireframeMaterial.doubleSided = true;
            ///
            //BitmapFileMaterial, doubleSided draws the color on both sides of the geometry normals
            bitmapFileMaterial = new BitmapFileMaterial("AJ.png");
            bitmapFileMaterial.doubleSided = true;
            ///
            var materialsList:MaterialsList = new MaterialsList();
            materialsList.addMaterial(wireframeMaterial, "front");
            materialsList.addMaterial(wireframeMaterial, "back");
            materialsList.addMaterial(bitmapFileMaterial, "left");
            materialsList.addMaterial(wireframeMaterial, "right");
            materialsList.addMaterial(wireframeMaterial, "top");
            materialsList.addMaterial(wireframeMaterial, "bottom");
            ///
            //cube = new Cube(MaterialList applied to object, width, depth, height, wSegments, dSegments, hSegments);
            cube = new Cube(materialsList, 200, 200, 200, 3, 3, 3);
            scene.addChild(cube);


That's a quick example that loads a bitmap on a side of the cube, and renders a wireframe material on the other sides...

Hope it helps =)

Javier

On Tue, Jun 30, 2009 at 4:48 PM, Merrill, Jason <[hidden email]> wrote:

Hey all,

 

I’m new developing with Papervision3d (though not new to Flash/Flex/Actionscript) and have a really basic problem. I was able to display my first code-generated plane and rotate it, and also load a model collada file built with Swift3d.  Now I am trying to create a box with texture, but having problems.  Here is the relevant part of my code:

 

(CubeTexture is a bitmap in Flash CS3 with linkage exported as class: CubeTexture and base class: flash.display.BitmapData)

 

var bitmap:Bitmap = new Bitmap(new CubeTexture(0,0));

material = new MaterialObject3D();

material.bitmap = bitmap.bitmapData;

 

materials = new MaterialsList();

materials.addMaterial(material);

 

primitive = new Cube(materials, 200, 200, 200);

scene.addChild(primitive);

 

I get this error:

 

“WARNING: Required material not found in given materials list. Supported materials are: front, back, right, left, top, bottom & all.”

 

Any ideas what I’m doing wrong?  Thanks.

 

 

Jason Merrill

Bank of  America Error! Filename not specified.  Global Learning

Shared Services Solutions Development


Monthly meetings on the Adobe Flash platform for rich media experiences - join the Bank of America Flash Platform Community

 


_______________________________________________
Papervision3D mailing list
[hidden email]
http://osflash.org/mailman/listinfo/papervision3d_osflash.org

 

_______________________________________________
Papervision3D mailing list
[hidden email]
http://osflash.org/mailman/listinfo/papervision3d_osflash.org

 



_______________________________________________
Papervision3D mailing list
[hidden email]
http://osflash.org/mailman/listinfo/papervision3d_osflash.org
Maggical

Re: Simple Cube w/Texture

Reply Threaded More More options
Print post
Permalink
Yeah, you need a function to refresh the content all the time, something like this:

private function loop(e:Event):void{
      ///
      renderer.renderScene(scene, cam, vp);
}


On Wed, Jul 1, 2009 at 3:03 PM, Merrill, Jason <[hidden email]> wrote:

>> i assume it's there, but just to make sure, there is an onenterframe in your code to render the scene?

 

No – you have to animate the scene /  refresh frames in order for it to render?  I’m new to Papervision, so I’m unfamiliar with these kinds of requirements.  I know how to create onEnterFrame events of course, but what needs to animate/refresh and how in the Papervision library?

 

 

Jason Merrill

Bank of  America smallLogo  Global Learning

Shared Services Solutions Development


Monthly meetings on the Adobe Flash platform for rich media experiences - join the Bank of America Flash Platform Community

 

 

 

 

From: [hidden email] [mailto:[hidden email]] On Behalf Of Eric McConkie
Sent: Wednesday, July 01, 2009 12:23 AM


To: [hidden email]
Subject: Re: [Papervision3D] Simple Cube w/Texture

 

i assume it's there, but just to make sure, there is an onenterframe in your code to render the scene?

[Sent from mobile...]


On Jun 30, 2009, at 1:35 PM, "Merrill, Jason" <[hidden email]> wrote:

Thanks Javier – that explains a lot more.  However, I tried your code out, and while I didn’t get any errors, I didn’t see any cube either (whereas I did when I made an added a simple plane in the same file).  The .jpg (my file is city.jpg, and I changed that in your code) is in the same folder location as the host HTML and .swf.  I get this message:

 

“INFO: BitmapFileMaterial: Loading bitmap from city.jpg”

 

Here is all my code (a few things are irrelevant since I was messing around with some other things):

 

package

{

            import flash.display.Bitmap;

            import flash.display.BitmapData;

            import flash.display.Sprite;

            import flash.events.Event;

            import flash.events.MouseEvent;

            import org.papervision3d.core.proto.MaterialObject3D;

            import org.papervision3d.materials.BitmapFileMaterial;

            import org.papervision3d.materials.BitmapMaterial;

            import org.papervision3d.materials.utils.MaterialsList;

            import org.papervision3d.materials.WireframeMaterial;

            import org.papervision3d.objects.primitives.Cube;

            import org.papervision3d.view.Viewport3D;

            import org.papervision3d.scenes.Scene3D;

            import org.papervision3d.cameras.Camera3D;

            import org.papervision3d.materials.ColorMaterial;

            import org.papervision3d.render.BasicRenderEngine;

 

            public class MyPV3DTest extends Sprite

            {

                       

                        private var viewport: Viewport3D;

                        private var scene: Scene3D;

                        private var camera: Camera3D;

                        private var material:MaterialObject3D;

                        private var materials:MaterialsList;

                        private var primitive:Cube

                        private var renderer: BasicRenderEngine;

                       

                        public function MyPV3DTest ():void

                        {

                                    //viewport = new Viewport3D(w, h, scaleToStage, interactive);

                                    viewport = new Viewport3D(550, 400, false, true);

                                    addChild(viewport);

 

                                    //instantiates a Scene3D instance

                                    scene = new Scene3D();

 

                                    //instantiates a Camera3D instance

                                    camera = new Camera3D();

 

                                    //renderer draws the scene to the stage

                                    renderer = new BasicRenderEngine();

 

                                    var wireframeMaterial:WireframeMaterial = new WireframeMaterial(0x333333);

                                    wireframeMaterial.doubleSided = true;

 

                                    var bitmapFileMaterial:BitmapFileMaterial = new BitmapFileMaterial("city.jpg");

                                    bitmapFileMaterial.doubleSided = true;

           

                                     var materialsList:MaterialsList = new MaterialsList();

                                     materialsList.addMaterial(wireframeMaterial, "front");

                                     materialsList.addMaterial(wireframeMaterial, "back");

                                     materialsList.addMaterial(bitmapFileMaterial, "left");

                                     materialsList.addMaterial(wireframeMaterial, "right");

                                     materialsList.addMaterial(wireframeMaterial, "top");

                                     materialsList.addMaterial(wireframeMaterial, "bottom");

 

                                     var cube:Cube = new Cube(materialsList, 200, 200, 200, 3, 3, 3);

                                    scene.addChild(cube);

                        }

            }

}

 

 

 

 

Jason Merrill


Bank of  America <image001.jpg>  Global Learning

Shared Services Solutions Development


Monthly meetings on the Adobe Flash platform for rich media experiences - join the Bank of America Flash Platform Community

 

 

 

 

From: [hidden email] [mailto:[hidden email]] On Behalf Of Javier España | javierespana.com
Sent: Tuesday, June 30, 2009 4:13 PM
To: [hidden email]
Subject: Re: [Papervision3D] Simple Cube w/Texture

 

Try this out instead, it seems that you are using a cube and aren't loading the material list correctly.

            wireframeMaterial = new WireframeMaterial(0x333333);
            wireframeMaterial.doubleSided = true;
            ///
            //BitmapFileMaterial, doubleSided draws the color on both sides of the geometry normals
            bitmapFileMaterial = new BitmapFileMaterial("AJ.png");
            bitmapFileMaterial.doubleSided = true;
            ///
            var materialsList:MaterialsList = new MaterialsList();
            materialsList.addMaterial(wireframeMaterial, "front");
            materialsList.addMaterial(wireframeMaterial, "back");
            materialsList.addMaterial(bitmapFileMaterial, "left");
            materialsList.addMaterial(wireframeMaterial, "right");
            materialsList.addMaterial(wireframeMaterial, "top");
            materialsList.addMaterial(wireframeMaterial, "bottom");
            ///
            //cube = new Cube(MaterialList applied to object, width, depth, height, wSegments, dSegments, hSegments);
            cube = new Cube(materialsList, 200, 200, 200, 3, 3, 3);
            scene.addChild(cube);


That's a quick example that loads a bitmap on a side of the cube, and renders a wireframe material on the other sides...

Hope it helps =)

Javier

On Tue, Jun 30, 2009 at 4:48 PM, Merrill, Jason <[hidden email]> wrote:

Hey all,

 

I’m new developing with Papervision3d (though not new to Flash/Flex/Actionscript) and have a really basic problem. I was able to display my first code-generated plane and rotate it, and also load a model collada file built with Swift3d.  Now I am trying to create a box with texture, but having problems.  Here is the relevant part of my code:

 

(CubeTexture is a bitmap in Flash CS3 with linkage exported as class: CubeTexture and base class: flash.display.BitmapData)

 

var bitmap:Bitmap = new Bitmap(new CubeTexture(0,0));

material = new MaterialObject3D();

material.bitmap = bitmap.bitmapData;

 

materials = new MaterialsList();

materials.addMaterial(material);

 

primitive = new Cube(materials, 200, 200, 200);

scene.addChild(primitive);

 

I get this error:

 

“WARNING: Required material not found in given materials list. Supported materials are: front, back, right, left, top, bottom & all.”

 

Any ideas what I’m doing wrong?  Thanks.

 

 

Jason Merrill

Bank of  America Error! Filename not specified.  Global Learning

Shared Services Solutions Development


Monthly meetings on the Adobe Flash platform for rich media experiences - join the Bank of America Flash Platform Community

 


_______________________________________________
Papervision3D mailing list
[hidden email]
http://osflash.org/mailman/listinfo/papervision3d_osflash.org

 

_______________________________________________
Papervision3D mailing list
[hidden email]
http://osflash.org/mailman/listinfo/papervision3d_osflash.org

 


_______________________________________________
Papervision3D mailing list
[hidden email]
http://osflash.org/mailman/listinfo/papervision3d_osflash.org



_______________________________________________
Papervision3D mailing list
[hidden email]
http://osflash.org/mailman/listinfo/papervision3d_osflash.org
Merrill, Jason

Re: Simple Cube w/Texture

Reply Threaded More More options
Print post
Permalink
Some javascript/style in this post has been disabled (why?)

OK cool – so now I see the cube mesh, and I can rotate it easily, but the texture is not mapped to it.  Can someone check the code I posted about two posts back and see if they see any problems with the way I am adding materials?  The .jpg is in the same directory.  Thanks!

 

 

Jason Merrill

Bank of  America smallLogo  Global Learning

Shared Services Solutions Development


Monthly meetings on the Adobe Flash platform for rich media experiences - join the Bank of America Flash Platform Community

 

 

 

 

From: [hidden email] [mailto:[hidden email]] On Behalf Of Javier España | javierespana.com
Sent: Wednesday, July 01, 2009 2:42 PM
To: [hidden email]
Subject: Re: [Papervision3D] Simple Cube w/Texture

 

Yeah, you need a function to refresh the content all the time, something like this:

private function loop(e:Event):void{
      ///
      renderer.renderScene(scene, cam, vp);
}

On Wed, Jul 1, 2009 at 3:03 PM, Merrill, Jason <[hidden email]> wrote:

>> i assume it's there, but just to make sure, there is an onenterframe in your code to render the scene?

 

No – you have to animate the scene /  refresh frames in order for it to render?  I’m new to Papervision, so I’m unfamiliar with these kinds of requirements.  I know how to create onEnterFrame events of course, but what needs to animate/refresh and how in the Papervision library?

 

 

Jason Merrill

Bank of  America Error! Filename not specified.  Global Learning

Shared Services Solutions Development


Monthly meetings on the Adobe Flash platform for rich media experiences - join the Bank of America Flash Platform Community

 

 

 

 

From: [hidden email] [mailto:[hidden email]] On Behalf Of Eric McConkie
Sent: Wednesday, July 01, 2009 12:23 AM


To: [hidden email]
Subject: Re: [Papervision3D] Simple Cube w/Texture

 

i assume it's there, but just to make sure, there is an onenterframe in your code to render the scene?

[Sent from mobile...]


On Jun 30, 2009, at 1:35 PM, "Merrill, Jason" <[hidden email]> wrote:

Thanks Javier – that explains a lot more.  However, I tried your code out, and while I didn’t get any errors, I didn’t see any cube either (whereas I did when I made an added a simple plane in the same file).  The .jpg (my file is city.jpg, and I changed that in your code) is in the same folder location as the host HTML and .swf.  I get this message:

 

“INFO: BitmapFileMaterial: Loading bitmap from city.jpg”

 

Here is all my code (a few things are irrelevant since I was messing around with some other things):

 

package

{

            import flash.display.Bitmap;

            import flash.display.BitmapData;

            import flash.display.Sprite;

            import flash.events.Event;

            import flash.events.MouseEvent;

            import org.papervision3d.core.proto.MaterialObject3D;

            import org.papervision3d.materials.BitmapFileMaterial;

            import org.papervision3d.materials.BitmapMaterial;

            import org.papervision3d.materials.utils.MaterialsList;

            import org.papervision3d.materials.WireframeMaterial;

            import org.papervision3d.objects.primitives.Cube;

            import org.papervision3d.view.Viewport3D;

            import org.papervision3d.scenes.Scene3D;

            import org.papervision3d.cameras.Camera3D;

            import org.papervision3d.materials.ColorMaterial;

            import org.papervision3d.render.BasicRenderEngine;

 

            public class MyPV3DTest extends Sprite

            {

                       

                        private var viewport: Viewport3D;

                        private var scene: Scene3D;

                        private var camera: Camera3D;

                        private var material:MaterialObject3D;

                        private var materials:MaterialsList;

                        private var primitive:Cube

                        private var renderer: BasicRenderEngine;

                       

                        public function MyPV3DTest ():void

                        {

                                    //viewport = new Viewport3D(w, h, scaleToStage, interactive);

                                    viewport = new Viewport3D(550, 400, false, true);

                                    addChild(viewport);

 

                                    //instantiates a Scene3D instance

                                    scene = new Scene3D();

 

                                    //instantiates a Camera3D instance

                                    camera = new Camera3D();

 

                                    //renderer draws the scene to the stage

                                    renderer = new BasicRenderEngine();

 

                                    var wireframeMaterial:WireframeMaterial = new WireframeMaterial(0x333333);

                                    wireframeMaterial.doubleSided = true;

 

                                    var bitmapFileMaterial:BitmapFileMaterial = new BitmapFileMaterial("city.jpg");

                                    bitmapFileMaterial.doubleSided = true;

           

                                     var materialsList:MaterialsList = new MaterialsList();

                                     materialsList.addMaterial(wireframeMaterial, "front");

                                     materialsList.addMaterial(wireframeMaterial, "back");

                                     materialsList.addMaterial(bitmapFileMaterial, "left");

                                     materialsList.addMaterial(wireframeMaterial, "right");

                                     materialsList.addMaterial(wireframeMaterial, "top");

                                     materialsList.addMaterial(wireframeMaterial, "bottom");

 

                                     var cube:Cube = new Cube(materialsList, 200, 200, 200, 3, 3, 3);

                                    scene.addChild(cube);

                        }

            }

}

 

 

 

 

Jason Merrill

Bank of  America <image001.jpg>  Global Learning

Shared Services Solutions Development


Monthly meetings on the Adobe Flash platform for rich media experiences - join the Bank of America Flash Platform Community

 

 

 

 

From: [hidden email] [mailto:[hidden email]] On Behalf Of Javier España | javierespana.com
Sent: Tuesday, June 30, 2009 4:13 PM
To: [hidden email]
Subject: Re: [Papervision3D] Simple Cube w/Texture

 

Try this out instead, it seems that you are using a cube and aren't loading the material list correctly.

            wireframeMaterial = new WireframeMaterial(0x333333);
            wireframeMaterial.doubleSided = true;
            ///
            //BitmapFileMaterial, doubleSided draws the color on both sides of the geometry normals
            bitmapFileMaterial = new BitmapFileMaterial("AJ.png");
            bitmapFileMaterial.doubleSided = true;
            ///
            var materialsList:MaterialsList = new MaterialsList();
            materialsList.addMaterial(wireframeMaterial, "front");
            materialsList.addMaterial(wireframeMaterial, "back");
            materialsList.addMaterial(bitmapFileMaterial, "left");
            materialsList.addMaterial(wireframeMaterial, "right");
            materialsList.addMaterial(wireframeMaterial, "top");
            materialsList.addMaterial(wireframeMaterial, "bottom");
            ///
            //cube = new Cube(MaterialList applied to object, width, depth, height, wSegments, dSegments, hSegments);
            cube = new Cube(materialsList, 200, 200, 200, 3, 3, 3);
            scene.addChild(cube);


That's a quick example that loads a bitmap on a side of the cube, and renders a wireframe material on the other sides...

Hope it helps =)

Javier

On Tue, Jun 30, 2009 at 4:48 PM, Merrill, Jason <[hidden email]> wrote:

Hey all,

 

I’m new developing with Papervision3d (though not new to Flash/Flex/Actionscript) and have a really basic problem. I was able to display my first code-generated plane and rotate it, and also load a model collada file built with Swift3d.  Now I am trying to create a box with texture, but having problems.  Here is the relevant part of my code:

 

(CubeTexture is a bitmap in Flash CS3 with linkage exported as class: CubeTexture and base class: flash.display.BitmapData)

 

var bitmap:Bitmap = new Bitmap(new CubeTexture(0,0));

material = new MaterialObject3D();

material.bitmap = bitmap.bitmapData;

 

materials = new MaterialsList();

materials.addMaterial(material);

 

primitive = new Cube(materials, 200, 200, 200);

scene.addChild(primitive);

 

I get this error:

 

“WARNING: Required material not found in given materials list. Supported materials are: front, back, right, left, top, bottom & all.”

 

Any ideas what I’m doing wrong?  Thanks.

 

 

Jason Merrill

Bank of  America Error! Filename not specified.  Global Learning

Shared Services Solutions Development


Monthly meetings on the Adobe Flash platform for rich media experiences - join the Bank of America Flash Platform Community

 


_______________________________________________
Papervision3D mailing list
[hidden email]
http://osflash.org/mailman/listinfo/papervision3d_osflash.org

 

_______________________________________________
Papervision3D mailing list
[hidden email]
http://osflash.org/mailman/listinfo/papervision3d_osflash.org

 


_______________________________________________
Papervision3D mailing list
[hidden email]
http://osflash.org/mailman/listinfo/papervision3d_osflash.org

 



_______________________________________________
Papervision3D mailing list
[hidden email]
http://osflash.org/mailman/listinfo/papervision3d_osflash.org
Merrill, Jason

Re: Simple Cube w/Texture

Reply Threaded More More options
Print post
Permalink
Some javascript/style in this post has been disabled (why?)

Hmmm… nobody?  This is a pretty simple problem, and I’m not sure where to start troubleshooting next…  is there a problem if the dimensions of the image being mapped to the object is larger than the surface area of the object itself?  Just trying to figure out why I’m only getting the wireframe and not the texture.  Code below.  Thanks!

 

 

Jason Merrill

Bank of  America smallLogo  Global Learning

Shared Services Solutions Development


Monthly meetings on the Adobe Flash platform for rich media experiences - join the Bank of America Flash Platform Community

 

 

 

 

From: [hidden email] [mailto:[hidden email]] On Behalf Of Merrill, Jason
Sent: Wednesday, July 01, 2009 3:59 PM
To: [hidden email]
Subject: Re: [Papervision3D] Simple Cube w/Texture

 

OK cool – so now I see the cube mesh, and I can rotate it easily, but the texture is not mapped to it.  Can someone check the code I posted about two posts back and see if they see any problems with the way I am adding materials?  The .jpg is in the same directory.  Thanks!

 

 

Jason Merrill

Bank of  America smallLogo  Global Learning

Shared Services Solutions Development


Monthly meetings on the Adobe Flash platform for rich media experiences - join the Bank of America Flash Platform Community

 

 

 

Here is all my code (a few things are irrelevant since I was messing around with some other things):

 

package

{

            import flash.display.Bitmap;

            import flash.display.BitmapData;

            import flash.display.Sprite;

            import flash.events.Event;

            import flash.events.MouseEvent;

            import org.papervision3d.core.proto.MaterialObject3D;

            import org.papervision3d.materials.BitmapFileMaterial;

            import org.papervision3d.materials.BitmapMaterial;

            import org.papervision3d.materials.utils.MaterialsList;

            import org.papervision3d.materials.WireframeMaterial;

            import org.papervision3d.objects.primitives.Cube;

            import org.papervision3d.view.Viewport3D;

            import org.papervision3d.scenes.Scene3D;

            import org.papervision3d.cameras.Camera3D;

            import org.papervision3d.materials.ColorMaterial;

            import org.papervision3d.render.BasicRenderEngine;

 

            public class MyPV3DTest extends Sprite

            {

                       

                        private var viewport: Viewport3D;

                        private var scene: Scene3D;

                        private var camera: Camera3D;

                        private var material:MaterialObject3D;

                        private var materials:MaterialsList;

                        private var primitive:Cube

                        private var renderer: BasicRenderEngine;

                       

                        public function MyPV3DTest ():void

                        {

                                    //viewport = new Viewport3D(w, h, scaleToStage, interactive);

                                    viewport = new Viewport3D(550, 400, false, true);

                                    addChild(viewport);

 

                                    //instantiates a Scene3D instance

                                    scene = new Scene3D();

 

                                    //instantiates a Camera3D instance

                                    camera = new Camera3D();

 

                                    //renderer draws the scene to the stage

                                    renderer = new BasicRenderEngine();

 

                                    var wireframeMaterial:WireframeMaterial = new WireframeMaterial(0x333333);

                                    wireframeMaterial.doubleSided = true;

 

                                    var bitmapFileMaterial:BitmapFileMaterial = new BitmapFileMaterial("city.jpg");

                                    bitmapFileMaterial.doubleSided = true;

           

                                     var materialsList:MaterialsList = new MaterialsList();

                                     materialsList.addMaterial(wireframeMaterial, "front");

                                     materialsList.addMaterial(wireframeMaterial, "back");

                                     materialsList.addMaterial(bitmapFileMaterial, "left");

                                     materialsList.addMaterial(wireframeMaterial, "right");

                                     materialsList.addMaterial(wireframeMaterial, "top");

                                     materialsList.addMaterial(wireframeMaterial, "bottom");

 

                                     var cube:Cube = new Cube(materialsList, 200, 200, 200, 3, 3, 3);

                                    scene.addChild(cube);

                        }

            }

}

 

 

 

 

Jason Merrill

Bank of  America <image001.jpg>  Global Learning

Shared Services Solutions Development


Monthly meetings on the Adobe Flash platform for rich media experiences - join the Bank of America Flash Platform Community

 

 

 

 

From: [hidden email] [mailto:[hidden email]] On Behalf Of Javier España | javierespana.com
Sent: Tuesday, June 30, 2009 4:13 PM
To: [hidden email]
Subject: Re: [Papervision3D] Simple Cube w/Texture

 

Try this out instead, it seems that you are using a cube and aren't loading the material list correctly.

            wireframeMaterial = new WireframeMaterial(0x333333);
            wireframeMaterial.doubleSided = true;
            ///
            //BitmapFileMaterial, doubleSided draws the color on both sides of the geometry normals
            bitmapFileMaterial = new BitmapFileMaterial("AJ.png");
            bitmapFileMaterial.doubleSided = true;
            ///
            var materialsList:MaterialsList = new MaterialsList();
            materialsList.addMaterial(wireframeMaterial, "front");
            materialsList.addMaterial(wireframeMaterial, "back");
            materialsList.addMaterial(bitmapFileMaterial, "left");
            materialsList.addMaterial(wireframeMaterial, "right");
            materialsList.addMaterial(wireframeMaterial, "top");
            materialsList.addMaterial(wireframeMaterial, "bottom");
            ///
            //cube = new Cube(MaterialList applied to object, width, depth, height, wSegments, dSegments, hSegments);
            cube = new Cube(materialsList, 200, 200, 200, 3, 3, 3);
            scene.addChild(cube);


That's a quick example that loads a bitmap on a side of the cube, and renders a wireframe material on the other sides...

Hope it helps =)

Javier

On Tue, Jun 30, 2009 at 4:48 PM, Merrill, Jason <[hidden email]> wrote:

Hey all,

 

I’m new developing with Papervision3d (though not new to Flash/Flex/Actionscript) and have a really basic problem. I was able to display my first code-generated plane and rotate it, and also load a model collada file built with Swift3d.  Now I am trying to create a box with texture, but having problems.  Here is the relevant part of my code:

 

(CubeTexture is a bitmap in Flash CS3 with linkage exported as class: CubeTexture and base class: flash.display.BitmapData)

 

var bitmap:Bitmap = new Bitmap(new CubeTexture(0,0));

material = new MaterialObject3D();

material.bitmap = bitmap.bitmapData;

 

materials = new MaterialsList();

materials.addMaterial(material);

 

primitive = new Cube(materials, 200, 200, 200);

scene.addChild(primitive);

 

I get this error:

 

“WARNING: Required material not found in given materials list. Supported materials are: front, back, right, left, top, bottom & all.”

 

Any ideas what I’m doing wrong?  Thanks.

 

 

Jason Merrill

Bank of  America Error! Filename not specified.  Global Learning

Shared Services Solutions Development


Monthly meetings on the Adobe Flash platform for rich media experiences - join the Bank of America Flash Platform Community

 


_______________________________________________
Papervision3D mailing list
[hidden email]
http://osflash.org/mailman/listinfo/papervision3d_osflash.org

 

_______________________________________________
Papervision3D mailing list
[hidden email]
http://osflash.org/mailman/listinfo/papervision3d_osflash.org

 


_______________________________________________
Papervision3D mailing list
[hidden email]
http://osflash.org/mailman/listinfo/papervision3d_osflash.org

 



_______________________________________________
Papervision3D mailing list
[hidden email]
http://osflash.org/mailman/listinfo/papervision3d_osflash.org
Merrill, Jason

Re: Simple Cube w/Texture

Reply Threaded More More options
Print post
Permalink
Some javascript/style in this post has been disabled (why?)

Nermind, I got it – it was mapped to a side of the cube I couldn’t see until I rotated it.  Got it now.  J

 

 

Jason Merrill

Bank of  America smallLogo  Global Learning

Shared Services Solutions Development


Monthly meetings on the Adobe Flash platform for rich media experiences - join the Bank of America Flash Platform Community

 

 

 

 

From: [hidden email] [mailto:[hidden email]] On Behalf Of Merrill, Jason
Sent: Thursday, July 02, 2009 10:01 AM
To: [hidden email]
Subject: Re: [Papervision3D] Simple Cube w/Texture

 

Hmmm… nobody?  This is a pretty simple problem, and I’m not sure where to start troubleshooting next…  is there a problem if the dimensions of the image being mapped to the object is larger than the surface area of the object itself?  Just trying to figure out why I’m only getting the wireframe and not the texture.  Code below.  Thanks!

 

 

Jason Merrill

Bank of  America smallLogo  Global Learning

Shared Services Solutions Development


Monthly meetings on the Adobe Flash platform for rich media experiences - join the Bank of America Flash Platform Community

 

 

 

 

From: [hidden email] [mailto:[hidden email]] On Behalf Of Merrill, Jason
Sent: Wednesday, July 01, 2009 3:59 PM
To: [hidden email]
Subject: Re: [Papervision3D] Simple Cube w/Texture

 

OK cool – so now I see the cube mesh, and I can rotate it easily, but the texture is not mapped to it.  Can someone check the code I posted about two posts back and see if they see any problems with the way I am adding materials?  The .jpg is in the same directory.  Thanks!

 

 

Jason Merrill

Bank of  America smallLogo  Global Learning

Shared Services Solutions Development


Monthly meetings on the Adobe Flash platform for rich media experiences - join the Bank of America Flash Platform Community

 

 

 

Here is all my code (a few things are irrelevant since I was messing around with some other things):

 

package

{

            import flash.display.Bitmap;

            import flash.display.BitmapData;

            import flash.display.Sprite;

            import flash.events.Event;

            import flash.events.MouseEvent;

            import org.papervision3d.core.proto.MaterialObject3D;

            import org.papervision3d.materials.BitmapFileMaterial;

            import org.papervision3d.materials.BitmapMaterial;

            import org.papervision3d.materials.utils.MaterialsList;

            import org.papervision3d.materials.WireframeMaterial;

            import org.papervision3d.objects.primitives.Cube;

            import org.papervision3d.view.Viewport3D;

            import org.papervision3d.scenes.Scene3D;

            import org.papervision3d.cameras.Camera3D;

            import org.papervision3d.materials.ColorMaterial;

            import org.papervision3d.render.BasicRenderEngine;

 

            public class MyPV3DTest extends Sprite

            {

                       

                        private var viewport: Viewport3D;

                        private var scene: Scene3D;

                        private var camera: Camera3D;

                        private var material:MaterialObject3D;

                        private var materials:MaterialsList;

                        private var primitive:Cube

                        private var renderer: BasicRenderEngine;

                       

                        public function MyPV3DTest ():void

                        {

                                    //viewport = new Viewport3D(w, h, scaleToStage, interactive);

                                    viewport = new Viewport3D(550, 400, false, true);

                                    addChild(viewport);

 

                                    //instantiates a Scene3D instance

                                    scene = new Scene3D();

 

                                    //instantiates a Camera3D instance

                                    camera = new Camera3D();

 

                                    //renderer draws the scene to the stage

                                    renderer = new BasicRenderEngine();

 

                                    var wireframeMaterial:WireframeMaterial = new WireframeMaterial(0x333333);

                                    wireframeMaterial.doubleSided = true;

 

                                    var bitmapFileMaterial:BitmapFileMaterial = new BitmapFileMaterial("city.jpg");

                                    bitmapFileMaterial.doubleSided = true;

           

                                     var materialsList:MaterialsList = new MaterialsList();

                                     materialsList.addMaterial(wireframeMaterial, "front");

                                     materialsList.addMaterial(wireframeMaterial, "back");

                                     materialsList.addMaterial(bitmapFileMaterial, "left");

                                     materialsList.addMaterial(wireframeMaterial, "right");

                                     materialsList.addMaterial(wireframeMaterial, "top");

                                     materialsList.addMaterial(wireframeMaterial, "bottom");

 

                                     var cube:Cube = new Cube(materialsList, 200, 200, 200, 3, 3, 3);

                                    scene.addChild(cube);

                        }

            }

}

 

 

 

 

Jason Merrill

Bank of  America <image001.jpg>  Global Learning

Shared Services Solutions Development


Monthly meetings on the Adobe Flash platform for rich media experiences - join the Bank of America Flash Platform Community

 

 

 

 

From: [hidden email] [mailto:[hidden email]] On Behalf Of Javier España | javierespana.com
Sent: Tuesday, June 30, 2009 4:13 PM
To: [hidden email]
Subject: Re: [Papervision3D] Simple Cube w/Texture

 

Try this out instead, it seems that you are using a cube and aren't loading the material list correctly.

            wireframeMaterial = new WireframeMaterial(0x333333);
            wireframeMaterial.doubleSided = true;
            ///
            //BitmapFileMaterial, doubleSided draws the color on both sides of the geometry normals
            bitmapFileMaterial = new BitmapFileMaterial("AJ.png");
            bitmapFileMaterial.doubleSided = true;
            ///
            var materialsList:MaterialsList = new MaterialsList();
            materialsList.addMaterial(wireframeMaterial, "front");
            materialsList.addMaterial(wireframeMaterial, "back");
            materialsList.addMaterial(bitmapFileMaterial, "left");
            materialsList.addMaterial(wireframeMaterial, "right");
            materialsList.addMaterial(wireframeMaterial, "top");
            materialsList.addMaterial(wireframeMaterial, "bottom");
            ///
            //cube = new Cube(MaterialList applied to object, width, depth, height, wSegments, dSegments, hSegments);
            cube = new Cube(materialsList, 200, 200, 200, 3, 3, 3);
            scene.addChild(cube);


That's a quick example that loads a bitmap on a side of the cube, and renders a wireframe material on the other sides...

Hope it helps =)

Javier

On Tue, Jun 30, 2009 at 4:48 PM, Merrill, Jason <[hidden email]> wrote:

Hey all,

 

I’m new developing with Papervision3d (though not new to Flash/Flex/Actionscript) and have a really basic problem. I was able to display my first code-generated plane and rotate it, and also load a model collada file built with Swift3d.  Now I am trying to create a box with texture, but having problems.  Here is the relevant part of my code:

 

(CubeTexture is a bitmap in Flash CS3 with linkage exported as class: CubeTexture and base class: flash.display.BitmapData)

 

var bitmap:Bitmap = new Bitmap(new CubeTexture(0,0));

material = new MaterialObject3D();

material.bitmap = bitmap.bitmapData;

 

materials = new MaterialsList();

materials.addMaterial(material);

 

primitive = new Cube(materials, 200, 200, 200);

scene.addChild(primitive);

 

I get this error:

 

“WARNING: Required material not found in given materials list. Supported materials are: front, back, right, left, top, bottom & all.”

 

Any ideas what I’m doing wrong?  Thanks.

 

 

Jason Merrill

Bank of  America Error! Filename not specified.  Global Learning

Shared Services Solutions Development


Monthly meetings on the Adobe Flash platform for rich media experiences - join the Bank of America Flash Platform Community

 


_______________________________________________
Papervision3D mailing list
[hidden email]
http://osflash.org/mailman/listinfo/papervision3d_osflash.org

 

_______________________________________________
Papervision3D mailing list
[hidden email]
http://osflash.org/mailman/listinfo/papervision3d_osflash.org

 


_______________________________________________
Papervision3D mailing list
[hidden email]
http://osflash.org/mailman/listinfo/papervision3d_osflash.org

 



_______________________________________________
Papervision3D mailing list
[hidden email]
http://osflash.org/mailman/listinfo/papervision3d_osflash.org
Maggical

Re: Simple Cube w/Texture

Reply Threaded More More options
Print post
Permalink
Try the doubleSide option set to true...

On Thu, Jul 2, 2009 at 11:31 AM, Merrill, Jason <[hidden email]> wrote:

Nermind, I got it – it was mapped to a side of the cube I couldn’t see until I rotated it.  Got it now.  J

 

 

Jason Merrill

Bank of  America smallLogo  Global Learning

Shared Services Solutions Development


Monthly meetings on the Adobe Flash platform for rich media experiences - join the Bank of America Flash Platform Community

 

 

 

 

From: [hidden email] [mailto:[hidden email]] On Behalf Of Merrill, Jason
Sent: Thursday, July 02, 2009 10:01 AM


To: [hidden email]
Subject: Re: [Papervision3D] Simple Cube w/Texture

 

Hmmm… nobody?  This is a pretty simple problem, and I’m not sure where to start troubleshooting next…  is there a problem if the dimensions of the image being mapped to the object is larger than the surface area of the object itself?  Just trying to figure out why I’m only getting the wireframe and not the texture.  Code below.  Thanks!

 

 

Jason Merrill

Bank of  America smallLogo  Global Learning

Shared Services Solutions Development


Monthly meetings on the Adobe Flash platform for rich media experiences - join the Bank of America Flash Platform Community

 

 

 

 

From: [hidden email] [mailto:[hidden email]] On Behalf Of Merrill, Jason
Sent: Wednesday, July 01, 2009 3:59 PM
To: [hidden email]
Subject: Re: [Papervision3D] Simple Cube w/Texture

 

OK cool – so now I see the cube mesh, and I can rotate it easily, but the texture is not mapped to it.  Can someone check the code I posted about two posts back and see if they see any problems with the way I am adding materials?  The .jpg is in the same directory.  Thanks!

 

 

Jason Merrill

Bank of  America smallLogo  Global Learning

Shared Services Solutions Development


Monthly meetings on the Adobe Flash platform for rich media experiences - join the Bank of America Flash Platform Community

 

 

 

Here is all my code (a few things are irrelevant since I was messing around with some other things):

 

package

{

            import flash.display.Bitmap;

            import flash.display.BitmapData;

            import flash.display.Sprite;

            import flash.events.Event;

            import flash.events.MouseEvent;

            import org.papervision3d.core.proto.MaterialObject3D;

            import org.papervision3d.materials.BitmapFileMaterial;

            import org.papervision3d.materials.BitmapMaterial;

            import org.papervision3d.materials.utils.MaterialsList;

            import org.papervision3d.materials.WireframeMaterial;

            import org.papervision3d.objects.primitives.Cube;

            import org.papervision3d.view.Viewport3D;

            import org.papervision3d.scenes.Scene3D;

            import org.papervision3d.cameras.Camera3D;

            import org.papervision3d.materials.ColorMaterial;

            import org.papervision3d.render.BasicRenderEngine;

 

            public class MyPV3DTest extends Sprite

            {

                       

                        private var viewport: Viewport3D;

                        private var scene: Scene3D;

                        private var camera: Camera3D;

                        private var material:MaterialObject3D;

                        private var materials:MaterialsList;

                        private var primitive:Cube

                        private var renderer: BasicRenderEngine;

                       

                        public function MyPV3DTest ():void

                        {

                                    //viewport = new Viewport3D(w, h, scaleToStage, interactive);

                                    viewport = new Viewport3D(550, 400, false, true);

                                    addChild(viewport);

 

                                    //instantiates a Scene3D instance

                                    scene = new Scene3D();

 

                                    //instantiates a Camera3D instance

                                    camera = new Camera3D();

 

                                    //renderer draws the scene to the stage

                                    renderer = new BasicRenderEngine();

 

                                    var wireframeMaterial:WireframeMaterial = new WireframeMaterial(0x333333);

                                    wireframeMaterial.doubleSided = true;

 

                                    var bitmapFileMaterial:BitmapFileMaterial = new BitmapFileMaterial("city.jpg");

                                    bitmapFileMaterial.doubleSided = true;

           

                                     var materialsList:MaterialsList = new MaterialsList();

                                     materialsList.addMaterial(wireframeMaterial, "front");

                                     materialsList.addMaterial(wireframeMaterial, "back");

                                     materialsList.addMaterial(bitmapFileMaterial, "left");

                                     materialsList.addMaterial(wireframeMaterial, "right");

                                     materialsList.addMaterial(wireframeMaterial, "top");

                                     materialsList.addMaterial(wireframeMaterial, "bottom");

 

                                     var cube:Cube = new Cube(materialsList, 200, 200, 200, 3, 3, 3);

                                    scene.addChild(cube);

                        }

            }

}

 

 

 

 

Jason Merrill

Bank of  America <image001.jpg>  Global Learning

Shared Services Solutions Development


Monthly meetings on the Adobe Flash platform for rich media experiences - join the Bank of America Flash Platform Community

 

 

 

 

From: [hidden email] [mailto:[hidden email]] On Behalf Of Javier España | javierespana.com
Sent: Tuesday, June 30, 2009 4:13 PM
To: [hidden email]
Subject: Re: [Papervision3D] Simple Cube w/Texture

 

Try this out instead, it seems that you are using a cube and aren't loading the material list correctly.

            wireframeMaterial = new WireframeMaterial(0x333333);
            wireframeMaterial.doubleSided = true;
            ///
            //BitmapFileMaterial, doubleSided draws the color on both sides of the geometry normals
            bitmapFileMaterial = new BitmapFileMaterial("AJ.png");
            bitmapFileMaterial.doubleSided = true;
            ///
            var materialsList:MaterialsList = new MaterialsList();
            materialsList.addMaterial(wireframeMaterial, "front");
            materialsList.addMaterial(wireframeMaterial, "back");
            materialsList.addMaterial(bitmapFileMaterial, "left");
            materialsList.addMaterial(wireframeMaterial, "right");
            materialsList.addMaterial(wireframeMaterial, "top");
            materialsList.addMaterial(wireframeMaterial, "bottom");
            ///
            //cube = new Cube(MaterialList applied to object, width, depth, height, wSegments, dSegments, hSegments);
            cube = new Cube(materialsList, 200, 200, 200, 3, 3, 3);
            scene.addChild(cube);


That's a quick example that loads a bitmap on a side of the cube, and renders a wireframe material on the other sides...

Hope it helps =)

Javier

On Tue, Jun 30, 2009 at 4:48 PM, Merrill, Jason <[hidden email]> wrote:

Hey all,

 

I’m new developing with Papervision3d (though not new to Flash/Flex/Actionscript) and have a really basic problem. I was able to display my first code-generated plane and rotate it, and also load a model collada file built with Swift3d.  Now I am trying to create a box with texture, but having problems.  Here is the relevant part of my code:

 

(CubeTexture is a bitmap in Flash CS3 with linkage exported as class: CubeTexture and base class: flash.display.BitmapData)

 

var bitmap:Bitmap = new Bitmap(new CubeTexture(0,0));

material = new MaterialObject3D();

material.bitmap = bitmap.bitmapData;

 

materials = new MaterialsList();

materials.addMaterial(material);

 

primitive = new Cube(materials, 200, 200, 200);

scene.addChild(primitive);

 

I get this error:

 

“WARNING: Required material not found in given materials list. Supported materials are: front, back, right, left, top, bottom & all.”

 

Any ideas what I’m doing wrong?  Thanks.

 

 

Jason Merrill

Bank of  America Error! Filename not specified.  Global Learning

Shared Services Solutions Development


Monthly meetings on the Adobe Flash platform for rich media experiences - join the Bank of America Flash Platform Community

 


_______________________________________________
Papervision3D mailing list
[hidden email]
http://osflash.org/mailman/listinfo/papervision3d_osflash.org

 

_______________________________________________
Papervision3D mailing list
[hidden email]
http://osflash.org/mailman/listinfo/papervision3d_osflash.org

 


_______________________________________________
Papervision3D mailing list
[hidden email]
http://osflash.org/mailman/listinfo/papervision3d_osflash.org

 


_______________________________________________
Papervision3D mailing list
[hidden email]
http://osflash.org/mailman/listinfo/papervision3d_osflash.org



_______________________________________________
Papervision3D mailing list
[hidden email]
http://osflash.org/mailman/listinfo/papervision3d_osflash.org