Difference between revisions of "Modeltool"

From BZFlagWiki
Jump to: navigation, search
(added wiki table)
Line 3: Line 3:
 
In normal operation it converts wavefront.obj files to .bzw mesh. The easiest way to do this is to place both the modeltool binary and an obj file in a directory, then open your terminal  and cd to that directory, and ./modeltool your_filename.obj.  A bzw format file will be created, with your mesh inside of it.
 
In normal operation it converts wavefront.obj files to .bzw mesh. The easiest way to do this is to place both the modeltool binary and an obj file in a directory, then open your terminal  and cd to that directory, and ./modeltool your_filename.obj.  A bzw format file will be created, with your mesh inside of it.
 
    
 
    
Modeltool Arguments
+
===Modeltool Arguments:===
-g <name>       : use group definition
+
{|{{Prettytable}}
  -tx <dir>       : set texture prefix
+
|-
  -m         : disable materials (matref)
+
| {{Hl3}} |'''Argument'''
  -sm         : use the smoothbounce property
+
| {{Hl3}} |'''Description'''
  -yz         : flip y and z coordinates
+
|-
  -n         : disable normals
+
| -g <name> || use group definition.
  -t         : disable texture coordinates
+
|-
  -a         : disable ambient coloring
+
| -tx <dir> || set texture prefix.
  -d         : disable diffuse coloring
+
|-
  -s             : disable specular coloring
+
| -m || disable materials (matref).
  -s             : disable shininess
+
|-
  -sf <val>       : shine multiplier
+
| -sm || use the smoothbounce property.
  -e             : disable emission coloring
+
|-
  -gx <val>       : scale the model by this factor
+
| -yz || flip y and z coordinates.
  -gsx <val>     : shift the map by this value in X
+
|-
  -gsy <val>     : shift the map by this value in Y
+
| -n || disable normals.
  -gsz <val>     : shift the map by this value in Z
+
|-
  -bspskip <val> : skip faces with this material when importing a bsp
+
| -t || disable texture coordinates.
 +
|-
 +
| -a || disable ambient coloring.
 +
|-
 +
| -d || disable diffuse coloring.
 +
|-
 +
| -s || disable specular coloring.
 +
|-
 +
| -s || disable shininess.
 +
|-
 +
| -sf <val> || shine multiplier.
 +
|-
 +
| -e || disable emission coloring.
 +
|-
 +
| -gx <val> || scale the model by this factor.
 +
|-
 +
| -gsx <val> || shift the map by this value in X.
 +
|-
 +
| -gsy <val> || shift the map by this value in Y.
 +
|-
 +
| -gsz <val> || shift the map by this value in Z.
 +
|-
 +
| -bspskip <val> || skip faces with this material when importing a bsp.
 +
|}
  
 
 
 
In drawinfo mode, a third file, called a diconf is required. This is a plain text file, named with the extension .diconf
 
In drawinfo mode, a third file, called a diconf is required. This is a plain text file, named with the extension .diconf
  

Revision as of 21:33, 3 February 2017

Modeltool has two modes of operation: Normal and Drawinfo.

In normal operation it converts wavefront.obj files to .bzw mesh. The easiest way to do this is to place both the modeltool binary and an obj file in a directory, then open your terminal and cd to that directory, and ./modeltool your_filename.obj. A bzw format file will be created, with your mesh inside of it.

Modeltool Arguments:

Argument Description
-g <name> use group definition.
-tx <dir> set texture prefix.
-m disable materials (matref).
-sm use the smoothbounce property.
-yz flip y and z coordinates.
-n disable normals.
-t disable texture coordinates.
-a disable ambient coloring.
-d disable diffuse coloring.
-s disable specular coloring.
-s disable shininess.
-sf <val> shine multiplier.
-e disable emission coloring.
-gx <val> scale the model by this factor.
-gsx <val> shift the map by this value in X.
-gsy <val> shift the map by this value in Y.
-gsz <val> shift the map by this value in Z.
-bspskip <val> skip faces with this material when importing a bsp.

In drawinfo mode, a third file, called a diconf is required. This is a plain text file, named with the extension .diconf

DIconf Arguments

-lod 0 filename.obj  :Specify a mesh to convert
-angvel <val>          : Apply angular motion to the drawinfo. In radians per second.
 -nomats                   : do not write materials.
 -bounds                   : compute the bounds and sphere for draw info meshes and write them to the map
 -bounding               : generates invisible faces (and a material) to be used  for collision detection
 -comments              : add comments (line numbering) to the resulting bzw file (will make it a lot larger
 -striplimit <val>    : the longest triangle strip to use for LODs  (16 recommended)