Exporting Models

From Multiverse

Jump to: navigation, search

For a step-by-step tutorial on creating and exporting models with 3ds Max, see Importing Static Models in the Platform Tutorial.

Contents

Using COLLADA exporter plugins

After you create assets with a modeling tool, export them to COLLADA (.dae) format using a COLLADA exporter plugin for your tool. Links to the latest versions of COLLADA exporter plugins are available on the COLLADA public forum.

COLLADA is an open standard digital asset schema for interactive 3D applications. For more information on COLLADA, see also Khronos Group - COLLADA Overview.

After you have exported an asset to COLLADA format, convert it to Multiverse mesh format using the Multiverse Conversion Tool, and then inspect it with Multiverse Model Viewer.

Exporting from Maya

You can use Maya 7.0 and Maya 8.5 to create assets. Then use the ColladaMaya plugin to export models and animations from Maya.

IMPORTANT: See Creating Assets - Guidelines for Maya for important information on creating models with Maya.

Tips

  • Before exporting, make all the meshes and joints to be exported visible. If a joint or mesh is not visible, it may not be exported by the exporter.
  • Use the File | Export All... menu command. Using File | Export Selected... may not export all objects.
  • The ".mesh" file you eventually create will contain a material pointer to the Maya Shading Group that was applied to your model. You can ignore the material node itself (e.g. lambert2) and instead make sure that the shading group (e.g. lambert2SG) is named descriptively. This is the name you'll use in your material script.

Installing the ColladaMaya plugin (version 3.02b)

Download the Feeling Software ColladaMaya Installer from Multiverse. You must use this version of ColladaMaya; other versions do not work. Shut down Maya, then run the installer.

Enabling the Maya plug-in

To enable the plug-in, use the following instructions:

  1. Choose Window | Settings/preferences | Plug-in manager.
  2. Verify that the folder you copied the .mll into is listed in the plug-in manager. If it isn't, it's likely that you have a Maya.env file that overrides the default plug-in path. Add the standard plug-in path to your Maya.env. Alternatively, click the browse button and manually browse to locate the .mll file.
  3. Make sure the COLLADA.mll file is in the list, and that it is set to "loaded" and "auto load". If it refuses to load, check the script editor for error messages: Windows -> General editor -> Script editor.
  4. Save your preferences: File -> Save preferences.

NOTE: If you cannot load the COLLADA.mll, download Glut32.dll from http://www.xmission.com/~nate/glut/glut-3.7.6-bin.zip and put it in your C:\WINDOWS\system32 directory, then try again.

Maya export options

Choose File | Export All. The following dialog box will appear. Set the options as shown:

ColladaMaya plugin options

Installing the Maya plugin (older versions)

To install the plugin:

  • Unzip the COLLADA plugin file.
  • If Maya is not installed in the default location, set the MAYA_PATH70 variable to specify the path where Maya is installed
  • Run the Maya7.0/copyIntoMaya.bat script to copy all the appropriate files into the Maya directories

After launching Maya, use the menu item Window | Settings/Preferences | Plug-in Manager... to load and set COLLADA.mll to auto-load.


Exporting from 3ds Max

You can use the following versions of 3ds Max:

IMPORTANT: See Creating Assets - Guidelines for 3ds Max for important information about creating models for Multiverse with 3ds Max.

3ds Max export tool

In addition to the command-line Conversion Tool, Multiverse provides a GUI tool to expedite exporting models from 3ds Max. To use this tool, you must install the ColladaMax plugin: see Installing the 3ds Max COLLADA Plugin.

For information on using this tool, see Using the 3ds Max Export Tool.

ColladaMax export options

Using the ColladaMax plugin, to export to COLLADA format, choose File > Export. In the Export dialog box, choose "Save as type" COLLADA (*.DAE). You will then see the COLLADA Exporter dialog box. Select the options as shown below:

Image:3ds export.jpg


Troubleshooting

For 3ds troubleshooting tips, see the Platform Tutorial.

