Dark Imposters
Dark Imposters is now on sale on the TGC store.
Buy now or try the demo HERE!
What are imposters?
Imposters are 2D planes textured with an image of the object, they are activated at a given distance and regenerate automatically when angle error becomes too large, meaning they are a good representation of your objects at all times from any angle.
This will speed your game up alot, allowing for more detail in your environments.
Here comes the science
Using DirectX Dark Imposters can render multiple objects to one texture, this is very efficient as the render target only changes once. The imposter billboards are then rendered as one object from this texture making it very fast.
You supply the texture size and how many imposters you want like this:
IMP MAKE GROUP 1, 1024, 1024, 16, 16
This will create a texture 1024 x 1024 with a possible 256 imposters(16*16) at a resoltion of 64 x 64.
You then add the objects:
IMP GROUP ADD OBJECT 1, 1
Adds object with ID 1 to group with ID 1
Thats it, just update in your loop and your game will run faster.
KNOWN ISSUES:
There are currently no known issues.
UPDATES:
15 July 2011 - v1.1 is available for download.
Quote: "
New commands:
-IMP GET MAX TEXTURE WIDTH
-IMP GET MAX TEXTURE HEIGHT
-IMP IS IMPOSTER
Fixes:
-Fixed bug that could cause extreme distant objects to not
render to texture properly.
-Improved z-sorting for fading imposters, now sorts in small
amounts each frame rather than doing a full sort at given
time intervals.
-IMP IMPOSTER GET ACTIVE was wrongly returning whether the object was
currently an object or an imposter, now it returns whether
the imposter has been removed from the scene, as possible
using IMP SET ACTIVE.
-Fixed bug which prevented last object added to a group from
being added to object/imposter map. This affexted IMP IMPOSTER GET ACTIVE
and IMP IS IMPOSTER
-Fixed fade bug, when fading was used the object/imposter map was invalidated.
(would access wrong imposters)
Documentation:
-Added culling example
-Improved examples, camera movement etc, they now take into account
that some hardware requires textures to be split up evenly.
DarkGDK:
-Added VS10 lib
"
CREDITS:
Credits to everyone who has helped me on these forums over the last year or so, some that come to mind:
Kaedroho, IanM, Diggsey, Techlord