Fork me on GitHub

Maya export

If you are working with Autodesk Maya for modelling, shading and animating your 3d scenes, use this tutorial to create an intercative x3dom website out of your model. This tutorial is tested with Autodesk Maya 2011. Nevertheless, the procedure should work even for older Maya versions.

The basic idea is to export your scene to VRML and convert this to an x3dom html site using Instant Reality's aopt binary.

You would like to see the result first? Check out the result webpage

x3dom space ship

Step 1:
Model and shade in Maya as usual. You should use png images for texturing.

Maya screenshot

Step 2:
Open 'Window | Settings/Preferences | Plug-in manager' and check the 'loaded' or 'Auto load' option vrml2Export.

Plug-in Manager screenshot

Step 3:
Open the Export dialog under 'File | Export All..', Enter a filename (.wrl suffix) and switch to filetype 'vrml2'.
Don't forget to check the folowing export options:
Hierarchy: Full
Texture Options: Original
Export: Normals and Textures
Click the "Export All" button. This will create a vrml2 file in your scenes folder.

Export settings screenshot

Step 4:
Open a terminal or command prompt, change to the folder containing your vrml2 model and your textures and run aopt (part of Instant Reality) by typing the following command (assuming to be spaceship.wrl the name of your model):

aopt -i spaceship.wrl -d Switch -f ImageTexture:repeatS:false
     -f ImageTexture:repeatT:false -u -N spaceship.html

Note: aopt is automatically coming with your Instant Reality player installation. You will find the executable within the bin folder of the Player.
If you don't have installed Instant Reality yet, download and install from www.instantreality.org.

Step 5:
Maya is using absolute path names. Therefore, open your html file with a standard text editor (vi, wordpad,...) and remove all
pathes from ImageTexture such as:
Replace e.g. url='"c:\users\me\maya\project\sourceimages\spaceship_color.png"' with url='"spaceship_color.png"'

Step 6:
Copy html and textures into your web folder and open the website with your x3dom capable browser.

If you want to try out this tutorial: Here is a zip archive (208 kb) containing all relevant files including Maya model and texture.
You want to see the result live in your Browser: Here is the final webpage