個人檔案ThomasGoddard.com相片部落格網路更多 工具 說明

部落格


7 November

Maya to XAML Goes Open Source!!

Maya To XAML is now available to developers at large to help build its integration into Maya.  If you're a 3D graphics developer or just looking to learn more about Maya or XAML, the project is now accepting requests to join so get on over to CodePlex and sign-up!!

Download Microsoft Expression Interactive Designer to easily view and edit the XAML exported from Maya.
9 August

Maya to XAML Updated for Maya 8

An update for Maya to XAML is now available on Highend3D.com.  It has basic support for animation and should work fine with .NET Framework 3.0 July CTP.  See the ReadMe.htm file for detailed changes and specifics on animation.  Hope you enjoy and please let me know if you have any feature requests or issues.
3 March

Maya to XAML February Update

It's finally here!  I got around to creating a release build of Maya to XAML for the February WPF CTP.  It's not quite feature complete but it's getting there.  I added some helpful grouping features so that Maya groups are converted to a <ModelVisual3D> node and the Maya group's content is nested within the <ModelVisual3D.Content> tag.  Transforms are also applied to ModelVisual3D, as well as individual objects, so you get the inherited transform behavior with each transform in it's original state.
 
The export options are updated so that you can specify export, or not, for normals, meshes, lights, cameras, etc...  I added lights and cameras to the exportable objects.  Animation is getting close to completion but I am swamped with higher priority features, like optimized mesh data.
 
Keep a look out for a future release that includes animation, XAML formatting, and a few other helpful features.  Please let me know how I can improve on this plugin so that it's more useful as a tool for professional developers and designers.  Enjoy!
 
21 November

Maya to XAML November CTP

This update fixes some syntax in the XAML and has a couple minor changes to work with November CTP.  Keep a look out for an update that comes with animation export and more!  I havn't had a ton of time lately so I've had to work on it during my days off.  Let me know if you have any other features that you would like to see and I will try to push them into the final build.

Download

New Features

- Updated for the November CTP WinFX Runtime

Get the November CTP Get the November CTP
The November CTP (Community Technology Preview) is the latest version of the WinFX technologies. Included in this version is the WinFX Runtime Components (RTC), Windows SDK and Visual Studio 2005 Extensions for WinFX. (Nov 18, Download details)

- New lines used for mesh data

- Added named meshes and groups

17 October

Exporting a Maya Model to XAML with Textures and Materials

It was a very busy weekend.  I wrapped up the tutorial for exporting Maya meshes to XAML, with textures!  I resolved some bugs in the plugin, and posted an update here:
http://www.highend3d.com/maya/downloads/tools/3d_converters/3782.html

You can find the tutorial below at:
http://www.highend3d.com/maya/tutorials/modeling/polygon/237.html
 
Acknowlegements:  A big thank you goes out to Michael Aarsvold, an employee for EA games, for helping to fix a couple bugs in the Maya To XAML exporter and for providing this cool bug model in this tutorial.  Also, thanks to Brian Buchmann for helping me with some bugs in the Maya To XAML exporter.

This article illustrates the Maya To XAML plug-in, emphasing successful export of model data with textures.  Please note that the plug-in is still in the development beta and still requires a small amount of cleanup before you have the ability to export model and textures.  Future releases will incorporate settings which will allow you to specify these options during the export.

Why export Maya to XAML? This will allow for 3 dimensional interactive user interfaces.  It will not be long before all applications incorporate XAML in one aspect or another.  This tool provides the designer with a bridge to the developer.  

The Original Model:
The example below is a screenshot of the Character created in Maya.  The left screen is the inverse kinematics and mesh (polygon) data.  The right hand screen shows the skin of the object in open GL.


Preparing for your Export
There are a few parts to this model that will need attention before the export.  You will first need to modify your source model.  I recommend that you save a copy of your scene as the clean version used for exporting.  In the scene above, skeleton transforms of the skin must be baked.  Select the top level object group node, in this case "Bug", and choose the Skin > Detach Skin Options Button.  Choose the settings shown below and click detach:

You can delete your models skeleton after you've baked the skin.

You might notice from the picture above, that the right and left side of the bug's body are identical.  Instances of the left side objects were used for the right side of the body.  That is to say, the same polygon point data is used for the right side as is on the left.  The instances must be made into their own polygon points in order to be recognized.  To do this, select the instanced node, duplicate the node, and then delete the instance.  The Maya To XAML plugin does not currently capture instanced nodes, so only one side of the mesh will get exported, unless the instances are turned into their own mesh data, as mentioned above.

Because the mesh instances were exact mirrors of their parent instance, their scale is -1 and their normals are flipped.  The scale needs to be frozen on both groups and objects.  To freeze the scale, select the groups and objects in the outliner and go to Modify > Freeze Transforms Options button.  Choose the settings shown below and click freeze transforms:


