'Building Interactive Worlds in 3D': How to Export the Scene to Virtools

VFXWorld presents a new excerpt from Building Interactive Worlds in 3D by Jean-Marc Gauthier. This month, from the Basic 3D Kit, we present a tutorial how to export a scene to Virtools.

All images from Building Interactive Worlds in 3D: Virtual Sets and Pre-Visualization for Games, Film & the Web by Jean-Marc Gauthier. Reprinted with permission.

All images from Building Interactive Worlds in 3D: Virtual Sets and Pre-Visualization for Games, Film & the Web by Jean-Marc Gauthier. Reprinted with permission.

This is the next in a series of excerpts from Building Interactive Worlds in 3D by Jean-Marc Gauthier. For the next few months, we will be presenting chapters from a section entitled The Basic 3D Kit.

Maya will export your polygonal mesh data, plus the UV mapping information and shaders, generated during the conversion process.

You need to export each element one by one as one tree or one object, .obj (object) files.

To Export the Scene to Virtools

Select the object and go to File > Export Selection.

Point your file browser in the desired location (for example, the data folder located in the Virtools database). Assign a unique name, choose a file type (.obj) and click export.

Lets export the elements of the scene to Virtools:

  • Select one of the trees and go to File > Export Selection.

  • In the exporting window, select Virtools.

  • Check Default File Extensions.

  • Under Export Options select the following parameters:

    • Check Type = Normal,

    • Hierarchy = Full, Export = Selected,

    • Meshes and Normals are on.
The Virtools export dialog window.

The Virtools export dialog window.

Setting Up the Scene in Virtools

Open Virtools. The 3D Layout window with a perspective view is on the left. The Building Blocks folders are on the right. The Schematics window is at the bottom. This window displays a network of connections between building blocks that is similar to the Hypergraph window in Maya. The Lever Manager is similar to the Outliner window in Maya.

You will create a Data Resource folder with subfolders to save your scene.

To Create a Data Resource folder

Go to Virtools top menu and select Resources > Create New Data Resource.

Name the Data Resource folder and save it. Virtools creates a file called Data_Ressource.rsc.

The files exported from Maya or from other 3D software applications can be saved in the subfolders inside the Data Resource folder. For example, a character will be saved in Data Resource folder > Character. A tree, which is a 3D object, will be saved in Data Resource folder > 3D Entity.

To Access Our Assets Saved In the Data Resource Folder In Virtools

Go to the top menu, and select Resources > Open Data Resource. Select the Data_Resource.rsc file.

Please note that you can also import in Virtools, one by one, all the files that you exported from Maya in .nmo file formats.

To Import .nmo Files One by One

Go to the top menu and Select Resources > Import File.

Creating a Data Resource folder.

Creating a Data Resource folder.

Loading Textures from Maya in Virtools

In the Level Manager, go to Globals > Materials. Double click on the name of material. The Materials Setup window shows materials from 3D objects in the scene.

Although most of the time Virtools loads 3D models with their textures in place, some textures may not be displayed automatically, which is the case with 3D objects created in Maya.

The following steps will help you to correct this situation.

To Export Textures from Maya to Virtools

Lets export textures from Maya.

Textures in .iff format need to be converted to .jpg format using the Maya FCheck converter.

To Convert a Texture from Maya

Open the FCheck application from your desktop. Go to the Start Menu > Programs > AliasWavefront > Maya > Fcheck.

Go to the Fcheck menu and select File > Open Image. Load the leaf and bark .iff files. Go to File > Save Image. Save as .jpg file formats. The texture files are saved in the Data Resource folder > Textures folder that you previously created.

You can also import in Virtools, one by one, all the files that you exported from Maya in .nmo file formats.

You can also import in Virtools, one by one, all the files that you exported from Maya in .nmo file formats.

In Virtools, select the tab for the Data Resource folder located on the right of the 3D Layout window. Select the Textures shelf. The names of the textures that you previously saved will appear in the column to the right.

To Load a Texture in Virtools

Click on the name of a texture and drag it over the 3D Layout window or Level Manager window. The texture will automatically reside in the Level Manager window, under Level > Global > Textures shelf. When you save your file, assets referenced inside the Level Manager window will be saved with your project regardless of the presence of the Data Resource folder.

If you dont see the Resource folder located on the right of the 3D Layout window in Virtools, you may need to load the Resource folder. Go to the top menu, select Resources > Open Data Resource. Select the Data_Resource.rsc file.

Sometimes, textures are missing on 3D objects viewed in the 3D Layout window. If the texture is missing from Level Manager > Textures, you need to import the texture again. If the texture can be located in Level Manager > Textures, you need to associate the texture to the 3D model again.

To Convert a Texture from Maya

Open the FCheck application from your desktop. Go to the Start Menu > Programs > AliasWavefront > Maya > Fcheck.

Go to the Fcheck menu and select File > Open Image. Load the leaf and bark .iff files. Go to File > Save Image. Save as .jpg file formats. The texture files are saved in the Data Resource folder > Textures folder that you previously created.

Assign a texture to a 3D object in Virtools.

Assign a texture to a 3D object in Virtools.

If you dont see the Resource folder located on the right of the 3D Layout window in Virtools, you may need to load the Resource folder. Go to the top menu, select Resources > Open Data Resource. Select the Data_Resource.rsc file.

Sometimes, textures are missing on 3D objects viewed in the 3D Layout window. If the texture is missing from Level Manager > Textures, you need to import the texture again. If the texture can be located in Level Manager > Textures, you need to associate the texture to the 3D model again.

To Reassign a Texture to a 3D Object in Virtools

Go to the 3D Layout window, and right mouse click on various shades visible on the trees. In the drop down menu, select Material Setup.

A Material Setup tab opens at the bottom of the 3D Layout window. The material is located in the lower part of the screen. Go to Texture and select the appropriate texture for the material that you selected.

You are looking at trees inside a Virtools scene with the same look and feel of the trees that you created in Maya.

Find more turnkey tutorials that detail all the steps required to build simulations and interactions in Building Interactive Worlds in 3D: Virtual Sets and Pre-Visualization for Games, Film & the Web by Jean-Marc Gauthier: Focal Press, 2005. 422 pages with illustrations. ISBN 0-240-80622-0 ($49.95). Check back to VFXWorld frequently to read new excerpts.

Jean-Marc Gauthier teaches at New York University in the graduate studies department of Interactive Telecommunications and is the author of Interactive 3D Actors and Their Worlds (Morgan Kaufmann Publishers 2000). He is also a consultant at www.tinkering.net and an award-winning 3D artist.