[Papervision3D] Put a viewport into a canvas

j2me_soul j2me_soul at 163.com
Mon May 4 10:03:49 PDT 2009


Hi everyone,
 
 I try to put a plane to a canvas in its top-left corner.
 Why the plane can't be top-left corner ?
 Some distance away from the top-left corner, why?
  
Thanks,
Benoit
Here is the code :

   private var v:Viewport3D;
   private var s:Scene3D = new Scene3D();
   private var c:Camera3D = new Camera3D();
   private var r:BasicRenderEngine = new BasicRenderEngine();
   private var f:DisplayObject3D = new DisplayObject3D();
   private function init():void{
    v = new Viewport3D(can.width, can.height, false, true);
    can.rawChildren.addChild(v);
    
    var p:Plane = new Plane(new BitmapFileMaterial("images/Belle.png"),100, 100, 2, 2);
    p.x = -800 + 100/2;
    p.y = 600 - 100/2; 
    s.addChild(p);
    addEventListener(Event.ENTER_FRAME, render);
   }
   
   private function render(e:Event):void{
    r.renderScene(s, c, v);
   }
   
  ]]>
 </mx:Script>
 <mx:Canvas id="can" width="800" height="600" 
      borderStyle="solid" borderThickness="2" >
  <mx:Button label="button" />
 </mx:Canvas>


 