Using unsupported tools

Internally, Multiverse primarily uses Maya and 3ds Max to create models. Thus, the Multiverse tools and client get the most testing and bug fixing for use with these modeling tools. In general, for the best results, use one of these tools. However, if you cannot use one of these tools for some reason, there are several other 3D modeling tools that you can use to create models, namely: Softimage XSI, Wings 3D, and Milkshape.

If you use XSI, you export models to COLLADA files using a plugin, just as for Maya or 3ds Max. However, Multiverse does not currently test XSI extensively, and so the process may not always work as smoothly as with Maya or 3ds Max.

Wings 3D and Milkshape can export models directly to OGRE format, and so they do not support collision volumes or named attachments. This means you cannot have names or text that appear over objects, and you can't attach things such as swords to objects, or use normal maps or other similar advanced graphics features. In general, these restrictions mean that these tools are unsuitable for creating character models (avatars or mobs), but acceptable for most static models, such as for buildings.

XSI

XSI is a modeling tool available from Softimage. You can export models to COLLADA format using a COLLADA exporter. Softimage includes this exporter by default in their recent releases of XSI, so you do not need to install this yourself. Unfortunately, unit conversion is not handled very well with XSI and the COLLADA exporter. The 3ds Max and Maya exporters set a unit tag to indicate what units were used during the modeling. The Multiverse ConversionTool is able to use this information to adjust the scale to match the standard Multiverse unit of 1mm. Since XSI does not provide any unit information, we assume the COLLADA default setting of 1 unit = 1 meter. This will not generally be correct, so you will generally need to use the --transform option of the ConversionTool to set the scale.


The Collada 1.4 export which is available in XSI 5.11 works. The .dae file that is exported can be opened directly with the Multiverse Model Viewer, but you will only see the shape, no materials. This way you can make sure that something has been exported before moving to the next step.
One XSI unit = 1 meter (about 3 feet) in a Multiverse World. Do your modelling using this scale and there will be no need to use the --transform option. Also keep in mind that your texture format should be compatible with the Multiverse tools. .tga works. Softimage's .pic format does not.

Once the Collada file is converted you will have to edit the .material file, here are some tips:

Image:XSI_MaterialFile.jpg

You will probably need to edit the specular data. (Suggestion: 0.00000 0.00000 0.00000 1.00000 0.00000)
The first entry (light blue area) is probably not needed. If there is no sub-mesh referencing it, you can erase it.

More information TBD.

Blender

Blender is an open source 3D modeling and animation tool. Use the COLLADA plugin from Sourceforge to export models and animations from Blender.

Installing the Blender plugin

Version 2.42a of Blender includes the COLLADA plug-in for COLLADA versions 1.3.1 and 1.4, sothere is no need to install a COLLADA plug-in.

If you are using an earlier version of Blender, you must install the COLLADA plug-in. To install the plugin:

  • Unrar the COLLADAPluginForBlender-0.4.rar file.
  • Edit the file copyScriptsIntoBlender.bat and modify the Blender directories to refer to the location where Blender is installed.
  • Run copyScriptsIntoBlender.bat to copy all the appropriate files into the Blender directories.

Tips

There is a more recent Blender plugin from Illusoft. This is a more advanced, but also more limited version. It does not handle animation or skinning yet, but it may work well for static geometry.

Make sure you get the "Collada 1.3.1 Plug-in" download, which matches the instructions given above.

Also see Exporting a Static Mesh from Blender and Exporting Animations from Blender.

Milkshape

Milkshape 3D is a low-polygon modeler that can export directly to OGRE format.

More information TBD.

Wings 3D

You can convert models created with Wings 3D directly into the OGRE format used by Multiverse using the "wings-ogre" Python scripts. The original scripts are available at the OGRE site.

To use an asset created in Wings3D, you must convert the wings file into an OGRE mesh and create a material file. The following example illustrates creating an asset 'building' made of material 'Concrete'.

Creating the mesh

