|
calculation of a shear transform according to off-axis point of viewHello, I experiment some openGL fundamentals operations like transformation matrices, frustum, off-axis rendering, head-tracking, etc... not for a specific project, just working around. My goal is to find correct 2D points of 1024 Perspective patch (4 corners) to make the appropriate shear according to the position of a camera (or eye) in real space, in relation to screen size / position / rotation. My target object is a square, I want to see a regular square from "any" point of view, at constant apparent size. I would like to know if the following reasoning is correct :
and
As a first exercise, I've made the attached composition (with comments) + a top view of the same world. It gives some results, seems to work, but it may be not accurate. I really would like your opinion. Any advice to achieve this properly ? Something with matrices only, I suppose 1024 perspective (thanks frz!) can be replaced by a appropriate transform matrix ? Thanks by advance !
|
I thought the default horizontal fov was 90° - you can use the "NI OpenGL Create Matrix" and "NI OpenGL Set Matrix" patches to view and and set the projection and modelview matrix's
Thanks jrs, i'll try this asap. ++