[Papervision3D] Project a material on a 3D object using a constant 2D POV

Dr.Z dr.zaius at gmail.com
Thu Apr 24 07:49:32 PDT 2008


Thanks Rob, I'll re-migrate my project back to away3d and see if I can get
it working. I stopped using away3d because I was having issues with using
shading materials (flat and phong), but now on PV3d I can't get some shaders
working either :)

I will report back later how everything goes.

On Thu, Apr 24, 2008 at 10:01 AM, Rob Bateman <rob.bateman at gmail.com> wrote:

> As i understand it, Tim (Knip) is looking at implementing projected
> materials in an upcoming version of PV3D
>
> for those of you who want the feature now, The Away3d engine can provide
> it! You need to use a TransformBitmapMaterial, and set the projectionVector
> property to a Number3D object representing the axis of projection. The
> resulting texture renders as fast as regular uv textures.
>
>
> http://away3d.googlecode.com/svn/trunk/src/away3d/materials/TransformBitmapMaterial.as
>
>
> a demo explaining this technique will soon be available from away3d.com
>
>
> atb
>
>
> Rob
>
>
>
>
>
>
> On Thu, Apr 24, 2008 at 10:44 AM, Cristi Vrabete <vrabete at yahoo.com>
> wrote:
>
>> I have a similar semisolved issue, but I don't like the solution, I have
>> the feeling some of the more experienced guys in how 3D actually gets
>> rendered would have done this way lot better than me:
>>
>> I want to project an image to a .dae object that spins, so that when it's
>> projected it kind of looks the same, but when it spins, it moves away,
>> distorted, naturally. It's actually 99% like "laser-ing" in a projecting
>> movie on a surface, removing the projection and leaving the object material
>> "laser-ed".
>>
>> The way I do this is awful and 80-90% accurate only: I parse the
>> projectable image pixel by pixel, see where the pixel hitTests my model
>> material and draw a pixel at those coordinates (actually I use a painful
>> drawing algorithm, because 4 adiacent pixels can project in the same spot or
>> many pixels apart, leaving me with a skattered image).
>>
>> However, this solution does the trick for my needs, but:
>> 1. it's extremely slow, imagine a 500x500 image parsed like that, tested
>> for hitTest on every pixel, drawing again every pixel and so on.
>> 2. the resulting image is kind of blurry, depending on the object zoom,
>> overdistorted on tight vertex areas, and "broken" on edges if it gets
>> projected over the .dae model exactly where the movie material gets to
>> reunite its edges.
>>
>> http://www.checkout.ro/projectiontest/
>>
>> click on the sphere and wait for 2-5 minutes, click dismiss all if the
>> case, it's not the optimized version, but you can see my point. it looks
>> like it gets stuck, but optimized and divided into smaller calculation
>> parts, it takes about 1 minute to complete (still too long)
>>
>> If anyone has a clue on how to achieve this exact same effect the "smart"
>> way, please let me know, I'm clueless on triangle bitmap calculations and
>> that sort...
>>
>> Thank you,
>> Cristi
>>
>>
>>
>> --- On Wed, 4/23/08, Tom Richardson <kwarismian at gmail.com> wrote:
>>
>> > From: Tom Richardson <kwarismian at gmail.com>
>> > Subject: Re: [Papervision3D] Project a material on a 3D object using a
>> constant 2D POV
>> > To: papervision3d at osflash.org
>> > Date: Wednesday, April 23, 2008, 10:34 PM
>> > Because it sounds like you want to do some sort of 2d effect
>> > on a 3d scene
>> > (in other words, you are attempting to manipulate the
>> > "results" of your 3d
>> > projection, rather than include something 2d IN a 3d
>> > projection), it leaves
>> > you with two major options-
>> >
>> > 1)Use the current effects branch, and compound your effects
>> > that way, using
>> > render layers.
>> >
>> > 2)Apply some sort of effect to the end result of the
>> > viewport.  Much like
>> > everything else display related in flash, PV3D scenes
>> > eventually boil down
>> > to a single movieclip.  Do some sort of effect/modification
>> > on this "end
>> > result" movieclip and you should be able to get your
>> > effect.
>> >
>> > If I have a little time I'll make an example of option
>> > 2 tomorrow.  Option
>> > one is fairly well illustrated in Andy Zupko's
>> > "Borg Cube" effects branch
>> > example tutorial.  You'll just need to start a few
>> > steps short of the end
>> > result.
>> >
>> > Good luck!
>> >
>> > On Wed, Apr 23, 2008 at 10:17 PM, EricJB
>> > <dr.zaius at gmail.com> wrote:
>> >
>> > > I have been searching for a way to project my
>> > movieMaterial onto the
>> > > object so that no matter how the object rotates, the
>> > material always keeps
>> > > its coordinates with respect to the camera or view.
>> > I've been looking into
>> > > manipulating the uv coordinates and playing with the
>> > face3D object, but I'm
>> > > coming up short with everything I try. Perhaps the
>> > material can be applied
>> > > to the view itself and only the pixels where the do3d
>> > are will show the
>> > > material... anyone have any suggestions or ideas?
>> > I'm trying to create a
>> > > hologram like effect, so I would always want the
>> > horizontal fluttering lines
>> > > of the movieMaterial to stay horizontal. I hope I
>> > described it well enough,
>> > > my brain is melting dealing with this lately :) Thanks
>> > for the help. I've
>> > > been scouring the forum but I'm not getting
>> > anywhere. -Eric
>> > > ------------------------------
>> > > View this message in context: Project a material on a
>> > 3D object using a
>> > > constant 2D
>> > POV<
>> http://www.nabble.com/Project-a-material-on-a-3D-object-using-a-constant-2D-POV-tp16838443p16838443.html
>> >
>> > > Sent from the Papervision3D mailing list
>> > archive<http://www.nabble.com/Papervision3D-f22855.html>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
>>
>>
>>
>>  ____________________________________________________________________________________
>> Be a better friend, newshound, and
>> know-it-all with Yahoo! Mobile.  Try it now.
>> http://mobile.yahoo.com/;_ylt=Ahu06i62sR8HDtDypao8Wcj9tAcJ
>>
>> _______________________________________________
>> Papervision3D mailing list
>> Papervision3D at osflash.org
>> http://osflash.org/mailman/listinfo/papervision3d_osflash.org
>>
>
>
>
> --
> Rob Bateman
> Flash Development & Consultancy
>
> rob.bateman at gmail.com
> www.infiniteturtles.co.uk
> www.away3d.com
> _______________________________________________
> 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/20080424/0294eac1/attachment-0001.html 


More information about the Papervision3D mailing list