[Papervision3D] Lightest primitive for 3d to 2d
Craig Soich
csoich at thoughtformdesign.com
Tue Dec 9 07:33:55 PST 2008
I went a step further, and had my 2D sprites track Vertex3Ds. you can
access the
targetObject.vertex3DInstance.x,
targetObject.vertex3DInstance.y
of the vertex3Ds as screen coordinates, the
targetObject.vertex3DInstance.z, where you can calculate the scaling
from this:
scaling=(cam.focus*cam.zoom) / (cam.focus +
targetObject.vertex3DInstance.z);
and you can sample
targetObject.vertex3DInstance.visible,
which is a quick flag that tells you if the point is in front of the
camera.
push the Vertex3Ds into an array, push the array into a vertices3D
object, add that vertices3D to the view, and you have anchors that you
can push around in 3D.
Craig Soich
thoughtform
Design solutions beyond words
ThoughtForm Inc.
3700 South Water Street
Suite 300
Pittsburgh, PA 15203
412.488.8600
ThoughtFormDesign.com
Founded in 1980 as Agnew Moyer Smith Inc.
On Dec 8, 2008, at 7:05 AM, Christian Giordano wrote:
> That makes sense :)
>
> Thanks, chr
>
>
>
> On Mon, Dec 8, 2008 at 10:29 AM, zworp <jan at devmonkey.se> wrote:
>>
>> just use DisplayObject3D instead of Sphere, that should be faster
>>
>>
>>
>>
>> Christian Giordano-3 wrote:
>>>
>>> I would like to map a 2d layer to 3d points. To do so I added to the
>>> 3d scene some spheres (I couldn't find any view represented by a
>>> point) and on render I get their position in 2d. It is very
>>> straight
>>> forward and what I would like to do is to use the less cpu as
>>> possible
>>> to keep those 3d points in the 3d world. I was hoping that if I set
>>> the sphere as not visible they would still have the position updated
>>> but it doesn't seem so. So I'm making them the smallest and with the
>>> few triangles as possible. Is there another way you would recommend?
>>>
>>> Thanks a lot, chr
>>>
>>> _______________________________________________
>>> Papervision3D mailing list
>>> Papervision3D at osflash.org
>>> http://osflash.org/mailman/listinfo/papervision3d_osflash.org
>>>
>>>
>>
>> --
>> View this message in context: http://www.nabble.com/Lightest-primitive-for-3d-to-2d-tp20892420p20892853.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/20081209/e373b021/attachment.html>
More information about the Papervision3D
mailing list