Milkshape X3D exporter
Plugin detection
Milkshape VRML97 exporter

Milkshape VRML97 exporter

Introduction

MilkShape 3D is a low-polygon modeler, which was initially designed for Half-Life. During the development, many file formats have been added.

MilkShape 3D has all basic operations like select, move, rotate, scale, extrude, turn edge, subdivide, just to mention a few. MilkShape 3D also allows low-level editing with the vertex and face tool. Primitives like spheres, boxes and cylinders are also available.

MilkShape 3D has also skeletal animation capabilities. This allows to export to morph target animation like the ones in the Quake model formats or to export to skeletal animations like Half-Life or Genesis3d.

VRML97 exporter

The VRML97 exporter I wrote makes use of the SDK that you can download from the Milkshape site.
The exporter produces the following:

  • IndexedFaceSet
  • Texture coordinates
  • DEF/USE Material with all fields
  • Transparency value is inverted to produce the same visual result
  • AmbientIntensity R, G, B values are added to produce a single value
  • ImageTexture
  • The model will be posed in the pose of the current frame (if animation is activated)
  • There's no specific camera generated

You can configure the following export options:

  • Export materials (default)
  • Export texture coordinates (default)
  • Export normals (normals per face)
  • CCW, counter-clockwise polygons (default)
  • Solid, only the outside will be visible (default)
  • Tabs, indentation in the exported file (default)
  • User defined creaseangle (for smoothing)
  • Number of digits for float values

Static model

Exports just the model as specified. No animation, no bones.

Model animated with coordinateinterpolator
Exports the same model as the static model option, but this option also adds a coordinateinterpolator (morph targets) with keys based on the animated bone keys. Be aware that the size of the exported file may grow quickly.

H-anim1.2 model
Bone structure will be exported to the new humanoid animation standard for continuous meshes. You will have to use a correctly named bone structure so the correct joints will be generated.

Here are some examples of bone structures you can use. They are not entirely symmetrical however.
HanimLOA1.ms3d
HanimLOA2.ms3d
HanimLOA3.ms3d

Instructions

1. Download the Milkshape modeler
http://www.swissquake.ch/chumbalum-soft/
2. Download the Milkshape VRML97 exporter plug-in
Download msVRML97Exporter.zip and unzip it into the Milkshape directory.
3. Download a Quake or Halflife model and load them into the modeler
http://www.planetquake.com
http://www.planethalflife.com
4. Create a model from scratch using the modeler
tutorials
5. Export the model using the VRML97 exporter
6. View the model with a VRML97 plug-in
7. Use the VRML model in your website
Samples of usage

Tips for producing a valid VRML model

  • Use image formats for the materials that are known by the VRML viewer e.g. JPG, PNG (sometimes GIF)
  • Make sure the image is in the same directory as the generated VRML model
  • Naming of the materials
    Make sure the naming of your materials complies with the VRML97 spec, because this version of the exporter doesn't check upon this. Most important in this is not to use spaces in the names.

    This means:
    1. Don't use the following characters for the first character of the name: + -
    0 1 2 3 4 5 6 7 8 9
    2. Don't use the reserved words: DEF
    EXTERNPROTO
    FALSE
    IS
    NULL
    PROTO
    ROUTE
    TO
    TRUE
    USE
    eventIn
    eventOut
    exposedField
    field