A question about using imposters...

I’ve been reading up about imposters and something has been bugging me somewhat.

I know that you can use render to texture to render out an image of your complex 3D models and all of its lighting info and then essentially smack that onto a 2D Quad using a transparent cutout shader or something I guess.

I also understand that the 2D render would have to be updated (periodically?) in order to account for a change of perspective. But surely to render the object again to a texture requires the original 3D model must have to come back into the viewspace of the camera that’s doing the render to texture right?

Well then what’s the point of doing it on a dynamic object that’s always moving/rotating, it will always have to be updated meaning the original 3D will always have to be brought back into view, so you might as well not bother, it seems to me your making it worse by having the 3D model present and adding a render to texture on top of that!

I don’t understand the performance benefit of updated imposters…Vs ones that are “pre-made” and set in stone…like Unity’s billboard trees (correct me if I’m wrong about that).

I’m guessing the secret is updating every so many frames…which would surely cause jittering in your 2D sprite OR when the perspective changes by such an amount that it requires updating…but how would you even measure that? Register the change in distance/rotation of the original and update after it hits a threshold?

I was under the assumption that render to texture was expensive…but perhaps not at the very small resolutions needed for the kind of distances a 2D imposter would be at anyway.

I find it really quite interesting and would like to hear peoples thoughts on different implementations of imposter systems…

The idea is that you either shouldn’t need to update them every frame, or you create a small number of impostors and reuse them a large number of times. You are correct that impostors would be of little benefit in the use cases you describe, but they’re not the use cases where impostors are typically used.

For instance, I expect that the Crytek uses impostors a lot for their trees. There are often hundreds or thousands of trees visible at once, but large numbers of them would look very similar - similar shape, similar lighting. So they could render one tree to a render texture, but then draw that texture to the screen maybe 20 or 30 times. So instead of fully rendering 500 trees, they can render maybe 50 unique trees (all nearby trees, then a selection of distant trees that get reused) but then draw several hundred trees for a similar cost to rendering a particle effect.

The same can be done when rendering large crowds. Render a few dozen unique individuals, then redraw them sevaral times each. Colour correction or replacement, scale tweaks, mirroring and other things can come in handy here, but even without those it’s mostly going to be used for detail which the eye wouldn’t easily pick up, so it won’t be obvious that there’s essentially a lot of copy-pasting being used to bulk out the scene.

That’s what the Unity terrain system does.

–Eric

Imposter was originally conceived to be used for extreme/long distance non-articulated (humanoid/animals) objects that aren’t changing much in perspective, and without loss of detail, to reduce the geometric complexity of a 3D scene by caching portions of the scene as images. It is due to that very fact the objects in far distance do not change much in view angle, you can pretty much only update it once in a while, which saves precious GPU/CPU cycles on vertex transformation for these 3D objects which are calculated per frame. Multply the saving for thousands of these objects and the performance benefit becomes quite significant.

Some good example of using imposters are: trees, rocks, buildings, even cars (“True Crime: New York City” used it on the cars/traffic). “Jurassic Park: Trespasser” was probably the pioneer of imposter system, although that is debatable because Wing Commander precedes it by 8 years although Wing Commander was more like a 2D game (all pre-rendered sprites in 3D space, and it certainly did not do render-to-texture on the fly).

There is a good article on Gamasutra on the imposter system that’s well worth reading :
Dynamic 2D Imposters: A Simple, Efficient DirectX 9 Implementation
By Ashley Davis


I think that’s a pretty tenuous debate… :wink:

Well, I would say Wing Commander’s “3D” sprite is probably the PRECURSOR of the imposter system. :wink:
I wouldn’t call it the imposter system though.

Wow, thanks for the link!

@Eric Are Unity’s tree imposters rendered at run time, or are they generated at some other stage like in the tree creator perhaps?

Hmmm, I was wondering whether it might be beneficially to somehow render multiple close objects onto a single imposter…although they would have to be relatively close of course otherwise the objects towards the edge of the billboard would sway around a lot when the billboard re-orientates to face the camera, but I reckon it could work if they were close enough? Beg’s the real question though…if it’s so cheap to render a single imposter would it even be worth trying to save even more by combining three into one? Seems like a bad idea…

By a quick browse over that article, it looks they take multiple renders of the object from different angles and pack them into a texture atlas, then by defining the current camera’s viewing angle against the object would allow the billboard to display the correct portion of the atlas…

I was thinking about how you might try and replicate some basic lighting on the far away billboards…for example if you had day/night cycle, you could still use the same billboard texture taken in normal lighting conditions and then manipulate the vert colors of the billboard mesh to approximate lightness/darkness or even light angles…

Yes, otherwise changes in lighting would look really bad.

–Eric

Another question about this, are the images that are sampled for the imposter taken in perspective or orthographic?