#### Archived

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

# creating imposters

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

## Recommended Posts

imposters(sp?) are objects rendered to textures and drawn as a billboard when they are far away to increase speed. i got that. what i don''t understand is how to create the imposter. i understand the whole render to texture thing, but when you render the object to the texture how do you make it so there is no extra space around the edge? correct me if i''m wrong but wouldn''t that extra space skrew up the scaling of the object and mak it look like it''s floating in the distance. basically i need all the help i can get with the creation imposters because i know very little. -PmanC

##### Share on other sites
The idea is that when the tree gets far enough away you render it to a texture and from then on draw a quad with that texture instead of the whole tree. You have to be careful implementing this because it can end up looking really bad (popping, trees obviously rotating to face the camera, etc), but when done right i guess it works great.

Marijn

##### Share on other sites
i understand that but when you are rendering it to a texture how do you ensure that there is no extra space around the object in the texture? because(correct me if i''m wrong) wouldn''t that extra space completely skrew up the scale of the tree on the mountain? by extra space i mean this:

  extra space:         no extra space:+-----------------+  +-----------------+|                 |  |   ********      ||    *****        |  |   **      *     ||    **   *       |  |   **      *     ||    **   *       |  |   **      *     ||    *****        |  |   ********      ||    **           |  |   **            ||                 |  |   **            |+-----------------+  +-----------------+

please excuse the crapy drawing. -PmanC

##### Share on other sites
Wouldn''t that be just a mathematical equation? Factor in your field of view, etc, and position the camera in front of it with a calculated distance from it based on the field of view and such.

I''ve always wondered why do this though. You would think that rendering to a texture (especially a lot of objects each) would be slower than rendering a low-level-detail mesh. And besides, you have to render the mesh anyway to render it to the texture!

##### Share on other sites
quote:
Original post by okonomiyaki
I''ve always wondered why do this though. You would think that rendering to a texture (especially a lot of objects each) would be slower than rendering a low-level-detail mesh. And besides, you have to render the mesh anyway to render it to the texture!

Imposters make use of the fact that you see little detail in the far distance. Therefor you can render a tree to a texture only once every frame and the use that texture to draw hundreds of trees. So for 100 trees of 200 polygons:

regular:100*200=20.000 polygons
imposters: 200 for render to texture + 100 imposters = 400 polygons

See the difference?

Sander Maréchal

GSACP: GameDev Society Against Crap Posting
To join: Put these lines in your signature and don''t post crap!

##### Share on other sites
Imposters rely on the fact that what the object looks like changes slowly as the camera moves. For instance, if you look at a distant tree, then move a few feet to the side, it looks pretty much the same. So that allows you to only render the tree every few seconds (or few frames or whatever, depending on the change in the viewing angle), but display a decent looking aproximation for what the tree ought to look like every frame. If it''s done right, you should never notice that the texture is not being updated constantly.

I read a paper on cloud rendering that gave a pretty good explaination of imposters (plus some pretty screenshots). It''s probably more clear than my explanation. You can find it at http://www.cs.unc.edu/~harrism/clouds/ Hope that helps.

##### Share on other sites
Ah, I understand now. Cool. That would be a whole lot quicker....
Hm, that is really neat! The more I think about it, the more uses there are for it. I'll have to remember that.

Anyway, didn't mean to bring it off topic. Anyone know the answer to PmanC's question?

edit: I've seen the cloud paper before, but never read it in-depth as I was never interested in that way of rendering clouds. I can see the similarity though now.

[edited by - okonomiyaki on August 16, 2003 10:41:11 AM]

##### Share on other sites

As I understand ''PmanC''´s question, the answer is just to use RGBA (notice the ALPHA) textures.

-----------------------------
AM

• 10
• 17
• 9
• 13
• 41