If you are working with Autodesk Maya for modeling, shading and animating your 3d scenes, use this tutorial to create an interactive 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/HTMLsite using InstantReality’s aopt binary (see Generic 3D data conversion).
Model and shade in Maya as usual. You should use PNG images for texturing.
Open ‘Window | Settings/Preferences | Plug-in manager’ and check the ‘loaded’ or ‘Auto load’ option vrml2Export.
Open the Export dialog under ‘File | Export All..’, Enter a filename (.wrl suffix) and switch to filetype ‘vrml2′. Don’t forget to check the following export options:
Hierarchy: FullTexture Options: OriginalExport: Normals and Textures
Click the “Export All” button. This will create a vrml2 file in your scenes folder.
Open a terminal or command prompt, change to the folder containing your vrml2 model and your textures and run aopt (part of InstantReality, see Generic 3D data conversion for details) 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 InstantReality player installation. You will find the executable within the bin folder of the Player. If you don’t have Instant Reality installed yet, download and install from www.instantreality.org.
Maya is using absolute path names. Therefore, open your html file with a standard text editor (vi, emacs, notepad++, etc.) and remove all paths from ImageTexture. For example, replace:
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