A sprite is an object that looks the same no matter what direction you look at it from. An example is in Doom I, where a corpse on the ground looks the same no matter what direction you look at it from. For example:
A common way to use a sprite is to use superblack transparency (refer to
super black transparency article for more info) so that the shape of sprite can be defined by the texture. For example, a good way to create a tree in GLScene is to get a picture of a tree and then make the non tree parts of the picture black, then assign the picture as a superblack transparent texture to a sprite.
Sprites also have the attributes 'mirroru' and 'mirrorv' so if you were, for example, drawing many trees you can use mirrorv to mirror the sprite to reduce the similarity of trees. So you dont need to create a duplicate texture that is mirrored.
Important attributes include:
height: single
Sprite height
width: single
Sprite width
mirroru:boolean
If true sprite is mirrored vertically
mirrorv:boolean
If true sprite is mirrored horizontally
Demo:
CVS/Demos/sprites/caterpillar∞
Unit:
GLObjects∞
Descends from
TGLSceneObject.
|
|
Attachment
|
Size
|
Date Added
|
| | |