After the transforms are frozen, you can either leave the "opposite" attribute checked for automatic normal flipping, which will have the Maya To XAML exporter automatically flip the normals.  This is located in the Shape Node>Render Stats>"opposite", or you can reverse the normals of the uninstanced, frozen mesh, by going to Modeling>Edit Polygons>Normals>Reverse.

Before you export the model, you will need to go to Edit>Delete All By Type>History.  This ensures that no extra mesh objects or other data is exported.  Once you've deleted the history, you can choose "export all" from the file menu and specify XAML.  Exportable scene data is saved to the xaml file.

To view the xaml file, you can try installing the
WinFX SDK September CTP, which comes with a presentation host, for viewing xaml files directly in Internet Explorer.  Checkout the xaml version of the mesh below:


As refinements are made to this plug-in, some of these tasks will be automatically handled by the exporter.  In the meantime, I thank you for testing my product and I hope you enjoy.  You can download the latest plugin at Highend3d.com Send any feedback or screenshots of cool stuff you've done or errors you've encountered.

Glossary of Terms

  • Mesh - The goemetry and polygon data of the 3D model.  Each polygon contains a set of triangles and vertices.
  • Texture- In this tutorial, texture refers to the image or graphic applied to a material on the mesh surface.
  • Skin- The mesh of the model that is bound to a skeleton structure ( joints and bones ).
  • Bake- To make static and permanent or make a set of nodes that contain their own values into a single representation, with the previous nodes values making up the final result.
  • Polygon- A representation of a surface containing a set of vertices, triangles, texture coordinates, and normals.
  • Normal- The point of an edge, vertices, or surface that determines which direction in (x,y,z) it faces.
  • Scene- The space in which all data related to the model is represented.
14 October

Maya to XAML Exporter Updated (materials, textures, transforms)

 
** If you recently downloaded the update for Maya to XAML, I just released a new update again to resolve normal and model direction.

Some Tips on Exporting:
-Some mesh types need to be combined using Polygons>Combine, before exporting.
-Removing groups will ensure that all of your objects are exported. 
-You should delete unused textures and materials before exporting. 
-Delete all by type history will also help to export the mesh properly.
 
So it's been a week since I released Maya to XAML and I'm releasing an updated version already!  The plug-in is now capable of exporting materials, textures, and transforms(rotate,scale,translate).  I anticipate an updated release that includes animation in a couple weeks and a release before that, which will include lights and scene data.  I have a new download location for you as well:

http://www.highend3d.com/maya/downloads/tools/3d_converters/3782.html

I will also have a 3d character demo from a game developer at EA games.  Michael Aarsvold will be developing a rawkin character, with baked textures.  Check back on my site in a few days for the demo/tutorial.
7 October

Symbiotic Design: Maya To XAML Exporter

Symbiotic Design:  Maya To XAML Exporter
Using Alias | Maya with Microsoft Windows Presentation Foundation* aka Avalon

**** Updated For Maya 6, 6.5, and 7.  Now includes textures, materials, and transforms!
Download MayaToXAML Beta 2 
If you receive an error opening the zip directly from the site or the file is empty or corrupted, try right clicking the link and saving the file to your desktop before opening.

* this software is distributed freely, as is, with no warranties. 

Installing Maya To XAML
  • Extract the contents of the compressed file.
  • Copy the correct version of the [MayaVersion]/MayaToXAML.mll file to your bin/plug-ins directory.
  • Copy the scripts/ExportXAML.mel to the Alias/Maya/scripts directory.
  • Launch Maya > and go to the Window Menu > Settings/Preferences > Plug-in Manager...
  • In the Plug-in Manager > Click loaded and auto load next to MayaToXAML.mll

Using Maya To XAML

  • Open or create a new mesh file: File > New Scene or Open Scene...

Note:  If your mesh is NURBS, you will need to convert it to polygons.  To convert to polygons, go to the Modeling view and select the mesh.  In the Edit NURBS menu, click the Rebuild Surface Options button icon.  Choose the Polygons option, in the Output Geometry section and click Rebuild.  You can optionally combine all meshes in your scene, before exporting.  This is suggested, for this version of the exporter, since models are not translated to new XAML scene locations during export.  However if you need to apply materials to each object separately, you can translate the models in Visual Studio .net after exporting.

To export the mesh data, go to the File menu and click the Export All Options icon.  Choose the XAML file type.  The only export items supported in this version are objects, object instances.  Click the Export All button and enter the file name.  The mesh file is exported as a .xaml file to the specified location.

Note:  You must place the scene in a new XAML window in order to use it in a xaml application.

Here are some tests I ran for the exporter.  I ran the export on an 18mb mesh and loaded it up in Visual Studio .net 2005.

Here is the Maya view of the model.  A huge thank you to Mike Fudge, an awesome 3d artist for EA Games.  His works include The Matrix, NHL 2005, and more!


Click to enlarge 

Click to enlarge

Click to enlarge
The final export output in a XAML window with a single light and camera.  MayaToXAML applies a default light, default materials, and a default camera.

Click to enlarge

Click to enlarge

New Features

  • Materials, textures, transformations(rotate,translate,scale).

Future Features

  • Lights, Cameras, Action!(animation).
  • Tutorial on game character with baked textures.
  • Real time XAML preview in Maya.
  • Mac OS X Version.  This is entirely unmanaged C++, so it should be a smooth port.

Known Issues

  • Scene cameras and lights are not exported. A default camera and set of lights are exported instead.
  • Scenes with a very large landscape will have culling issues. To resolve this issue, turn the farplane distance up in the exported camera object.
  • Scenes with some group types do not export. Removing the groups will resolve this issue.
  • Export options do not actually do anything at the moment. All exportable scene data is exported.

A Quick History of Maya and XAML/WPF
Incorporation of 3D design in video production, computer generated animation, and graphics has created a sea change in the entertainment and media industry with the evolution of faster computers and more accessible broadband information access.  At the advent of designing in 3D in the digital space, people could envision the advantages and features that this type of design could have in desktop applications and the internet.  However it was difficult and time consuming to implement.  Resultingly it took some time for this technology to get a foothold in the market.

In the mid to late 1990's companies such as Silicon Graphics (SGI) first explored the possibilities of 3D to enhance the user experience.  SGI broke ground with the first 3D chat and web player called "Cosmo Player".  This application was comprised of basic 3D modeling tools that could create realistic environments where people could meet online in a virtual space.  They could assign themselves a selected Avatar and put that object into an Open GL rendered scene along with other individuals in the same virtual space.  This scenario has become more practical and realistic in more recent times with faster processors and broader technology access.

There were detractors to this setup.  SGI hardware was costly and they realized that they needed to stay on top of their competitors like Max and Lightwave on the Windows platform. Competitors, such as  Alias, released a version of Maya for both Mac and Windows.  Like Apple Mac OS of today, Alias Wavefront was able to develop the software to run on a cheaper Intel chip.  The goal to have entirely real-time photorealistic 3D on desktops by 2010 had been set by most software companies in the graphics sector. 2010- what a revolutionary year that could be when the best in graphics is available to the common PC not just industrial computers.

SGI's commercial assets were Softimage and Alias, software applications.  SGI announced a spin off of Alias | Wavefront into a separate company and Microsoft purchased Softimage.  They both believed there was a future lay in developing these applications.  Meanwhile, SGI banked their future on high end hardware and the Irix OS that is used in medical fields and large government organizations.

Another player in this field was an upstart company based in San Francisco, Macromedia.  They developed a vector based UI called Flash.  Their attempts at creating a desktop application platform were not as successful.  They ran a quick launch with Macromedia Flex but ran into cost issues and Flashes downfall being no windows integration and no propagation into the offline user experience.  This tool was not as attractive to desktop developers because it lacked the integration with core operating system functionality and the desktop development tools.  Arguably, they tried to fix these shortcomings with jGenerator, later known as Lazlo, and Flex.  Flash was developed as a web platform and pushed into the desktop and kiosk markets.  They looked at it from the top down instead of bottom up and pushed a web product as a desktop development tool, vs. a desktop development tool as a web product.  Flash will remain a widely popular platform for the web and will always be the cross platform leader in vector UI.

Maya went from IRIX (SGI) to running on Windows (the same is true for Softimage), and Alias was just acquired by Autodesk.  Alias won an academy award for Mental Ray, "a highly programmable computer-graphics renderer incorporating ray tracing and global illumination to realistically simulate the behavior of light in computer-generated imagery." Alias|Wavefront's Maya received highest honor the Academy can bestow - an Oscar® statuette for "... the development of a 3D animation, dynamics, modeling, and rendering production tool known as Maya.  With its significant and dominant impact on the motion picture industry, the Maya software package offers a robust and widely used commercial visual effects tool with a rich infrastructure for extension and customization.",  so photo realistic that it has changed special effects in the motion picture industry.  Download a free version of Maya Personal Learning Edition at www.alias.com.

Better graphics is the singlemost important feature of a compelling UI, and upstart companies such as Wavefront and Apple realized this.  Enter a surprising player in this field, Microsoft.  Microsoft applications have not been known for their compelling user experience.  Windows is a form meets function application, having none of the aqueous design like Mac OS X, for example.  The dark horse in this race, Microsoft made a non- headline-making purchase of Softimage.  Was this a peek into what they hoped to add to their user experience?  I can only imagine that Microsoft's rationale for this was to fill the gaps with Avalon, their next highly anticipated Windows Presentation Foundation and Windows Forms predecessor.