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

Editing Mesh

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 46: Line 46:
 
|}
 
|}
  
Valid parameters for a mesh are:
+
Valid parameters for a mesh are
{|{{Prettytable}}
+
<properties>
|-
+
name=The name of the mesh
| {{Hl3}} |'''Parameters'''
+
vertex= this is a 'corner' of your mesh - a point where faces connect. (at least 3 are required)
| {{Hl3}} |'''Description'''
+
normal= a unit vector describing the direction light will reflect off the object
|-
+
texcoord= this is used for mapping textures onto the mesh.  This will link a point of the 2-Dimensional texture to a vertex on the 3-Dimensional object.  (0,0) refers to the lower left corner of the texture, (1,1) refers to the top right.  Textures are defined in the [[material]] object.
| '''name''' || The name of the mesh.
+
inside= an arbitrary vertex placed on the inside of the mesh object.  This keeps tanks from driving or spawning inside the object.
|-
+
phydrv=Assign a physics driver as defined in the [[physics]] object.
| '''vertex''' || this is a 'corner' of your mesh - a point where faces connect. (at least 3 are required).
+
smoothbounce=shot will ricochet from the face in the same direction as the defined normal.
|-
+
noclusters=Render each face individually.
| '''normal''' || a unit vector describing the direction light will reflect off the object.
+
shift=places the mesh using <x y z> coordinates
|-
+
scale=resizes the mesh along the x, y, or z axis
| '''texcoord''' || this is used for mapping textures onto the mesh.  This will link a point of the 2-Dimensional texture to a vertex on the 3-Dimensional object.  (0,0) refers to the lower left corner of the texture, (1,1) refers to the top right.  Textures are defined in the [[material]] object.
+
shear=repeatable
|-
+
spin=spins the mesh <angle> number of degrees, <n> number of rotations along one or more of the x, y, or z axis
| '''inside''' || an arbitrary vertex placed on the inside of the mesh object.  This keeps tanks from driving or spawning inside the object.
+
drivethrough=Tanks can drive through this mesh.
|-
+
shootthrough=Tanks can shoot through this mesh.
| '''phydrv''' || Assign a physics driver as defined in the [[physics]] object.
+
passable=Tanks can both shoot and drive through this mesh
|-
+
matref=Assign a [[material]] to all below faces.
| '''smoothbounce''' || shot will ricochet from the face in the same direction as the defined normal.
+
face=Start a face (required), see below:
|-
+
</properties>
| '''noclusters''' || Render each face individually.
+
|-
+
| '''shift''' || places the mesh using <x y z> coordinates.
+
|-
+
| '''scale''' || resizes the mesh along the x, y, or z axis.
+
|-
+
| '''shear''' || repeatable.
+
|-
+
| '''spin''' || spins the mesh <angle> number of degrees, <n> number of rotations along one or more of the x, y, or z axis.
+
|-
+
| '''drivethrough''' || Tanks can drive through this mesh.
+
|-
+
| '''shootthrough''' || Tanks can shoot through this mesh.
+
|-
+
| '''passable''' || Tanks can both shoot and drive through this mesh.
+
|-
+
| '''matref''' || Assign a [[material]] to all below faces.
+
|-
+
| '''face''' || Start a face (required), see below.
+
|}
+
 
Valid parameters within the face sub-object:
 
Valid parameters within the face sub-object:
{|{{Prettytable}}
+
<properties>
|-
+
vertices=Numbered list of vertices for this face. (requires at least three)
| {{Hl3}} |'''Sub-object'''
+
normals=Numbered list of normals for this face.
| {{Hl3}} |'''Description'''
+
texcoords=Numbered list of texture coordinates for this face.
|-
+
phydrv=Assign a [[Physics|physics driver]] to this face only.
| '''vertices''' || Numbered list of vertices for this face. (requires at least three).
+
smoothbounce=use normals to determine shot ricochets for this face.
|-
+
noclusters'''
| '''normals''' || Numbered list of normals for this face.
+
drivethrough=Tanks can drive through this face.
|-
+
shootthrough=Tanks can shoot through this face.
| '''texcoords''' || Numbered list of texture coordinates for this face.
+
passable=Tanks can both shoot and drive through this face
|-
+
matref=Assign a [[material]] to this face.
| '''phydrv''' || Assign a [[Physics|physics driver]] to this face only.
+
</properties>
|-
+
| '''smoothbounce''' || use normals to determine shot ricochets for this face.
+
|-
+
| '''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.
+
|}
+
 
Meshes have full support for [[Material]] (wherein custom textures can be defined) and [[Physics Drivers]].
 
Meshes have full support for [[Material]] (wherein custom textures can be defined) and [[Physics Drivers]].
  
Line 211: Line 178:
  
 
In order to have successful inside point coverage, you need to make sure all faces of your mesh are in "line of sight" to the point you specify. This means that all faces have direct vision to that point, just as if that point was a point of light and all the faces were eyes. Only what can be seen through a straight line will be considered the inside for that face.
 
In order to have successful inside point coverage, you need to make sure all faces of your mesh are in "line of sight" to the point you specify. This means that all faces have direct vision to that point, just as if that point was a point of light and all the faces were eyes. Only what can be seen through a straight line will be considered the inside for that face.
 +
 +
Illustration is better than words, here is an image drawn up by '''Spazzy McGee''' from the forums.
 +
 +
http://img205.imageshack.us/img205/2140/insides.jpg
 +
 +
(Original forum post http://my.bzflag.org/bb/viewtopic.php?p=139382#p139382)
  
 
==Editor Support==
 
==Editor Support==

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:

Retrieved from "https://wiki.bzflag.org/Mesh"