Original Post
Greetings, all. I am currently getting my head around the use of 'impostors'. There appears to be some confusion about the use of 'impostors' and 'billboards/billboarding'. As I understand it (correct me if I'm wrong), 'billboarding' involves aligning some geometry (generally a quad) to some axis or point - generally used to ensure said quad is 'facing' the screen. 'Impostors', on the other hand, involve replacing rendered geometry with a quad, textured in such a way as to provide the illusion of said rendered geometry. This involves rendering the geometry to a texture (via a Pbuffer or glCopyTex(Sub)Image2D), then positioning a textured quad in place of the geometry. The texture is updated as needed to maintain the illusion. Firstly, is my understanding of the two techniques correct? Secondly, during implementation, I hit the problem of -how- to 'position a textured quad'. I attempted the use of a screen-aligned billboard, but the texture coordinates were problematic - I could not figure out a way to generate the texcoords to maintain the illusion. The results were always warped / skewed, and looked wrong. To get around the problem, I simply resorted to an orthographic projection, and drawing a quad to exactly cover the screen coordinates the object (in this case, a tree) covered. The results are pretty much perfect, in terms of the 'impostor' looking exactly the same as the rendered geometry. My only concern is... is this the right way to go about implementing 'impostors'? Assuming I perform correct depth-sorting (back-to-front) prior to rendering my ortho quads, and turn off / on my depth-testing at the right times... everything should come out looking right - right? If anyone has any insight as to the 'right' way of creating impostors, please let me know. *afterthought* Perhaps this isn't really an OpenGL-forum question. If it belongs somewhere else, please feel free to move / tell me. Since this has taken almost a week of my programming time to get working, and there doesn't seem to be much solid, code-included information on how to create impostors... perhaps after I get everything working (and assuming I'm doing things right) I will write up a tutorial. Impostors are useful enough to warrant one, IMO. Thanks in advance, Hew T.