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 36: Line 36:
 
     shootthrough  
 
     shootthrough  
 
     passable  
 
     passable  
     matref
+
     material
 
   endface # end the face  
 
   endface # end the face  
 
   #
 
   #
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 axiis
| '''inside''' || an arbitrary vertex placed on the inside of the mesh object.  This keeps tanks from driving or spawning inside the object.
+
matref=Assign a [[material]] to all below faces.
|-
+
face=Start a face (required), see below:
| '''phydrv''' || Assign a physics driver as defined in the [[physics]] object.
+
</properties>
|-
+
| '''smoothbounce''' || shot will ricochet from the face in the same direction as the defined normal.
+
|-
+
| '''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 124: Line 88:
 
|Simple Cube
 
|Simple Cube
 
  mesh
 
  mesh
     vertex -10 -10 0
+
     vertex -10 -10 0
     vertex 10 -10 0
+
     vertex 10 -10 0
     vertex 10 10 0
+
     vertex 10 10 0
     vertex -10 10 0
+
     vertex -10 10 0
 
     vertex -10 -10 10
 
     vertex -10 -10 10
     vertex 10 -10 10
+
     vertex 10 -10 10
     vertex 10 10 10
+
     vertex 10 10 10
     vertex -10 10 10
+
     vertex -10 10 10
 
     face #south
 
     face #south
 
         vertices 0 1 5 4
 
         vertices 0 1 5 4
Line 153: Line 117:
 
|Simple billboard with texcoords
 
|Simple billboard with texcoords
 
  mesh  
 
  mesh  
    vertex -10 0 0
+
    vertex -10 0 0
    vertex 10 0 0
+
    vertex 10 0 0
     vertex 10 0 10
+
     vertex 10 0 10
 
     vertex -10 0 10
 
     vertex -10 0 10
 
     texcoord 0 0
 
     texcoord 0 0
Line 164: Line 128:
 
     face
 
     face
 
         vertices 0 1 2 3
 
         vertices 0 1 2 3
         texcoords 0 1 2 3
+
         texcoord 0 1 2 3
 
     endface
 
     endface
 
     face #backside
 
     face #backside
 
         vertices 1 0 3 2
 
         vertices 1 0 3 2
         texcoords 1 0 3 2
+
         texcoord 1 0 3 2
 
     endface
 
     endface
 
  end #mesh
 
  end #mesh
 
|Simple Jump-through floor
 
|Simple Jump-through floor
 
  mesh
 
  mesh
     vertex 0 0 9
+
     vertex 0 0 9
     vertex 10 0 9
+
     vertex 10 0 9
     vertex 10 10 9
+
     vertex 10 10 9
     vertex 0 10 9
+
     vertex 0 10 9
     vertex 0 0 10
+
     vertex 0 0 10
     vertex 10 0 10
+
     vertex 10 0 10
 
     vertex 10 10 10
 
     vertex 10 10 10
     vertex 0 10 10
+
     vertex 0 10 10
 
     face #south
 
     face #south
 
         vertices 0 1 5 4
 
         vertices 0 1 5 4
        drivethrough
 
 
     endface
 
     endface
 
     face #east
 
     face #east
 
         vertices 1 2 6 5
 
         vertices 1 2 6 5
        drivethrough
 
 
     endface
 
     endface
 
     face #north
 
     face #north
 
         vertices 2 3 7 6
 
         vertices 2 3 7 6
        drivethrough
 
 
     endface
 
     endface
 
     face #west
 
     face #west
 
         vertices 3 0 4 7  
 
         vertices 3 0 4 7  
        drivethrough
 
 
     endface
 
     endface
 
     face #bottom
 
     face #bottom
Line 206: Line 166:
 
  end #mesh
 
  end #mesh
 
|}
 
|}
 
==Inside Points==
 
An inside point allows the mapper to make a mesh solid. This means that regardless of what the player tries to do, they will not be able to go through the object, or end up spawning inside a mesh unintentionally. When you drive through a box, especially with the Oscillation Overthruster flag, you will be inside of a building and sealed to it. Without inside points, especially to larger meshes, you will just end up on the inside of it and be able to shoot and drive normally. This is sometimes intentional, but usually not wanted. Inside points remedy this.
 
 
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.
 
  
 
==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"