This wiki is archived and useful information is being migrated to the main bzflag.org website
Editing Mesh
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 1: | Line 1: | ||
− | A mesh is a [[BZW]] map object that defines an arbitrary three dimensional shape. A mesh is defined as a series of faces containing 3 or more points | + | A mesh is a [[BZW]] map object that defines an arbitrary three dimensional shape. A mesh is defined as a series of faces containing 3 or more points in three dimensional space ( or a vertex ). |
==Code== | ==Code== | ||
Line 7: | Line 7: | ||
mesh | mesh | ||
name example_mesh | name example_mesh | ||
− | + | # Material properties applied to a mesh apply to all faces | |
− | + | # that follow the setting. Mesh faces will alter their own | |
− | + | # properties without affecting the state of the mesh properties. | |
− | + | # The same pattern is used to apply physics drivers. | |
− | + | ||
inside 5.5 4.5 1.2 # add an inside point (repeatable) | inside 5.5 4.5 1.2 # add an inside point (repeatable) | ||
outside 0 0 1000 # add an outside point (repeatable) | outside 0 0 1000 # add an outside point (repeatable) | ||
Line 36: | Line 35: | ||
shootthrough | shootthrough | ||
passable | passable | ||
− | + | material | |
endface # end the face | endface # end the face | ||
− | + | # | |
− | + | # This next element can be added to increase the rendering speed | |
− | + | # of the mesh object. If the client is capable of using this data, | |
− | + | # then it is used to draw the mesh instead of the face information. | |
− | + | # | |
+ | drawInfo | ||
+ | dlist # display list for all material sets | ||
+ | decorative # older clients with not see this mesh | ||
+ | angvel <degrees/sec> # rotation about initial Z axis | ||
+ | extents <minX> <minY> <minZ> <maxX> <maxY> <maxZ> | ||
+ | sphere <x> <y> <z> <radiusSquared> | ||
+ | corner <v> <n> <t> (repeatable) | ||
+ | vertex 0.0 0.0 0.0 (repeatable) | ||
+ | normal 0.0 0.0 0.0 (repeatable) | ||
+ | texcoord 0.0 0.0 (repeatable) | ||
+ | lod (repeatable) | ||
+ | lengthPerPixel <value> | ||
+ | matref <name> (repeatable) | ||
+ | dlist # display list for this material set | ||
+ | sphere <x> <y> <z> <radiusSquared> | ||
+ | points 0 (repeatable) | ||
+ | lines 0 1 (repeatable) | ||
+ | lineloop 0 1 (repeatable) | ||
+ | linestrip 0 1 (repeatable) | ||
+ | tris 0 1 2 (repeatable) | ||
+ | tristrip 0 1 2 (repeatable) | ||
+ | trifan 0 1 2 (repeatable) | ||
+ | quads 0 1 2 3 (repeatable) | ||
+ | quadstrip 0 1 2 3 (repeatable) | ||
+ | polygon 0 1 2 (repeatable) | ||
+ | end # matref | ||
+ | end # lod | ||
+ | end # drawInfo | ||
end # mesh | end # mesh | ||
|} | |} | ||
− | Valid parameters for a mesh are | + | Valid parameters for a mesh are |
− | + | <properties> | |
− | + | name=The name of the mesh | |
− | + | vertex=Add a vertex to the mesh (repeatable); this is a 'corner' of your mesh - a point where faces connect. | |
− | + | normal=Add a normal to the mesh (repeatable) | |
− | + | texcoord=Add a texture coordinate (repeatable); this is used for mapping textures onto complicated meshes. | |
− | + | phydrv=Assign a physics driver to the entire mesh. | |
− | + | smoothbounce=Ricochets use normals. | |
− | + | noclusters=Render each face individually. | |
− | + | shift=repeatable | |
− | + | scale=repeatable | |
− | + | shear=repeatable | |
− | + | spin=repeatable | |
− | + | matref=Assgn a material to all below faces. | |
− | + | face=Start a face (repeatable), see below: | |
− | + | </properties> | |
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
Valid parameters within the face sub-object: | Valid parameters within the face sub-object: | ||
− | + | <properties> | |
− | + | verticies=Numbered list of verticies for this face, requires at least three. | |
− | + | normals=Numbered list of normals for this face. | |
− | + | texcoords=Numbered list of texture coordinates for this face. | |
− | + | phydrv=Assign a physics driver to this face only. | |
− | + | smoothbounce''' | |
− | + | noclusters''' | |
− | + | drivethrough=Tanks can drive through this face. | |
− | + | shootthrough=Tanks can shoot through this face. | |
− | + | passable=Tanks can both shoot and drive through this face | |
− | + | matref=Assign a material to this face. | |
− | + | endface''' End this face. | |
− | + | </properties> | |
− | + | {{ToDo|Document drawinfo code.}} | |
− | + | Meshes have full support for [[Material]], [[Texture Matrix]], and [[Physics Drivers]]. | |
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | |} | + | |
− | Meshes have full support for [[Material]] | + | |
− | + | ||
− | + | ||
− | [[ | + | |
==Appearance== | ==Appearance== | ||
− | The | + | The appearance of a mesh will vary greatly as by it's very nature it can be defined to look like anything. |
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
==Editor Support== | ==Editor Support== | ||
− | The mesh object is supported by the [[BZWTools]] blender plugin, the Wings3D Exporter | + | The mesh object is supported by the [[BZWTools]] blender plugin, the Wings3D Exporter or hand coding. |
==History== | ==History== |