Camera Positioning

    Feb 16 2006 | 1:29 am
    I'm projecting a movie onto a nurbs, as a texture, in order to do some distortions. The movie is at 840x480, and the window that I'm recording the openGL from is also at 840x480 (no problems with the recording process itself). The nurbs is basically a plane, which has its inner control points moved around slightly, while the outer edges stay perfectly straight. It's also scaled to the same aspect ration as the texture and the window (1.75:1).
    I want to be able to automatically set the camera position so that the nurbs plane completely fills the window (as if the texture was scaled exactly the same as it would be just playing directly from into a 840x480 window), without over or undershooting. To date, I've been able to eyeball this well enough using the lens_angle message to, but there has to be a tighter method... any suggestions?

    • Feb 16 2006 | 1:43 am
      [ @ortho 2] uses an orthographic projection which doesn't try to account for lens_angle. This will remove any scaling due to the perspective transform based on camera distance and lens angle.
    • Feb 16 2006 | 1:52 am
      Thanks! Sending the message [scale 3.5 2. 0.] with [ortho 2] definitely looks right.