To create a mesh file:

  1. Copy the building.wings file into the scripts working directory.
  2. Enter the command ./w2o.py -s 5000 building.wings
  3. Enter the command OgreXMLConverter building.mesh.xml

This will give you a mesh file you can put in the appropriate media/mesh folders. Use the "-s 5000" flag to scale the object up to a useable size. By default, a wings unit (wu) is translated into 1mm. Scaling an object in wings makes it hard to work with, so it is best to scale during conversion. By using a factor of 5000, my 2wu high building is 10m high in Multiverse.

Creating the material

In order for your building asset to not show up like a white blob in Multiverse, you will then need to create a material file. Please note that you do not need to prefix the material name in the material file with the mesh name like you have to do with the COLLADA intermediary step. In short, if you named the material 'Concrete' in Wings for your asset 'building', your building.material file would have a definition for 'Concrete', not 'building.Concrete'.

WARNING: To prevent name conflicts, when the Conversion Tool converts files, it prefixes the materials with a namespace derived from their original filename. If you do not do this, you are more vulnerable to name conflicts, but if you are careful, then it should still work. So, in the above example, you would not be able to create a different building with a material named 'Concrete' with a different texture or material properties.

Google SketchUp

(Thanks to Tim Holt for input on this section).

Google SketchUp is an easy-to-learn 3D modeling program suitable for creating static models. Google SketchUp is free for personal use. SketchUp saves models in a compressed COLLADA format, which means you don't have to use a special exporter. The SketchUp 3D warehouse lets you search, share, and store 3D models.

To convert a model from SketchUp to Multiverse format:

  1. Export the model to Google Earth KMZ format. Choose File | Export | Google Earth. In SketchUp 6, choose File | Export | 3D Model and choose Export Type "Google Earth 4 (*.kmz)."
  2. Rename the file from fileName.kmz to fileName.zip and unzip the contents. This will creat a .kml file.
  3. Rename the .kml file with .dae extension.
  4. Copy the .dae file to the Multiverse Tools\Model Viewer directory.
  5. Run ConversionTool.exe on the .dae file using the following command:
    ConversionTool --3ds fileName.dae
    

    This creates a .mesh file and a new .material file.

  6. Edit the .material file and remove "-effect" from all the material names.
  7. Use the Asset Importer tool to import the model into your asset repository. See Creating asset definition files with Asset Importer for instructions.
  8. Start Model Viewer, choose File | Load Model, browse to the mesh file and select it.

NOTE: The COLLADA (.dae) file that Sketch Up exports will cause errors in both the Conversion Tool and Blender if the actual .skp model in SketchUp is not grouped correctly. To create a .dae file that works with Conversion Tool:

  1. Explode all the groups within the model
  2. Regroup it in Sketch Up
  3. Export to a KMZ file
  4. Extract the resulting .dae file with Winzip from the KMZ file.

This .dae file will convert correctly with the Conversion Tool.

Troubleshooting

If you download a model from the 3D Warehouse that was built for Google Earth, it may be very, very small (e.g. 1mm high). The model height will be displayed in the lower left of the window. If the model is too small, you should be able to rescale it in Sketchup.

There appears to be a problem with how material files reference textures: the texture file names are missing from the material file. If your model includes textures, edit the material file with a text editor and search for "texture ". In a code block such as the following:

material Castle.Stone-rough
{
...
            texture_unit
           {
               texture Stone-rough.jpg
               tex_coord_set 0
           }

the name of the texture file (Stone-rough.jpg in this example) will be missing. Based on the name of the materal section and the texture file names, you should be able to deduce the texture file name to to put in each section.

NVIDIA FX Composer

NVIDIA FXComposer version 2, is a COLLADA-based viewer that permits editing of shaders in HLSL, Cg, or COLLADA-FX formats.

Tangent/Binormal Export

Maya 2.04 / .90 textangent/texbinormal
Max 1.05 textangent/texbinormal
XSI 5.1 textangent
Personal tools