How’s this view projection being done?

Software: Away3D 4.x

julespong, Member
Posted: 10 August 2011 11:10 PM   Total Posts: 53

Ok, so I was checking out Johnny Lee Chung’s video:

http://www.youtube.com/watch?v=Jd3-eiid-Uw

Great stuff. But I’m curious, how is he doing his view projection so that the Planes that define his “room” look like they originate from the corners of the viewport. The origins of the planes seem to be fixed to the corners of the viewport. I’ve been thinking about this for a while, and I can’t really come up with a solid answer. Does anyone know how to pull a similar effect off in Away3D 4?

   

Avatar
Choons, Sr. Member
Posted: 11 August 2011 12:05 AM   Total Posts: 281   [ # 1 ]

that’s way cool. Wouldn’t just aligning the planes with the z-axis do that naturally? The perspective is built in, so if you have planes that run well past the camera position along z coming out of the screen you should be able to move/angle them without losing that appearance of being anchored to viewport edges.

   

julespong, Member
Posted: 11 August 2011 03:51 AM   Total Posts: 53   [ # 2 ]

Well, I think what’s happening is that he’s manipulating the perspective without moving the camera. If you notice, the planes that form his “room” never get clipped. I’ve been trying for a while now to get the same effect. But can’t seem to find the right approach.

Notice that his vanishing point changes, yes the origin of the planes never changes. That tells me he’s manipulating the perspective projection point and keeping his camera in the same place.

Maybe I’m making this harder than it is… Does anyone know how to manipulate the perspective projection point?

   

julespong, Member
Posted: 11 August 2011 05:08 AM   Total Posts: 53   [ # 3 ]

So yeah, last thoughts before bed:

I don’t think you can move or rotate the camera to pull of what he’s doing. This post seems to be on the right track:

http://groups.google.com/group/away3d-dev/browse_thread/thread/d8b888e9b867db9d

So I think it has something to do with using non-symmetrical frustums.

   

julespong, Member
Posted: 11 August 2011 05:30 AM   Total Posts: 53   [ # 4 ]

Found this tidbit:

http://help.adobe.com/en_US/ActionScript/3.0_ProgrammingAS3/WSCE716DAD-9364-464f-AFE9-8E578525AD54.html

If you copy that code sample and run it in the Flash IDE that’s exactly what I’m trying to do… but within Away3D 4.

How do I manipulate the transform.perspectiveProjection.projectionCenter of the camera????

   

Animaleante, Newbie
Posted: 11 August 2011 08:41 PM   Total Posts: 5   [ # 5 ]

Was also looking for this today. I tried recreating Johnny Lee’s project, but I can’t seem to understand how I would go for applying the projection matrices, or where I would go. There was a guy back in the day that had done a port to PaperVision3D (http://www.gerbster.nl/2008/11/desktop-vr-in-flash/) but he vanished and never posted the source :(

   

julespong, Member
Posted: 11 August 2011 09:30 PM   Total Posts: 53   [ # 6 ]

Yeah, I’m trying to figure out the same thing now. I contacted one of the guys who mentioned this approach on the old broomstick forums and he pointed me to a book on the subject. Just picked it up on Kindle Cloud… will post when I find out more. Maybe this should go on the feature request list. Would be cool if it was part of the API.

FYI: The book was “Mathematics for 3D Game Programming and Computer Graphics” by Eric Lengyel

   

Animaleante, Newbie
Posted: 12 August 2011 07:20 PM   Total Posts: 5   [ # 7 ]

I managed to reproduce the Anamorphic Perspective effect on PaperVision3D. But I’m having some trouble reproducing it to Away3D, would you like me to send my project to see if you can port it?

   

julespong, Member
Posted: 12 August 2011 09:51 PM   Total Posts: 53   [ # 8 ]

Yeah, that would be rad. Are you able to send it to me via the forum?

   

Animaleante, Newbie
Posted: 13 August 2011 01:12 AM   Total Posts: 5   [ # 9 ]

Sure my friend, here it is: http://www.4shared.com/file/u2E964Xd/Headtracking_Holo_PaperVision3.html

   

Animaleante, Newbie
Posted: 21 August 2011 10:51 PM   Total Posts: 5   [ # 10 ]

Here is the away3D version. If you guys could give me some feedback. ‘Cause I worked on this for a week trying to apply matrices and all, only to in the end go for a kinda hacked way^^ But I don’t know if this is giving the same effect as Johnny’s approach:
http://www.4shared.com/file/GK_cyFhR/Headtracking_Holo_Away3D.html

   
   

X

Away3D Forum

Member Login

Username

Password

Remember_me



X