Maya Asset Export

An excellent reference page for a breakdown of Maya material exports and details can be found here

One thing to note about this reference is they are using the built-in Babylon exporter and there are a few differences to what can be found in this document.

Size

Our current platform does not accept any files that are over 250MB. Ideal size of the file should be lower than 250 MB when uploading to the platform.

Geometry Workflow

Organization is important when exporting assets from Maya or any other 3D software. When it comes to multiple pieces of geometry with different materials, it is best to group them by material used on asset. The object also must be a polygonal piece of geometry – NURBs and other surface modeling creations will not export.

Topology

Going through the optimization process your geometry will most likely be changed to reduce its size for performance, but it is still a good idea to follow proper geometry workflow whenever possible. For faces of geometry use either triangles (tris) or quadrangles (quads), as this will give better results when run through the optimizer. Also check your geometry to make sure all normals are facing the correct way, that smoothing groups are assigned appropriately and that you are not getting any visual errors that would hinder your model.

UVs

It is best practice to create UVs for your assets even if you plan on using a pre-made material due to many materials having texture maps to enhance the material effect. UVs should be located on the base channel as we currently support 1 UV channel.

UV Tiling

In a lot of 3D modeling software you can set the material to tile on its own. However, this tiling doesn’t often translate to an export, and in the case of gltF and usdz, it defaults all materials tilling to 1 x 1, which would make materials that have a pattern that is tiled 15 x 15 (as an example) come out as 1 x 1, and would look much larger.

There are two ways to go about fixing the tiling:

  1. You can use photoshop to create a file where the texture is tiled as much as you need.

OR

  1. You adjust the UV Map to tile by scaling your UVs beyond the 1 value.

In the image on the right we can see the texture and the UVs scaled up and outside the range of 1 in order for the texture to tile across the surface.

Materials and Textures

To avoid having your textures and materials converted it is best to use the PBR workflow involving roughness and metalness. For best results when exporting it is recommended to use the Stingray PBS material for all objects due to the gltF format being based off the Stingray material. The Base Color for the material also needs to be set to white so the albedo shows up properly.

The setup for this type of material is the PBS workflow, the textures should be set up using albedo, AO, metallic, normal and roughness textures. (see below)

When exporting a material, the roughness, metalness and AO will be compiled into the RGB value of a single texture – the way this is created changes depending on your workflow.

When exporting using the Maya Babylon exporter, if your material does not have textures for some channels a black value will be automatically assigned to that value.  For example if you have a roughness but no metalness, in the G you will see your texture, and in the B it will just be a straight black.

Using the portal will not automatically create those filling textures; instead it will fill in the channel that was used for the other values and use those channels.  Turning off those maps in the materials will not be converted so if you only have a roughness, it will still use the AO and metallic channels and use the roughness texture for those channels. It is best to create a plain black material or a quick AO map for those channels to avoid this issue, since it will all be converted to a single texture in the end this will not add to the weight of your file.

Texture Type

The exporter currently supports PNGs. Any other texture file types will be converted to PNGs.

Exporting

You need to make sure Embed Media in the export options is checked so that your textures and materials are saved out with the export.

An embedded FBX retains materials and textures that are buried within the FBX itself. Exporting an FBX with embedded materials is useful because software applications can take that information and extract the materials and associated textures automatically. An FBX that is exported with embedded materials creates a  .fbm folder which is where it stores the materials and textures. When you import an embedded an FBX it’ll automatically create a .fbm folder which contains the textures.

Optimization

Typical game optimization helps achieve the best results. Stick to texture dimensions that are the power of two, 256, 512, 1024, etc. Running the .jpg textures through an external compressor can also bring down the size of your scene especially if you have many textures. Textures may be no bigger than 2048, or they will be automatically compressed.

Troubleshooting

  1. Some geometry comes out dark or black when exported. This is often times a result of the 3D Geometry being inverted or having a custom attributes somewhere attached. The best solution is to go into your native 3D software and make sure the geometry is not inverted. Another solution is to select all the faces that are problematic and detach them from the current model.
  2. If the materials didn’t come out looking right, please make sure that the material name is properly named, with the underscore present. There should not be any spaces in the material name.

Topology:

Going through the optimization process your geometry will most likely be changed to reduce its size for performance, but it is still a good idea to follow proper geometry workflow whenever possible. For faces of geometry use either triangles (tris) or quadrangles (quads), as this will give better results when run through the optimizer. Also check your geometry to make sure all normals are facing the correct way, that smoothing groups are assigned appropriately and that you are not getting any visual errors that would hinder your model.

Animation Pipeline

Maya Exporter

The animation export pipeline for Maya follows a lot of the same guidelines that can be found for game engines. There are some things that must be done differently and some general ideas to keep in mind:

  • For any animations that are going to be scaling into the scene, and scaling out, their default full sized form must be on frame 0, and then you can have on frame 1 the object scaled to 0 and play out its animation. The reason being is if you have the object scaled to 0 on frame 0, there is no size to scale from… like multiplying anything by 0 is still zero, so it needs that state in order to give the system dimensions to work from.
  • Bones are not required to drive animation – objects linked together via hierarchy will inherit their values.
  • There is no material animation support: material key animation in all forms do not translate. Also while material visibility can be used, it cannot be animated, including the visibility track in the graph editor.
  • Animating vertex, either by keys or by a modifier does not work, if you want vertex animation it has to be done through the morph target modifier.
  • It is still best practice to bake out your animation before exporting it as the exporter does not support some interpolation types like Step.
  • None universal scaling is supported. It can be done with a lone object or even a bone skinned to a mesh, however it does not work through unfreezing the bone length and driving it through bone manipulation or constraints. Bone and skin modifiers are supported, which allows more complex animations.

FBX Export Pipeline

Exporting as an FBX and then running it through the system does have some differences that need to be mentioned:

  • FBX does not support dummy objects and other types of none geometry so if your animation is based off these systems you will run into issues. Make sure you convert your objects to FBX supported objects or use Joints to avoid issues.
  • FBX exports do not require having a frame of geometry at full sized in order to have 0 -100 scaling in the animation, so all frames should encompass the animation you are trying to achieve.
  • The FBX will also base the animation length based off the total animation length not what the timeline has as the length of the animation, so all animation will need to be cleaned and presented at the exact length of the animation.

Topology:

Going through the optimization process your geometry will most likely be changed to reduce its size for performance, but it is still a good idea to follow proper geometry workflow whenever possible. For faces of geometry use either triangles (tris) or quadrangles (quads), as this will give better results when run through the optimizer. Also check your geometry to make sure all normals are facing the correct way, that smoothing groups are assigned appropriately and that you are not getting any visual errors that would hinder your model.