DirectX Extensions for Alias Maya

The Maya plug-in enables game developers to create, edit, and preview high-level shader language (HLSL) shaders in real-time within Maya. The plug-in also supports exporting a shader into a DirectX .x file.

The plug-in works with Alias Maya version 6.0 and 6.5.

Compatibility Chart

Direct3D 9 Direct3D 9 EX Direct3D 10 64-bit Native Mode Windows XP Windows Vista

Yes

No

No

No

Yes

Yes

Installing the Plug-in

The plug-in is installed automatically by the DirectX SDK setup program. There is no need to move or copy files on your machine.

Loading the Plug-in

The plug-in is loaded into Maya via the plug-in manager window. This menu is in the top level Window menu, under the submenu Settings/Preferences. Choose the Plug-in Manager option.

In the plug-in manager, scroll down near the bottom to find the D3D exporter plug-in and choose the loaded option to load the plug-in. If you select the auto-load option, the plug-in will be loaded every time Maya is started.

Hint: The D3D Exporter plug-in is named for the version of Maya that you are running: for instance, D3DMaya6ExportX.mll or D3DMaya65ExportX.mll.

Creating a DirectX material

First, to associate your geometry with a effect (.fx) file, create a DirectX material and associate it with the geometry in Maya. Here is one way to create a DirectX material:

  1. Launch Maya
  2. Import a scene from the File/Import... menu item.
  3. From the Window menu, select Rendering Editors and Hypershade. Verify that the Materials tab is active.
  4. In the Create Bar, make sure the Create tab is active, and click on the DirectX Shader surface which will create an empty material object.

Exporting to a .x File

You can export geometry, animation, and skinning data to a .x file. First, set up the exporter options from the DirectX menu:

The options are a series of Booleans that determine what type of data is exported. These include:

Once the export options are set, export data by choosing the Export All from the DirectX menu:

This opens the scene window to allow you to save a .x file. Enter the name of the .x file in the filename text box and click the save button.

Preview Effect Parameters in Real-Time

Once there is a DirectX shader associated with the geometry, you can view the shader on the geometry in real-time.

  1. Open the hypershade window and make the DirectX material visible. (The one we created was called DirectXShader1).

  2. Launch the Attribute Editor for the shader object by right-clicking on the DirectXShader1 material and selecting the DirectXShader1... menu item. Here's what the Attribute Editor looks like when it opens up:

  3. Associate an effect file (.fx) with the material by clicking on the browse button next to the DirectX Effect File text box. You might need to minimize the Hypershader window so you can work in the Attribute Editor window. We chose the default.fx file that ships in the SDK Media folder.

    The effect parameters are loaded into the Attribute Editor.
  4. Launch the Direct3D preview pipeline window from the DirectX/Viewers.../Floating menu item.

    This window displays the scene with the HLSL effect just as it will appear when Direct3D renders it.

    Note    When nodes not being monitored by the DirectX plug-in are changed, they may effect monitored nodes but because the original change was in an unmonitored node, the rendered output will not update. In this case, select the Rebuild All option from the DirectX menu to update the rendered output and see your changes.