Re: [Algorithms] Rotating camera to look at a pixel
Brought to you by:
vexxed72
From: Lennart D. <len...@ga...> - 2003-07-01 15:23:13
|
A pixel is just a projected point on the nearplane of the camera, so you'd just have to find the horizontal and vertical angle between the camera's forward-vector and the <vector from the camera's origin to the point-on-the-nearplane>. I guess... --- Lennart E. Denninger | Coder Lost Boys Games | Herengracht 410 | Amsterdam The Netherlands Tel: +31 (0)20 4272277 | Fax: +31 (0)20 4274040 | Le...@ga... Amsterdam | Barcelona | Berlin | London | Madrid | Paris | San Francisco | Warsaw | Zurich | www.games.lostboys.com --- The most likely way for the world to be destroyed, most experts agree, is by accident. That's where we come in; we're computer professionals. We cause accidents. ----- Original Message ----- From: "Josef Grahn" <d0...@na...> To: <gda...@li...> Sent: Tuesday, July 01, 2003 3:53 PM Subject: RE: [Algorithms] Rotating camera to look at a pixel > On Mon, 30 Jun 2003, Jon Watte wrote: > > [...] > > The problem with making the camera face "a pixel on the screen" is that > > you need the Z value at that point, else there's a whole (infinite) set of > > rotations that all face that pixel, depending on what the depth is assumed > > to be at that point. > > I am probably not following you right now, but what does the Z value > has to do with it? A screen space point (the pixel) represents a line > through that point in the image plane and the projection center of > the camera. As long as the projection center coincides with the > rotational center, which I assume it does, this line will always > correspond to a point in the image plane under rotation. It should > not be a problem to rotate the camera so that it faces the pixel, > regardless of the depth value. Still there would be infinitely many > such rotations since you can roll the camera, but not due to the fact > the pixel represents a 1D space, right? > > Regards, > Josef > > > > > > Cheers, > > > > / h+ > > > > > > > -----Original Message----- > > > From: gda...@li... > > > [mailto:gda...@li...]On Behalf Of Jason > > > Zisk > > > Sent: Monday, June 30, 2003 12:17 PM > > > To: gdalgo > > > Subject: [Algorithms] Rotating camera to look at a pixel > > > > > > > > > I'm having trouble coming up with a method to rotate the camera > > > to look at a > > > particular pixel on the screen. Basically I have an x, y point in screen > > > coordinates (this point may or may not actually be on the screen, it could > > > be negative for instance), and I want to rotate the camera to ensure that > > > pixel is in the center of view. Keep in mind I can only rotate > > > the camera. > > > > > > I'm doing some work with imposters and this seems to be the best way to go > > > about capturing the imposter image. I've got the screen-space > > > bounding box > > > around the object so its easy finding the center pixel, just the next step > > > of getting the camera to look at that pixel is eluding me. > > > > > > Thanks for any help, > > > > > > - Jason Zisk > > > - nFusion Interactive LLC > > > > > > > > > > > > > > > > > > ------------------------------------------------------- > > > This SF.Net email sponsored by: Free pre-built ASP.NET sites including > > > Data Reports, E-commerce, Portals, and Forums are available now. > > > Download today and enter to win an XBOX or Visual Studio .NET. > > > http://aspnet.click-url.com/go/psa00100006ave/direct;at.asp_061203_01/01 > > > _______________________________________________ > > > GDAlgorithms-list mailing list > > > GDA...@li... > > > https://lists.sourceforge.net/lists/listinfo/gdalgorithms-list > > > Archives: > > > http://sourceforge.net/mailarchive/forum.php?forum_id=6188 > > > > > > > > > > > ------------------------------------------------------- > > This SF.Net email sponsored by: Free pre-built ASP.NET sites including > > Data Reports, E-commerce, Portals, and Forums are available now. > > Download today and enter to win an XBOX or Visual Studio .NET. > > http://aspnet.click-url.com/go/psa00100006ave/direct;at.asp_061203_01/01 > > _______________________________________________ > > GDAlgorithms-list mailing list > > GDA...@li... > > https://lists.sourceforge.net/lists/listinfo/gdalgorithms-list > > Archives: > > http://sourceforge.net/mailarchive/forum.php?forum_ida88 > > > > > > ------------------------------------------------------- > This SF.Net email sponsored by: Free pre-built ASP.NET sites including > Data Reports, E-commerce, Portals, and Forums are available now. > Download today and enter to win an XBOX or Visual Studio .NET. > http://aspnet.click-url.com/go/psa00100006ave/direct;at.asp_061203_01/01 > _______________________________________________ > GDAlgorithms-list mailing list > GDA...@li... > https://lists.sourceforge.net/lists/listinfo/gdalgorithms-list > Archives: > http://sourceforge.net/mailarchive/forum.php?forum_id=6188 |