History: -Billboard
Source of version: 19 (current)
Copy to clipboard
{INCLUDE(page="ogrelex ext tpl")/}
---
__Billboard__ - A flat square polygon (2 triangles) for high speed displaying of 2D ((-Texture|textures)). Mostly the face points to the ((-Camera|camera)). Often it's also called ''__sprite__'', although this not right in historical context (see [http://en.wikipedia.org/wiki/Sprite_%28computer_graphics%29|Wikipedia article] and [http://en.wikipedia.org/wiki/Commodore_64#Graphics|sprites on C64]).
To make one, you first have to make a ''BillboardSet''. Then, the billboards can be added to it on a given position. The ''BillboardSet'' is a ((-MovableObject|MovableObject)) and should therefore be added to a((-SceneNode|SceneNode)).
Billboards can be used e.g. to create a ((-HUD|HUD)) (heads up display) for characters.
!!Types of Billboard:
* __BBT_POINT:__
+ Standard point billboard (default), always faces the camera completely and is always upright
* __BBT_ORIENTED_COMMON:__
+ Billboards are oriented around a shared direction vector (used as Y axis) and only rotate around this to face the camera
* __BBT_ORIENTED_SELF:__
+ Billboards are oriented around their own direction vector (their own Y axis) and only rotate around this to face the camera
* __BBT_PERPENDICULAR_COMMON:__
+ Billboards are perpendicular to a shared direction vector (used as Z axis, the facing direction) and X, Y axis are determined by a shared up-vertor
* __BBT_PERPENDICULAR_SELF:__
+ Billboards are perpendicular to their own direction vector (their own Z axis, the facing direction) and X, Y axis are determined by a shared up-vertor
!!Example
{img fileId="1937" alt="" rel="box[g]" imalign="right" desc="" class="clearRight"}
On right side is an example usage (from the Ogre game [http://www.ogre3d.org/forums/viewtopic.php?f=11&t=60238|APOX]).
A billboard used for a green circle marker. The face doesn't point to the camera - the billboard is parallel to the terrain. It's not rendered on top (behind the helicopter model). For this the RenderQueue was modified and maybe some ((-Material|material)) settings were changed (Depth Check ON/OFF, Depth Write ON/OFF, etc.). The usage of billboards supports high performance. An alternative would be to use ((Projective Decals)) which renders an additional layer to a ((-Texture|texture)). (But this would be slower, when you need to update its size/position for each frame.)
{TRANSCLUDE(page="seebox")}
* ((OogstsHowTo|#How to add a billboard sprite to the scene|Example)) how to add to a scene
* ((MOGRE MovableText by Billboards)) - shows text, clamped to a SceneNode
* [http://www.ogre3d.org/addonforums/viewtopic.php?f=8&t=8987&p=52291#p52291|Example] for ((MOGRE|Mogre))
* ((LightsCameraAction|#Billboards and Materials|Billboards, Materials and Lights))
* [http://www.ogre3d.org/docs/api/1.9/class_ogre_1_1_billboard.html|Billboard] Class Reference in API
* [http://www.ogre3d.org/docs/api/1.9/class_ogre_1_1_billboard_set.html|BillboardSet] Class Reference in API
* ((SpriteManager2d)) | ((MOGRE SpriteManager2d)) - code snippet
* An advanced description is in the book ''Pro OGRE 3D Programming'' (ISBN 1-59059-710-9)
* ((OgreSprites)) - similar, but without use of ''Billboard''
* ((MovableText)) | ((MOGRE MovableText)) | ((MovableTextOverlay)) - similar, but only for text
* ((ManualObject 2D))
* ((-Overlay|Overlay))
* [http://en.wikipedia.org/wiki/2.5D|2.5D] graphics at Wikipedia
* [http://msdn.microsoft.com/en-us/library/bb172358%28VS.85%29.aspx|Billboarding (Direct3D 9)] at MSDN
* ((Projective Decals)) - render an additional texture layer to a 3D model
* ((ObjectTextDisplay)) - Displaying 3D Object Text in 2D Without Using Billboards
{TRANSCLUDE}
{WIKIPEDIA(page="Sprite (computer graphics)")/}