[Papervision3D] Papervision3D Digest, Vol 26, Issue 18

George Profenza orgicus at gmail.com
Tue Nov 4 13:47:57 PST 2008


Thanks Seb, Steve,

I'm pretty embarrassed about the particlefield thing.

I had loads of classes for a larger project and I forgot I had a class
called Particles
which came in conflict with the PV3D Particles class.

Thanks for the hints though, they helped me figure out that something wasn't
in the right place.

Any idea on how to control an MD2 by the way ?

Thanks,
George


On Tue, Nov 4, 2008 at 8:35 PM, <papervision3d-request at osflash.org> wrote:

> 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: animations & particle field question (Steve D)
>   2. Re: UV mapping Seams (ajrich01)
>   3. Re: Why is my collada model intersecting itself? No
>      interactivity either! (John Brookes)
>
>
> ----------------------------------------------------------------------
>
> Message: 1
> Date: Tue, 4 Nov 2008 12:03:20 -0800
> From: "Steve D" <kruass at gmail.com>
> Subject: Re: [Papervision3D] animations & particle field question
> To: papervision3d at osflash.org
> Message-ID:
>        <f66fee040811041203i30f24d76r2c8d230ec57de422 at mail.gmail.com>
> Content-Type: text/plain; charset="iso-8859-1"
>
> I can't see anything wrong with that code.  I'd guess that maybe there is
> some error with your papervision installation, and your compiler is
> actually
> looking at an old version of papervision.
>
> I'm not sure how changing his base document to a BasicView would help with
> the error.  He is clearly trying to stuff a ParticleField object into the
> addChild method of a Scene3D (which should work) and getting an error while
> doing it.
>
> I'm curious what the solution to this is.. Let us know if you figure
> anything out.
>
>
>
> On Tue, Nov 4, 2008 at 7:20 AM, Seb Lee-Delisle <sebstar55 at gmail.com>
> wrote:
>
> > You should make your document class extend BasicView, not Sprite.
> >
> > Hope this helps!
> >
> > Seb
> >
> >
> > On Tue, Nov 4, 2008 at 2:42 PM, George Profenza <orgicus at gmail.com>
> wrote:
> > > Hi,
> > >
> > > Thanks for the help Seb.
> > >
> > > The sample code looks like this:
> > >
> > > package{
> > >
> > >     import flash.display.Sprite;
> > >     import flash.events.Event;
> > >
> > >     import org.papervision3d.view.Viewport3D;
> > >     import org.papervision3d.scenes.Scene3D;
> > >     import org.papervision3d.cameras.Camera3D;
> > >     import org.papervision3d.materials.special.ParticleMaterial;
> > >     import org.papervision3d.objects.special.ParticleField;
> > >     import org.papervision3d.render.BasicRenderEngine;
> > >
> > >     public class PV3DParticleField extends Sprite
> > >     {
> > >         private var viewport:            Viewport3D;
> > >         private var scene:                Scene3D;
> > >         private var camera:                Camera3D;
> > >         private var particleField:        ParticleField;
> > >         private var particleMaterial:    ParticleMaterial;
> > >         private var renderer:            BasicRenderEngine;
> > >
> > >         public function PV3DParticleField():void
> > >         {
> > >
> > >             viewport = new Viewport3D(550, 400, false, true);
> > >             addChild(viewport);
> > >
> > >             scene = new Scene3D();
> > >             camera = new Camera3D();
> > >             renderer = new BasicRenderEngine();
> > >
> > >             particleMaterial = new ParticleMaterial(0x000000, 1);
> > >             particleMaterial.doubleSided = true;
> > >             particleField = new ParticleField(particleMaterial, 6000,
> > 500,
> > > 500, 500);
> > >             scene.addChild(particleField);
> > >
> > >             addEventListener(Event.ENTER_FRAME, onEnterFrame);
> > >
> > >             function onEnterFrame(e:Event):void
> > >             {
> > >                 particleField.rotationY += 2;
> > >                 renderer.renderScene(scene, camera, viewport);
> > >             }
> > >         }
> > >     }
> > > }
> > >
> > > And the errors look like this:
> > >
> > > PV3DParticleField.as:35: 1067: Implicit coercion of a value of type
> > > org.papervision3d.objects.special:ParticleField to an unrelated type
> > > org.papervision3d.objects:DisplayObject3D.
> > > PV3DParticleField.as:41: 1119: Access of possibly undefined property
> > > rotationY through a reference with static type
> > > org.papervision3d.objects.special:ParticleField.
> > > PV3DParticleField.as:41: 1119: Access of possibly undefined property
> > > rotationY through a reference with static type
> > > org.papervision3d.objects.special:ParticleField.
> > >
> > > I'm using Papervision3D Public Beta 2.0 - Great White (20.08.25).
> > > I've checked the repository and ParticleField looks pretty much the
> same
> > as
> > > the one on my machine.
> > >
> > > Any hints on how to control md2 animations ?
> > >
> > > Thanks,
> > > George
> > >
> > > On Mon, Nov 3, 2008 at 12:35 PM, George Profenza <orgicus at gmail.com>
> > wrote:
> > >>
> > >> Hi,
> > >>
> > >> A couple of questions if you have the time:
> > >>  - Does anyone have any idea what class to use in order to control MD2
> > >> animations ? If so, which ?
> > >>  - How do you use the ParticleField in PV3D 2.0 beta ?
> > >>
> > >> I've seen some examples
> > >> online(
> http://content.madvertices.com/articles/PV3DTraining/default.htm
> > ),
> > >> they seemed pretty simple , but they don't work for me.
> > >> I get this error:
> > >>
> > >> Implicit coercion of a value of type
> > >> org.papervision3d.objects.special:ParticleField to an unrelated type
> > >> org.papervision3d.objects:DisplayObject3D.
> > >>
> > >> I've looked at ParticleField and it extends Particles, which is in the
> > >> geom package...so I reckon it cannot be rendered as it is not a
> > >> DisplayObject3D
> > >>
> > >> Any help, hint will do!
> > >>
> > >> Thanks,
> > >> George
> > >>
> > >>
> > >>
> > >> --
> > >> George Profenza,
> > >> Student, Certified Flash Designer & Developer
> > >> -------------------------------------------------------------------
> > >> m: 07957916404
> > >> -------------------------------------------------------------------
> > >> experiments: http://flash.quietroot.org/labs/
> > >> blog: http://tomaterial.blogspot.com/
> > >> works: http://flash.quietroot.org/
> > >
> > >
> > >
> > > --
> > > George Profenza,
> > > Student, Certified Flash Designer & Developer
> > > -------------------------------------------------------------------
> > > m: 07957916404
> > > -------------------------------------------------------------------
> > > experiments: http://flash.quietroot.org/labs/
> > > blog: http://tomaterial.blogspot.com/
> > > works: http://flash.quietroot.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/20081104/412db244/attachment-0001.html
> >
>
> ------------------------------
>
> Message: 2
> Date: Tue, 4 Nov 2008 12:07:38 -0800 (PST)
> From: ajrich01 <ajrich01 at gmail.com>
> Subject: Re: [Papervision3D] UV mapping Seams
> To: papervision3D at osflash.org
> Message-ID: <20330014.post at talk.nabble.com>
> Content-Type: text/plain; charset=us-ascii
>
>
> Thanks for the input, I am not sure where to begin with investigating
> shaders
> as a possible source.  Also if a precision error is the cause any clues on
> how I might solve it.  To help I have included a few screenshots of the
> seams.
> http://www.nabble.com/file/p20330014/seams-close.jpg
> http://www.nabble.com/file/p20330014/seams-far.jpg
>
> Andy Zupko wrote:
> >
> > Seams are usually only a problem when using shaders - but i could see
> > how making a grid could cause some precision errors within the flash
> > player.  Basically, flash has some rounding errors do to int size.
> > One thing you could try is cacheAsBitmap for your material.  I've
> > noticed that helps at times.
> >
> > Might also help if you could post a demo
> >
> >
> > On Nov 3, 2008, at 11:04 AM, John Brookes wrote:
> >
> >> Your problem sounds similar to this
> >> http://www.nabble.com/Disappearing-triangles-and-edges-td20171154.html
> >> May help you find a solution.
> >>
> >> 2008/11/3 Adam Richardson <ajrich01 at gmail.com>
> >> I am sorta new to 3D graphics and programming but I am not using an
> >> outside program at all for my UV mapping.  I am iterating through
> >> all of the visible triangles and applying the appropriate material
> >> (image tile) for that triangle.  I have a material for all of the
> >> images and they all  have a maxU and maxV value equal to the number
> >> of image tiles there are in the x and y direction respectively.  I
> >> hope this clears it up a little, I don't think that touching up the
> >> seams in photoshop is something I can do.  Thanks again for any help.
> >>
> >>
> >> On Sun, Nov 2, 2008 at 11:36 PM, Vic Cekvenich
> >> <vcekvenich at gmail.com> wrote:
> >> i am not sure if this would help you, but in 3D max you can 1st wrap
> >> the image across primitive sphere (or not primitive), and then
> >> unwrap it, w/ all the "trinagles" show and then use that as layer in
> >> photo shop to fix anything.
> >> .V
> >>
> >>
> >> On Sun, Nov 2, 2008 at 7:08 PM, Adam Richardson <ajrich01 at gmail.com>
> >> wrote:
> >> any input on this would be much appreciated.
> >>
> >>
> >> On Fri, Oct 31, 2008 at 9:21 AM, ajrich01 <ajrich01 at gmail.com> wrote:
> >>
> >> I am having a rather frustrating problem with uv mapping and tiling
> >> images
> >> across the sphere primitive.  Basically, I am trying to take a large
> >> resolution equirectangular image and divide it into tiles of an
> >> equal size
> >> then apply these tiles as needed to the sphere primitive.  I have
> >> all of
> >> this figured out the only problem is that when I do this there is a
> >> small
> >> black line between the tiles.  I am fairly certain that is line is
> >> not part
> >> of the image tiles.  Is there an option within papervision to remove
> >> this?
> >> Any suggestions would be much appreciated.
> >> --
> >> View this message in context:
> >> http://www.nabble.com/UV-mapping-Seams-tp20266926p20266926.html
> >> Sent from the Papervision3D mailing list archive at Nabble.com.
> >>
> >>
> >> _______________________________________________
> >> 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
> >>
> >>
> >>
> >> _______________________________________________
> >> 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
> >
> >
>
> --
> View this message in context:
> http://www.nabble.com/UV-mapping-Seams-tp20266926p20330014.html
> Sent from the Papervision3D mailing list archive at Nabble.com.
>
>
>
>
> ------------------------------
>
> Message: 3
> Date: Tue, 4 Nov 2008 20:27:19 +0000
> From: "John Brookes" <jbpv3d at googlemail.com>
> Subject: Re: [Papervision3D] Why is my collada model intersecting
>        itself? No      interactivity either!
> To: papervision3d at osflash.org
> Message-ID:
>        <3522fe140811041227t44025135m11d3ac03a3977892 at mail.gmail.com>
> Content-Type: text/plain; charset="utf-8"
>
> Make sure the viewport is interactive
> Make sure you have set the materials interactive
>
> Then for the interactivity you need to get the children of the dae model
> and
> set the eventlistener to that. If the base is the green box and the buttons
> are children of the box then
>
> var leftButton:displayObject3D
>
> =daeModel.getChildByName('COLLADA_Scene').getChildByName('Base').getChildByName('leftButton');
> leftButton.addEventListener(InteractiveScene3DEvent.OBJECT_PRESS, bPress);
>
>  The Hypergraph panel in maya is a good place to look for how the
> scene/children/parents are setup. Also when you run the swf you should see
> the names of the objects
> eg
> INFO:Base do3d
> INFO:leftbutton do3d
> ..etc
>
> As chris says up the triangle count for the base/box/panel whatever its
> called.
> You can also do something like this
> daeModel.getChildByName('COLLADA_Scene').getChildByName('Base').meshSort=
> DisplayObject3D.MESH_SORT_FAR;
>
>
> 2008/11/4 Chris Harback <charback at makaimedia.com>
>
> > For the first problem, you may want to try upping the number of faces for
> > the top of the drum machine-- I'm guessing that right now you just have
> one
> > face that is the top of the larger object. This usually happens to me
> when
> > I'm working with two low poly primitives, and I've not run into this
> issue
> > so far with a Collada, but the behavior is identical.
> >
> > As for the listener, I'm not sure. In my projects I usually use an
> overlay
> > of an invisible dummy object using a MovieMaterial as the interactivity
> > target (it's possible I ran into this same problem at some point, and
> that's
> > why I do it this way-- I can't recall), but the code looks sound.
> >
> > Thanks,
> > --ChrisH
> >
> >
> > -----Original Message-----
> > From: papervision3d-bounces at osflash.org [mailto:
> > papervision3d-bounces at osflash.org] On Behalf Of Kevin Burke
> > Sent: Tuesday, November 04, 2008 7:15 AM
> > To: papervision3D at osflash.org
> > Subject: [Papervision3D] Why is my collada model intersecting itself? No
> > interactivity either!
> >
> >
> > I have a Collada model of a drum machine that has some buttons. The
> buttons
> > don't intersect the body, but one plane of the body overlaps the buttons.
> > Why is this happening? Check it out in this movie:
> > http://www.nomadicsun.com/pv3d/kbd.html Overlap
> >
> > This is what my polygons look like in Maya:
> > http://www.nomadicsun.com/pv3d/step.jpg Polygons
> >
> > Also, I'm unable to trace a successful object click and I'm unsure why. I
> > don't add the listener until the dae is done loading...
> >
> > dae.addEventListener(FileLoadEvent.LOAD_COMPLETE,
> myOnLoadCompleteHandler);
> >
> > function myOnLoadCompleteHandler(event:FileLoadEvent):void
> > {
> >        trace("load complete");
> >        dae.addEventListener(InteractiveScene3DEvent.OBJECT_CLICK,
> > objectClickHandler);
> > }
> >
> > function objectClickHandler(event:InteractiveScene3DEvent):void
> > {
> >        trace("Click!");
> > }
> > --
> > View this message in context:
> >
> http://www.nabble.com/Why-is-my-collada-model-intersecting-itself--No-interactivity-either%21-tp20324253p20324253.html
> > Sent from the Papervision3D mailing list archive at Nabble.com.
> >
> >
> > _______________________________________________
> > 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/20081104/58a3f6f3/attachment.html
> >
>
> ------------------------------
>
> _______________________________________________
> Papervision3D mailing list
> Papervision3D at osflash.org
> http://osflash.org/mailman/listinfo/papervision3d_osflash.org
>
>
> End of Papervision3D Digest, Vol 26, Issue 18
> *********************************************
>



-- 
George Profenza,
Student, Certified Flash Designer & Developer
-------------------------------------------------------------------
m: 07957916404
-------------------------------------------------------------------
experiments: http://flash.quietroot.org/labs/
blog: http://tomaterial.blogspot.com/
works: http://flash.quietroot.org/
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://osflash.org/pipermail/papervision3d_osflash.org/attachments/20081104/d42a101b/attachment-0001.html>


More information about the Papervision3D mailing list