RawKee 1.0 X3D Exporter Plug-in for Maya
Now with HAnim Enhancements and Installer File!

Download the RawKee 1.0 installation files from the RawKee Web Site.

View your exported Characater with Flux Player.

Send Feedback to: Aaron.Bergstrom@ndsu.edu

New Feature: X3D Character Editor

In the past a content author using RawKee had to manually connect the appropriate attributes and routes using the X3D Interaction Editor in order to prepare a Character Rig for export. Without any tutorials, this basically meant that I was the only person who knew how to do it. In addition, the process was rather tedious, and would even take me a couple of hours to complete. The addition of the X3D Character Editor to the RawKee plug-in now allows the author to easily prepare his/her characters for export with just a handful of mouse clicks.

Important items to remember!
Though the new HAnim export system in rawkee beta4 takes into account both the RotateAxis and JointOrient attributes of a Maya Joint node, you still must take care in how you setup your character rigs and how you bind your meshes to them.

Item number 1: Your root joint must be a child of a transform node. From now on I will refer to this transform node as the "avatar node". This avatar node should have no additional children except for the children that are placed within it by the X3D Character Editor.

Item number 2: The avatar node must be a sybling of the the transform node that holds the mesh node of the mesh you wish to bind to your skeleton. The avatar node must have the same attribute settings as the mesh's transform node.

Item number 3: Before you bind the mesh to the skeleton, all of the "rotate" attributes of all your skeleton's joint nodes must be set to "0 0 0" on the timeline's 0 frame. After you bind the mesh, all of the "rotate" attributes must remain set to "0 0 0" on the 0 frame.

Item number 4: Please be sure that "HAnim - Level-1" is selected in the export options before you proceed to using the X3D Character Editor.

How to use the X3D Character Editor
After you have animated your character, simply select the X3D Character Editor menu item from the RawKee (X3D) drop-down menu. Fig. 1 shows the location of this menu item. Once this item is selected, the X3D Character Editor window will appear as shown in Fig. 2.

The first step in setting up a character is to add an x3dTimeSensor to the scene. This may be done by righ-clicking over the "Time Sensors" text list to bring up a popup menu that has a "Create New TimeSensor" menu item. Select this menu item and a new x3dTimeSensor will be added to the scene, the name of which will appear in the "Time Sensors" text list and be automatically selected. At the same time, all of the avatar nodes in the scene that are not yet connected to the new x3dTimeSensor will be listed in the "Unassociated Characters" text list. At this point, this should be all of the avatar nodes. See Fig. 3.

To associate an avatar node with a x3dTimeSensor node, select the name of the unassociated avatar node in the "Unassociated Characters" text list and then right click over that list to bring up a popup menu that contains a menu item of "Assign Selected Character". Once you select this menu item, the unassigned avatar will be assigned to the x3dTimeSensor node. Avatar nodes can be assigned to multiple x3dTimeSensors. Once assigned, the avatar will be listed in the "Associated Characters" text list. In order to display an avatar node's character rig, simply click on the avatar's name in the "Associated Characters" text list. The avatar and its complete skeleton will be displayed in the "Character Joints" text list as in Fig. 4.

Next you must create the appropriate interpolator nodes, attribute connections, and x3dRoute nodes for your avatar in order for the animation to be prepared for export. While a previously tedious task, this is now very easy with the X3D Character Editor. Simply highlight the nodes in the "Character Joints" list that you wish to be animated, right-click over the "Character Joints" to pull up a popup menu which contains the following menu items: None, Translate, Rotate, and Both. Whichever item you check will setup/remove the appropriate interpolator nodes, attribute connections, and x3dRoute nodes for all of the joints (and avatar) that have been hightlighted. After you have added the appropriate animation nodes in this maner a "T", "R", or "T R" will appear next to the node name to let you know which nodes have which type of animation associated with them. Note, the "scale" attribute of the avatar node is not supported through this interface. Should you wish to animate the avatar node's scale attribute, you must do so through the X3D Animation Editor. Fig. 5.

Lastly, you'll want to set the x3dTimeSensor settings that determine which part of Maya's timeline is used to export data. This is done through the "TimeSensor Settings" panel of the "X3D Character Editor".

Once you have set the x3dTimeSensor settings to the appropriate values, simply close the X3D Character Editor. Now you are ready to export!

If you wish to only export the x3dTimeSensor and appropriate animation data and not the character rig itself, simply select the x3dPositionInterpolator, x3dOrientationInterpolator, and x3dTimeSensor nodes that you wish to export. Turn off the "Export Textures" feature in the export settings before you export, and export using Maya's "Export Selected" mode.

Help! I screwed up my Character Rig! - How to use the x3dMend procedure.
The X3D Character Editor creates and destroys a large number of nodes, expression scripts, and Maya attributes so you do not have to do so. However, in order to do this, the editor makes certain assumptions about how your nodes are named. Once you have prepared your avatar node for export, you should not do any of the following:

Doing so will cause your character animations to export in an undefined manner, and will probably also make it so the character can not be processed by the X3D Character Editor.

Fortunately, after many aggrivating mistakes on my part, I decided to make a set of proceedures to fix any of these silly mistakes made by the author. However, you only need to concern yourself with one of them "x3dMend".

The "x3dMend" proceedure will attempt to fix these mistakes. While it won't completely correct every error, 99% of the time it will be able to reset your character rig so that it can again be used with the X3D Character Editor. To use this procedure you simply need to type the procedure name and then the avatar node name. For instance, should you have an avatar node name of "bocifus", you simply type the following mel command into the Maya command line:

x3dMend bocifus

It's as simple as that. Now you can once again process the avatar node using the editor.

New Feature: X3D Animation Editor

RawKee is a fairly powerful X3D authoring environment because it allows the content author to setup triggers, scripting, and routing from within Maya. However, for some things like exporting large numbers of transform animations, this can become quite complex and tedious. Because this, I added a UI tool that works in conjunction with X3D Interaction Editor to speed along export setup of transform animations. This editor is called the X3D Animation Editor.

The X3D Animation Editor allows you to setup X3D animation exports for any Maya transform node types that include: transform, lodGroup, x3dInline, x3dAnchor, x3dSwitch, and x3dCollision. In X3D and VRML nodes such as Inline, LOD, Anchor, Switch, and Collision do not normally have "translation", "scale", and "rotation" fields. But their counterparts in Maya are objects that have inherited properties from the Maya transform node, and therefore can be animated and "frozen" in Maya. So when the lodGroup, x3dInline, x3dAnchor, x3dSwitch, and x3dCollision nodes are exported to X3D they are actually exported in the following maner:

  

<Transform DEF='SomeInlineParent'>
<Inline DEF='SomeInline'/>
</Transform>

So really you are still animating just a transform node.

Avatar nodes (transform nodes that have a root joint as a child such as that described in the section above concerning the X3D Character Editor) export as HAnimHumanoid nodes. Though you can setup scale animations for such an avatar node using the X3D Animation Editor, you cannot setup translate or rotate animations. To setup these types of animations for an avatar node, you must use the X3D Character Editor.

The first step in setting up an animation is actually animate your grouping nodes as you normally would in Maya. Next you need to open the X3D Animation Editor. However, you must first select at least one node that is of one of the following node types: transform, lodGroup, x3dInline, x3dAnchor, x3dSwitch, and x3dCollision. From now on I will refer to these node types as grouping nodes. Do not select a grouping node that is a decendent of any other selected grouping node as the X3D Animation Editor will provide you with a means to access and setup the decendent for export. Once you have selected one or more grouping nodes (in a manner as shown in Fig. 6), select the "X3D Animation Editor" menu item from the "RawKee (X3D)" drop-down menu (Fig. 1). Should you have selected the a non-grouping node or no node at all, Maya will provide you with the following warning: "Incorrect Grouping Node Selected." When the X3D Animation Editor has been opened you will see something similar to Fig. 7.

Next, if you do not already have an x3dTimeSensor node in the scene you must add one. This may be done by righ-clicking over the "Time Sensors" text list to bring up a popup menu that has a "Create New TimeSensor" menu item. Select this menu item and a new x3dTimeSensor will be added to the scene, the name of which will appear in the "Time Sensors" text list and be automatically selected. See Fig. 8. As with the X3D Character Editor, the X3D Animation Editor allows you to associate grouping nodes with multiple x3dTimeSensors.

The grouping nodes available for animation export setup are listed in the "Grouping Nodes" text list. Simply select the nodes in this list to which you wish to add animation information. Next, check one or more of the X3D Fields to be animated: Translation, Rotation, and/or Scale. See Fig. 9. Finally, press the "Set Interpolators" button, and the appropriate x3dPositionInterpolator, x3dOrientationInterpolator, and x3dRoute nodes will be added to the scene. See Fig. 10. Other types of animations and routing will still need to be done through the X3D Interaction Editor. Your animations are now ready to be exported.

Unlike the X3D Character Editor, nodes added via X3D Animation Editor can be messed with outside of the editor. Should you delete something, well that's your business. It's not going to mess too much up. You can rename nodes as well. However, you can still remove your animation setup nodes through the X3D Animation Editor. Select the branch of the tree (as described above) for which you wish to alter the animation export and open the X3D Animation Editor. Select the x3dTimeSensor to which you associated animation export. Then select the appropriate grouping nodes. Check or uncheck the animation fields as you desire and click the "Set Interpolators" button. Your interpolator and routing nodes will be added or deleted accordingly.

As with the X3D Character Editor, you can change your x3dTimeSensor settings in the X3D Animation Editor's "TimeSensor Settings" section. This section of the X3D Animation Editor operates in the same manner as it does in the X3D Character Editor.

Good Luck and Have Fun!!!