Im working on an image-based-rendering project.
Im projecting the current screen image using gluUnproject to get the 3D coordinates. Im then changing viewpoint and using gluProject to project the points back onto screen pixels. A lot of points are being mapped to the same pixel.
To test it I didn’t change the viewpoint at all. The resulting image contained a lot of black pixels (background colour) so it does appear that in many cases several 3D points are being mapped to only a single pixel. This is without changing the viewpoint. I would have expected an identical image to be produced (projecting points, then doing the opposite should give the initial image). Anyone experienced similar or have any suggestions.
One of the exaplantions could be that gluProject returns window X,Y co-ords. But these values are floats. Im rounding up/down to nearest integer to get screen pixel (also of course changing the Y co-ordinate to OPenGL Y co-ordinate). Is there any solution?
[This message has been edited by rangers99 (edited 03-05-2002).]