We closed this forum 18 June 2010. It has served us well since 2005 as the ALPHA forum did before it from 2002 to 2005. New discussions are ongoing at the new URL http://forum.processing.org. You'll need to sign up and get a new user account. We're sorry about that inconvenience, but we think it's better in the long run. The content on this forum will remain online.
IndexProgramming Questions & HelpOpenGL and 3D Libraries › full camera control for anaglyphs modelX/Y/Z
Page Index Toggle Pages: 1
full camera control for anaglyphs? modelX/Y/Z? (Read 828 times)
full camera control for anaglyphs? modelX/Y/Z?
Mar 21st, 2010, 5:06am
 
so i'm having much fun with anaglyphs lately.

here's a sketch to demonstrate the technique i'm using: http://pastebin.com/kz9qerzJ
(peasyCam needed)

the camera translation in pseudocode:
Code:

cam.saveRotations
objects.renderLeftEye
cam.rotateALittle
objects.renderRightEye
cam.loadRotations


it works pretty nicely, the perspective is correct. But i have to lock the cam rotation so it rotates only on one axis, else the transformation is off. There is no way to look up/down.

any ideas on how to implement proper camera movement, WASD+mouse for example?

of course i could translate/rotate the models instead of the cam, but there's another issue:
the pseudo-depth of field calculations need to know the distance between cam and object. I've tried using modelX/Y/Z after translations, but it was rather confusing/did not work.
Page Index Toggle Pages: 1