|
roco, Newbie
Posted: 20 April 2012 10:17 AM Total Posts: 8
Hello everyone.
I am pretty new to away3D and 3D engines in general. I would like to achieve the effect described in the attached image. Can anyone give me an example on how to do it as I’m struggling for a few hours trying to change camera matrix or creating a FreeMatrixLens with no success.
One solution that comes to mind is to make my view a lot bigger and just show the lower part of it. But that seems like a not so efficient hack.
Thanks in advance!
|
roco, Newbie
Posted: 23 April 2012 08:32 AM Total Posts: 8
[ # 1 ]
I’ve tried the solution with increasing the view height and it kinda works. The problem is everything changes dimensions. And I need to realign everything.
That will really take a long time and I’d prefer to somehow change the camera projection point and keep the view the same dimensions as the scene.
Anyone able to help? Anyone with some knowledge about how the camera matrix works, I’m not even able to change it.
|
roco, Newbie
Posted: 26 April 2012 08:56 AM Total Posts: 8
[ # 2 ]
So, no one can give me a hint on how to achieve this? :( It’s not possible? Do I need to explain what I want in more detail?
I hope someone able to give me an answer sees this thread. Thanks!
|
roco, Newbie
Posted: 27 April 2012 04:48 PM Total Posts: 8
[ # 3 ]
I will never lose hope!
|
|
modjke, Newbie
Posted: 03 October 2012 08:56 AM Total Posts: 2
[ # 5 ]
Solution
For off-center perspective projection you can use my class as Lens for your camera.
http://pastebin.com/NgA8ZH0S
If you got any questions or find out any bugs post them here, please :)
|
bmoss, Newbie
Posted: 08 October 2012 02:59 PM Total Posts: 4
[ # 6 ]
modjke:
Your class is allmost correct.
In line
var yScale:Number = (1.0/Math.tan( (fieldOfView*Math.PI/360)/2.0));
you forgot count in radians. But my fix doesnt working well too, because field of view in my case was 74.5 and correct value was 68.5 diagonal (62.5 horizontal) from 3ds max
|
modjke, Newbie
Posted: 08 October 2012 03:14 PM Total Posts: 2
[ # 7 ]
bmoss, you are right, but your fix is not.
Correct line is
var yScale:Number = 1.0/Math.tan(_fieldOfView*Math.PI/360);
Updated my pastebin, thx for th reply!
|
bmoss, Newbie
Posted: 23 November 2012 03:17 PM Total Posts: 4
[ # 8 ]
I placed updated version here: http://pastebin.com/51aBfCmA
This working in Away3D 4.1.0.
Temporary fixed bug with raycast project/unproject. If projection center was moved. Part of scene was not clickeable.
|
SharpEdge, Member
Posted: 07 December 2012 12:18 PM Total Posts: 94
[ # 9 ]
i’m trying to implement this into stereo system to get a correct off-axis projection but i can’t find correct values for “lens.left” parameter.
some advice?
|