在2009-05-04,papervision3d-request at osflash.org 写道:
>Send Papervision3D mailing list submissions to
>	papervision3d at osflash.org
>
>To subscribe or unsubscribe via the World Wide Web, visit
>	http://osflash.org/mailman/listinfo/papervision3d_osflash.org
>or, via email, send a message with subject or body 'help' to
>	papervision3d-request at osflash.org
>
>You can reach the person managing the list at
>	papervision3d-owner at osflash.org
>
>When replying, please edit your Subject line so it is more specific
>than "Re: Contents of Papervision3D digest..."
>
>
>Today's Topics:
>
>   1. Re: DAE files created with 3d studio (Tim Knip)
>   2. Re: DAE files created with 3d studio (Tim Knip)
>   3. Re: Help With Layers and Zoom (Slopester)
>   4. Re: New Boffswana AR Project - Living Sasquatch (Doug McCune)
>   5. Re: New Boffswana AR Project - Living Sasquatch (Carlos Ulloa)
>
>
>----------------------------------------------------------------------
>
>Message: 1
>Date: Sun, 3 May 2009 16:44:54 +0200
>From: Tim Knip <tim.knip at gmail.com>
>Subject: Re: [Papervision3D] DAE files created with 3d studio
>To: papervision3d at osflash.org
>Message-ID:
>	<4170db510905030744s63d9fac5hd7afafbd8aff613a at mail.gmail.com>
>Content-Type: text/plain; charset=ISO-8859-1
>
>Hi Mark,
>
>Could you mail me the 'bomb' animation as an exported COLLADA file?
>That way I can take this along in upcoming DAE upgrade.
>
>Thanks,
>Tim
>
>2009/5/2 Mark I. Ross <nospam at therossman.org>:
>> Hey folks,
>>
>> I apologize in advance if this has been covered extensively in the past on
>> this list - I have been trying to get information about this online before
>> coming here, but haven't had a lot of luck.
>>
>> I found that in 3d Studio, if i simply create a cube, add a couple keyframes
>> to the timeline, and just put some simple rotations and such on the cube,
>> that it exports well to DAE and comes into papervision great. ?The cube
>> animates as I would expect within papervision scene.
>>
>> I have tried making a second file, this time I created a cube, but placed a
>> "bomb" spacewarp modifier in the scene. ?I see that even before I put
>> keyframes in the timeline, the animation is there if I scrub back and forth.
>> ?When I export like this, there isn't even a library_animations node in the
>> DAE. ?Now, if I add some keyframes in the timeline, I actually get a
>> library_animations node in the DAE file, but nothing happens in papervision
>> (the box appears but there is no animation). ?I am guessing that the 3ds
>> modifiers don't come out well in the DAE format (which makes sense), but it
>> would be nice if anyone knows if i can convert the bomb modifier animation
>> into something that would export well into DAE, like, is there a process i
>> can go through in 3ds to get this effect to export. ?I don't mind doing a
>> bit of legwork but clearly I am trying to avoid just making such a complex
>> animation by hand ?;)
>>
>> I tried converting the cube to an editable mesh as well but that didn't seem
>> to make a difference. ?If anyone has any advice or could point me in a
>> better direction I would be greatly appreciative, and again, sorry if this
>> horse has already been beaten to death on this list!
>>
>> Cheers,
>> mark
>>
>> _______________________________________________
>> Papervision3D mailing list
>> Papervision3D at osflash.org
>> http://osflash.org/mailman/listinfo/papervision3d_osflash.org
>>
>
>
>
>------------------------------
>
>Message: 2
>Date: Sun, 3 May 2009 17:11:28 +0200
>From: Tim Knip <tim.knip at gmail.com>
>Subject: Re: [Papervision3D] DAE files created with 3d studio
>To: papervision3d at osflash.org
>Message-ID:
>	<4170db510905030811u3c0c7530r702c56a03b0f8fb0 at mail.gmail.com>
>Content-Type: text/plain; charset=ISO-8859-1
>
>Hi,
>
>It seems that spacewarp animations don't get exported to COLLADA.
>If anyone managed to do it, please let me know.
>
>A possible workaround would be to make the cube's faces separate
>objects and animate these.
>
>Tim
>
>2009/5/2 Mark I. Ross <nospam at therossman.org>:
>> Hey folks,
>>
>> I apologize in advance if this has been covered extensively in the past on
>> this list - I have been trying to get information about this online before
>> coming here, but haven't had a lot of luck.
>>
>> I found that in 3d Studio, if i simply create a cube, add a couple keyframes
>> to the timeline, and just put some simple rotations and such on the cube,
>> that it exports well to DAE and comes into papervision great. ?The cube
>> animates as I would expect within papervision scene.
>>
>> I have tried making a second file, this time I created a cube, but placed a
>> "bomb" spacewarp modifier in the scene. ?I see that even before I put
>> keyframes in the timeline, the animation is there if I scrub back and forth.
>> ?When I export like this, there isn't even a library_animations node in the
>> DAE. ?Now, if I add some keyframes in the timeline, I actually get a
>> library_animations node in the DAE file, but nothing happens in papervision
>> (the box appears but there is no animation). ?I am guessing that the 3ds
>> modifiers don't come out well in the DAE format (which makes sense), but it
>> would be nice if anyone knows if i can convert the bomb modifier animation
>> into something that would export well into DAE, like, is there a process i
>> can go through in 3ds to get this effect to export. ?I don't mind doing a
>> bit of legwork but clearly I am trying to avoid just making such a complex
>> animation by hand ?;)
>>
>> I tried converting the cube to an editable mesh as well but that didn't seem
>> to make a difference. ?If anyone has any advice or could point me in a
>> better direction I would be greatly appreciative, and again, sorry if this
>> horse has already been beaten to death on this list!
>>
>> Cheers,
>> mark
>>
>> _______________________________________________
>> Papervision3D mailing list
>> Papervision3D at osflash.org
>> http://osflash.org/mailman/listinfo/papervision3d_osflash.org
>>
>
>
>
>------------------------------
>
>Message: 3
>Date: Sun, 3 May 2009 16:30:44 +0100
>From: "Slopester" <slope at slopester.com>
>Subject: Re: [Papervision3D] Help With Layers and Zoom
>To: <papervision3d at osflash.org>
>Message-ID: <9FC825DB42EC4E128D51546B4C2575F8 at MARLEY>
>Content-Type: text/plain; format=flowed; charset="iso-8859-1";
>	reply-type=original
>
>Hi Angelo
>
>You can get a PV scene set up quickly with BasicView (see Andy's post @ 
>http://blog.zupko.info/?p=96).
>This will create all the base elements for you - one scene, one viewport, 
>one camera - and you can then add your objects to that scene.
>
>You can use DisplayObject3D as containers for your groups of thumbs. 
>DisplayObject3D is an invisible object in your 3D scene you can add children 
>to, so you can use one for each category and add your thumbnails with 
>addChild().
>
>You thumbnails will probably be Planes - you will need to create a material 
>for each Plane and be sure to set the material's interactive attribute to 
>true if you want it to receive mouse events later:  mymaterial.interactive = 
>true;
>
>You can use a tween engine (like my personal fave, Tweener - 
>http://code.google.com/p/tweener/) to do all the movement.
>
>There's obviously a bunch of work to do with the above to get to your 
>finished idea, but that's the general concept.  Hope that helps
>
>slopes
>
>
>----- Original Message ----- 
>From: "Angelo" <angeligia at gmail.com>
>To: <papervision3d at osflash.org>
>Sent: Sunday, May 03, 2009 5:50 AM
>Subject: [Papervision3D] Help With Layers and Zoom
>
>
>Hi guys,
>
>I'm sending this message because I'm desperate. I'm searching all over
>the internet about 2 weeks now to understand Papervision and I'm almost
>getting next to understand how it works but I'm loosing something. Well,
>here's my problem:
>
>I'm making a v?deo website, that will have 3 categories, each with some
>videos, loaded from a XML. Each category will have a layer with its
>thumbnails. Once an user click the thumbnail, it centers on the screen
>and zoom, if the person clicks again they can watch the video. Well, the
>three categories will have each a layer and they will be one in front of
>the other, each with a different depth and blur. The ideia is to change
>the category with the mouse wheel, but i'll figure it out how i'll make
>this later. My issue is how to make those three layers, put some
>thumbnails inside each one, make the mouse button works and change its
>depths and z-order.
>
>I don't know if I have to make 3 scenes, or 3 planes, or 3 sprites, how
>to put some movieAssetsMaterials inside the Plane, I just don't know
>what is the logic for this specific problem. I'm not waiting for you
>guys to give me the final solution, I just hope some advices like: "you
>will have to make 3 sprites, one camera and ... " and i'll try a little
>more. If you guys know some good tutorial or example that mix some of
>the things I said, i'll reeaaally appreciate.
>
>Thanks in advance!
>Angelo
>
>_______________________________________________
>Papervision3D mailing list
>Papervision3D at osflash.org
>http://osflash.org/mailman/listinfo/papervision3d_osflash.org
>
>
>--------------------------------------------------------------------------------
>
>
>
>No virus found in this incoming message.
>Checked by AVG - www.avg.com
>Version: 8.5.325 / Virus Database: 270.12.15/2093 - Release Date: 05/02/09 
>14:23:00
>
>
>
>
>------------------------------
>
>Message: 4
>Date: Sun, 3 May 2009 09:05:07 -0700
>From: Doug McCune <doug at dougmccune.com>
>Subject: Re: [Papervision3D] New Boffswana AR Project - Living
>	Sasquatch
>To: papervision3d at osflash.org
>Message-ID:
>	<2e07e5b20905030905w6c4f8753r65af99c6fc75410f at mail.gmail.com>
>Content-Type: text/plain; charset="iso-8859-1"
>
>Clint,
>
>I think this last email was extremely helpful in clarifying what you guys
>are doing above and beyond the typical AR experiments people are doing with
>FLARToolkit. When I first saw the sasquatch app I was impressed, but then
>reading the writeup I scoffed at the idea that you were simply licensing
>FLARToolkit and rebranding it as "Release3D" to monetize it (the lack of any
>mention of FLARToolkit or any license information to explain why this didn't
>fall under the GPL was the main reason I got an uneasy feeling). However,
>now reading this I have a much better understanding of what your framework
>does above and beyond the base AR stuff, so I applaud your explanation and
>transparency. So I just thought it was worth noting that a little PR like
>this, aimed at developers, goes a long way in getting cynics like me on your
>side :)
>
>You guys are doing awesome work and I look forward to following your
>projects and the progress of your framework.
>
>Doug
>
>On Fri, May 1, 2009 at 11:34 PM, Clint Hannaford <clint at boffswana.com>wrote:
>
>>
>> Hi,
>>
>> Sorry for the late response, was on a short holiday after the launch to
>> recoup.
>>
>> Yeah, the AR component of releas3D is a commercial(developers) license of
>> ARToolkit/FLARToolkit.
>>
>> But there's a quite a lot more to our Releas3D package than just the AR
>> tracking component (which in reality is only a small part of a much larger
>> system), we've implemented a lot of character animation features and
>> workflows we've built up over the course of a few projects (Save Your
>> Sensible and Optus WhaleSong - see www.boffswana.com for links).
>>
>> It also includes a new Entity/Representation Manager framework that we hope
>> will assist in furthering our development of not only 3D/AR based projects,
>> but also game and interactive development, both 2D and 3D.  It aims to
>> modularize entity based game development, allowing us to use the components
>> across various projects, wether they are model/logic or visual
>> representations and effects.
>>
>> We've also implemented a means to record MovieClips as videos straight out
>> of the flash client (pretty apparent), which isn't as straight forward as it
>> sounds (with fluctuating papervision framerates and synching sounds and
>> such), and we've included this into our Releas3D package as well.
>>
>> We'll obviously be still working hard to improve on the AR tracking side of
>> things with our developer license of the ARToolkit, trying to reduce the
>> framerate overhead it brings to flash, as well as pushing what we can
>> achieve in Papervision.
>>
>> Regards,
>>
>> Clint.
>>
>>
>>
>> -----Original Message-----
>> From: papervision3d-bounces at osflash.org on behalf of Carlos Ulloa
>> Sent: Sun 4/26/2009 1:46 AM
>> To: papervision3d at osflash.org
>> Subject: Re: [Papervision3D] New Boffswana AR Project - Living Sasquatch
>>
>> That's great piece of work Clint.
>>
>> Can you tell us more about your AR engine? I love the idea of encoding
>> video, a lot of possibilities there.
>>
>> C4
>>
>>
>> On 24 Apr 2009, at 23:04, Clint Hannaford wrote:
>>
>> >
>> > Hi all,
>> >
>> > Here is the latest Augmented Reality project from Boffswana.
>> >
>> > http://www.boffswana.com/news/?p=605
>> >
>> > Jack Links Beef Jerky: Living Sasquatch (for ad agency Carmichael
>> > Lynch) allows users to bring a Sasquatch to life on their desk, and
>> > record short videos and post them to the gallery, share them with
>> > friends and post to various social sites.
>> >
>> > Enjoy.
>> >
>> > Clint Hannaford
>> >
>> >
>> >
>> >
>> >
>> >
>> >
>> >
>> > _______________________________________________
>> > Papervision3D mailing list
>> > Papervision3D at osflash.org
>> > http://osflash.org/mailman/listinfo/papervision3d_osflash.org
>>
>>
>>
>> _______________________________________________
>> Papervision3D mailing list
>> Papervision3D at osflash.org
>> http://osflash.org/mailman/listinfo/papervision3d_osflash.org
>>
>>
>-------------- next part --------------
>An HTML attachment was scrubbed...
>URL: <http://osflash.org/pipermail/papervision3d_osflash.org/attachments/20090503/3cf9de29/attachment-0001.html>
>
>------------------------------
>
>Message: 5
>Date: Sun, 3 May 2009 17:27:47 +0100
>From: Carlos Ulloa <carlos at papervision3d.org>
>Subject: Re: [Papervision3D] New Boffswana AR Project - Living
>	Sasquatch
>To: papervision3d at osflash.org
>Message-ID: <48A1CB9F-4548-4D74-B698-FC76555B08D2 at papervision3d.org>
>Content-Type: text/plain; charset="us-ascii"; Format="flowed";
>	DelSp="yes"
>
>Yeah, it sounds you guys are doing good progress on the AR front with  
>some innovative features and much needed optimization, great to see  
>how you've built upon your previous work on character animation like  
>save your sensible.
>
>C4
>
>
>On 3 May 2009, at 17:05, Doug McCune wrote:
>
>> Clint,
>>
>> I think this last email was extremely helpful in clarifying what you  
>> guys are doing above and beyond the typical AR experiments people  
>> are doing with FLARToolkit. When I first saw the sasquatch app I was  
>> impressed, but then reading the writeup I scoffed at the idea that  
>> you were simply licensing FLARToolkit and rebranding it as  
>> "Release3D" to monetize it (the lack of any mention of FLARToolkit  
>> or any license information to explain why this didn't fall under the  
>> GPL was the main reason I got an uneasy feeling). However, now  
>> reading this I have a much better understanding of what your  
>> framework does above and beyond the base AR stuff, so I applaud your  
>> explanation and transparency. So I just thought it was worth noting  
>> that a little PR like this, aimed at developers, goes a long way in  
>> getting cynics like me on your side :)
>>
>> You guys are doing awesome work and I look forward to following your  
>> projects and the progress of your framework.
>>
>> Doug
>>
>> On Fri, May 1, 2009 at 11:34 PM, Clint Hannaford  
>> <clint at boffswana.com> wrote:
>>
>> Hi,
>>
>> Sorry for the late response, was on a short holiday after the launch  
>> to recoup.
>>
>> Yeah, the AR component of releas3D is a commercial(developers)  
>> license of ARToolkit/FLARToolkit.
>>
>> But there's a quite a lot more to our Releas3D package than just the  
>> AR tracking component (which in reality is only a small part of a  
>> much larger system), we've implemented a lot of character animation  
>> features and workflows we've built up over the course of a few  
>> projects (Save Your Sensible and Optus WhaleSong - see www.boffswana.com 
>>  for links).
>>
>> It also includes a new Entity/Representation Manager framework that  
>> we hope will assist in furthering our development of not only 3D/AR  
>> based projects, but also game and interactive development, both 2D  
>> and 3D.  It aims to modularize entity based game development,  
>> allowing us to use the components across various projects, wether  
>> they are model/logic or visual representations and effects.
>>
>> We've also implemented a means to record MovieClips as videos  
>> straight out of the flash client (pretty apparent), which isn't as  
>> straight forward as it sounds (with fluctuating papervision  
>> framerates and synching sounds and such), and we've included this  
>> into our Releas3D package as well.
>>
>> We'll obviously be still working hard to improve on the AR tracking  
>> side of things with our developer license of the ARToolkit, trying  
>> to reduce the framerate overhead it brings to flash, as well as  
>> pushing what we can achieve in Papervision.
>>
>> Regards,
>>
>> Clint.
>>
>>
>>
>> -----Original Message-----
>> From: papervision3d-bounces at osflash.org on behalf of Carlos Ulloa
>> Sent: Sun 4/26/2009 1:46 AM
>> To: papervision3d at osflash.org
>> Subject: Re: [Papervision3D] New Boffswana AR Project - Living  
>> Sasquatch
>>
>> That's great piece of work Clint.
>>
>> Can you tell us more about your AR engine? I love the idea of encoding
>> video, a lot of possibilities there.
>>
>> C4
>>
>>
>> On 24 Apr 2009, at 23:04, Clint Hannaford wrote:
>>
>> >
>> > Hi all,
>> >
>> > Here is the latest Augmented Reality project from Boffswana.
>> >
>> > http://www.boffswana.com/news/?p=605
>> >
>> > Jack Links Beef Jerky: Living Sasquatch (for ad agency Carmichael
>> > Lynch) allows users to bring a Sasquatch to life on their desk, and
>> > record short videos and post them to the gallery, share them with
>> > friends and post to various social sites.
>> >
>> > Enjoy.
>> >
>> > Clint Hannaford
>> >
>> >
>> >
>> >
>> >
>> >
>> >
>> >
>> > _______________________________________________
>> > Papervision3D mailing list
>> > Papervision3D at osflash.org
>> > http://osflash.org/mailman/listinfo/papervision3d_osflash.org
>>
>>
>>
>> _______________________________________________
>> Papervision3D mailing list
>> Papervision3D at osflash.org
>> http://osflash.org/mailman/listinfo/papervision3d_osflash.org
>>
>>
>> _______________________________________________
>> Papervision3D mailing list
>> Papervision3D at osflash.org
>> http://osflash.org/mailman/listinfo/papervision3d_osflash.org
>
>-------------- next part --------------
>An HTML attachment was scrubbed...
>URL: <http://osflash.org/pipermail/papervision3d_osflash.org/attachments/20090503/80e3905e/attachment.html>
>
>------------------------------
>
>_______________________________________________
>Papervision3D mailing list
>Papervision3D at osflash.org
>http://osflash.org/mailman/listinfo/papervision3d_osflash.org
>
>
>End of Papervision3D Digest, Vol 32, Issue 8
>********************************************
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://osflash.org/pipermail/papervision3d_osflash.org/attachments/20090505/7f8d52e3/attachment-0001.html>


More information about the Papervision3D mailing list