alphatest-based building
Posted: 04 Aug 2006, 13:58
A simple idea: Instead of using the normal wireframe building graphic, let modders choose to have it use alphatest instead. That'd work as follows:
During construction, the model is drawn normally instead of wireframed or anything like that, however it is done while setting glAlphaFunc to GL_GEQUAL and the completion percentage of the build job. The source alpha channel could be one channel from the second texture assigned to s3os.
Purpose: This would allow a modder to define exactly how a unit is built. A vertical gradient across the unit would mean a simple buildup as it's today, other variations would e.g. building the torso of a unit first and having the limbs grow from it, a building appearing bit by bit (by having each bit have a single alpha value) or an infection spreading across the land. This could also be applied to ground decals so they don't just pop into existence.
During construction, the model is drawn normally instead of wireframed or anything like that, however it is done while setting glAlphaFunc to GL_GEQUAL and the completion percentage of the build job. The source alpha channel could be one channel from the second texture assigned to s3os.
Purpose: This would allow a modder to define exactly how a unit is built. A vertical gradient across the unit would mean a simple buildup as it's today, other variations would e.g. building the torso of a unit first and having the limbs grow from it, a building appearing bit by bit (by having each bit have a single alpha value) or an infection spreading across the land. This could also be applied to ground decals so they don't just pop into existence.