This wiki is archived and useful information is being migrated to the main bzflag.org website

Editing DrawInfo

Jump to: navigation, search

Warning: The database has been locked for maintenance, so you will not be able to save your edits right now. You may wish to copy and paste your text into a text file and save it for later.

The administrator who locked it offered this explanation: Archived wiki

The edit can be undone. Please check the comparison below to verify that this is what you want to do, and then save the changes below to finish undoing the edit.
Latest revision Your text
Line 35: Line 35:
  
 
Valid parameters for drawinfo are:
 
Valid parameters for drawinfo are:
{|{{Prettytable}}
+
<properties>
|-
+
dlist=requests that the client use display lists to render the object (recommended for meshes that are not overly complicated)
| {{Hl3}} |'''Parameter'''
+
decorative=disables drawInfo in older clients
| {{Hl3}} |'''Description'''
+
angvel=causes the mesh object to spin at the given rate in degrees per second
|-
+
extents=the minimum and maximum x, y, and z point of the mesh to be drawn.  This helps with rendering efficiency, meshes whose extents are outside of the point of view will not be drawn.
| '''dlist''' || requests that the client use display lists to render the object (recommended for meshes that are not overly complicated).
+
sphere=an imaginary sphere that encompasses all x, y, and z coordinates.  Similar to extents, this helps increase rendering efficiency.
|-
+
vertex=if defined within the drawInfo section, the vertices, normals, and texcoords will be used instead of those defined in the mesh
| '''decorative''' || disables drawInfo in older clients.
+
corner=(required)a point defined by a vertex, normal, and a texcoord
|-
+
lod=(required)sections that determines which faces/points will be rendered from specific distances (lengthPerPixel)
| '''angvel''' || causes the mesh object to spin at the given rate in degrees per second.
+
lengthPerPixel=(required)distance from which the points will be rendered, 0 is close, .3 is about as far away as is needed  
|-
+
matref=(required)material to use for the faces that follow it.
| '''extents''' || the minimum and maximum x, y, and z point of the mesh to be drawn.  This helps with rendering efficiency, meshes whose extents are outside of the point of view will not be drawn.
+
points=''description''
|-
+
lines=''description''
| '''sphere''' || an imaginary sphere that encompasses all x, y, and z coordinates.  Similar to extents, this helps increase rendering efficiency.
+
lineloop=''description''
|-
+
linestrip=''description''
| '''vertex''' || if defined within the drawInfo section, the vertices, normals, and texcoords will be used instead of those defined in the mesh.
+
tris=index numbers of corners that create triangles
|-
+
tristrip=series of points that form a chain of triangles.
| '''corner''' || (required) a point defined by a vertex, normal, and a texcoord.
+
trifan= a series of points that create triangles that fan out from a single point.  That point, usually in the center, is placed first in the series.  Trifans are used only in pyramid and cone-shaped meshes.
|-
+
quads=points that create 4-sided mesh planes
| '''lod''' || (required) sections that determines which faces/points will be rendered from specific distances (lengthPerPixel).
+
quadstrip=series of points that create a chain of 4-sided planes.  Similarly to tristrips, the series zig-zags between the points, starting in the counter-clockwise direction.
|-
+
polygon=same as quads except for planes of more than 4 sides.
| '''lengthPerPixel''' || (required) distance from which the points will be rendered, 0 is close, .3 is about as far away as is needed.
+
</properties>
|-
+
| '''matref''' || (required) material to use for the faces that follow it.
+
|-
+
| '''points''' || ''description''.
+
|-
+
| '''lines''' || ''description''.
+
|-
+
| '''lineloop''' || ''description''.
+
|-
+
| '''linestrip''' || ''description''.
+
|-
+
| '''tris''' || index numbers of corners that create triangles.
+
|-
+
| '''tristrip''' || series of points that form a chain of triangles.
+
|-
+
| '''trifan''' || a series of points that create triangles that fan out from a single point.  That point, usually in the center, is placed first in the series.  Trifans are used only in pyramid and cone-shaped meshes.
+
|-
+
| '''quads''' || points that create 4-sided mesh planes.
+
|-
+
| '''quadstrip''' || series of points that create a chain of 4-sided planes.  Similarly to tristrips, the series zig-zags between the points, starting in the counter-clockwise direction.
+
|-
+
| '''polygon''' || same as quads except for planes of more than 4 sides.
+
|}
+
  
 
==Appearance==
 
==Appearance==
DrawInfo is only applied to existing [[mesh]] objects. These mesh objects will be altered by DrawInfo parameters.
+
DrawInfo is only applied to existing [[mesh]] objects.
 
+
A common example are spinning objects (angvel parameter in DrawInfo).
+
 
+
LODs can improve framerate as it features substitution of complex mesh objects at given lengthPerPixel steps with more simplistic objects. If the substitution is done decent then it'll be unobtrusive. LODs are used in Louman's Mystic Valley for instance: Shrubbery and trees will change in appearance slightly when viewed from about 200 units away.
+
  
 
==Editor Support==
 
==Editor Support==
DrawInfo support has been added to obj to bzw converters: Modeltool (available through [[BZFlag Git|Git]]) and [http://my.bzflag.org/bb/viewtopic.php?p=115772#115772 php-dIMachine].
+
DrawInfo support has been added to obj to bzw converters: Modeltool (available through [[SVN]]) and [http://my.bzflag.org/bb/viewtopic.php?p=115772#115772 php-dIMachine].
  
 
==History==
 
==History==
 
DrawInfo was added (by trepan) in BZFlag version 2.0.4 and is rarely used for anything other than experimental and proof-of-concept maps. Notable exceptions to this are trees in Louman's "Mystic Valley" and "Churchyard" maps, and a more recent practical use of moving drawinfo in Planet MoFo's halloween [[passion]] map. Following the creation of tools to generate drawinfo from .obj files, it is getting more frequent use by more experienced map makers.
 
DrawInfo was added (by trepan) in BZFlag version 2.0.4 and is rarely used for anything other than experimental and proof-of-concept maps. Notable exceptions to this are trees in Louman's "Mystic Valley" and "Churchyard" maps, and a more recent practical use of moving drawinfo in Planet MoFo's halloween [[passion]] map. Following the creation of tools to generate drawinfo from .obj files, it is getting more frequent use by more experienced map makers.
 
[[Category:Map Making]]
 
[[Category:Map_Objects]]
 

Please note that all contributions to BZFlagWiki may be edited, altered, or removed by other contributors. If you do not want your writing to be edited mercilessly, then do not submit it here.
You are also promising us that you wrote this yourself, or copied it from a public domain or similar free resource (see BZFlagWiki:Copyrights for details). Do not submit copyrighted work without permission!

To edit this page, please answer the question that appears below (more info):

Cancel | Editing help (opens in new window)

Templates used on this page: