orthogonal

How to combine orthographic and perspective projections without using a render in image

jrs's picture

Hi All,

Does anyone know how I can combine orthographic and perspective projections without using a render in image?

I want to render things with a perspective projection and then be able to move them without them being distorted like in the top row of the attached pic which is done with a render in image. I'd like to avoid the RII if possible though for performance reasons and have been trying to achieve the same thing by setting the projection matrix. In the bottom row I tried to use the NI tools create and set matrix patches to set an orthographic projection for a 3D transform for the movement and then reset the matrix for the drawing of the cube and vice versa but no go.

After some reading of the Open GL doco it doesn't seem like this is possible but I thought I'd put it out there anyway.

Any help appreciated - James

P.S - You the awesome patches that come with FX Factory from Noise Industries to run the attached composition - http://www.noiseindustries.com/

Release: GL Tools, v20080226

Release Type: Beta
Version: 20080226
Release Notes

This beta's pretty rad. It adds a few new features, and a couple powerful patches.

The glOrtho patch now allows you to disable ortho mode (so you can switch from ortho to perspective mode without duplicating all the rendering in your composition).

But the coolest part of all is the GL Point Structure and GL Line Structure Patches. These patches allow you to render collections of points, line segments, or a continuous line strip without the overhead of an iterator.

Demonstration screenshot showing several points and line segments

Both patches take the same structure format: a substructure for each point, with an X, Y, and Z value. If the substructures are keyed, the keys "X", "Y", and "Z" are used, otherwise the 0th, 1st, and 2nd structure members are used to derive the coordinate. I'll probably upload some sample compositions to better demonstrate tomorrow morning.

Using JS to drive it is still slower than molasses, but it's an improvement none the less ;)

Before things get too crazy with structures, I'd like to have a plan in place to duplicate the functionality of vvvv's spreads (these are how this sort of stuff should be solved, not by more structure hacks....)