Archived

This topic is now archived and is closed to further replies.

Making Imposters?

This topic is 5702 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

How would one make an imposter in OpenGL? I mean the use of a 2d rendering of a 3d object inside a 3d scene to simulate it? I figure that you would render to a texture as per other ogl demos, but how can I setup a texture that is properly oriented and sized so that it can be put back into the scene and mimic the camera''s view of the object? Ranger (hope that''s clear enough)

Share this post


Link to post
Share on other sites
I'd guess you could render the object to the texture, scaled so it completely fills the texture, then when you render the imposter, you could just take the 4 most extreme vertices in view X and Y (top, left, right, bottom) and draw the imposter scaled to fit exactly between those points.

I am only guessing though, as I've never done it myself. I'd be interested to see if it actually improves your framerate, or if the render to texture call slows it down too much.

____________________________________________________________
www.elf-stone.com

[edited by - benjamin bunny on May 3, 2002 12:01:34 AM]

Share this post


Link to post
Share on other sites

it will probably be slowed- since the object needs to be drawn to the texture (drawn once) then the texture to the screen (drawn twice). In this case I simply want to make it render once for distant objects and not rerender them for several frames- should increase performace.

Ranger

Share this post


Link to post
Share on other sites