Camera Positioning

Feb 16, 2006 at 1:29am

Camera Positioning

I’m projecting a movie onto a nurbs, as a texture, in order to do some distortions. The movie is at 840×480, and the window that I’m recording the openGL from is also at 840×480 (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 jit.qt.movie into a 840×480 window), without over or undershooting. To date, I’ve been able to eyeball this well enough using the lens_angle message to jit.gl.render, but there has to be a tighter method… any suggestions?

#24447
Feb 16, 2006 at 1:43am

[jit.gl.render @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.

-Joshua

#70676
Feb 16, 2006 at 1:52am

Thanks! Sending jit.gl.nurbs the message [scale 3.5 2. 0.] with [ortho 2] definitely looks right.

#70677

You must be logged in to reply to this topic.