Move Mistiness In XMesh for Maya¶

Introduction¶

When rendering polygon meshes with Motion Blur, the renderer needs to acquire two samples of the object to interpolate the velocities of its vertices. This means that the topology must be consistent to be able to notice matching vertices in both samples.

With Maya primitives, the object will be evaluated at two different times around the frame to be rendered based on the shutter interval specified in the render settings, and as long equally the topology is consistent, the right movement of the vertices volition be calculated.

With Alembic caches though, there are a finite number of samples available on disk, and if the topology was changing, they volition contain incompatible vertex lists. The Alembic cache will not be able to interpolate the velocities in that case, and no Motion Blur will be generated.

XMesh supports two approaches to generating Motion Blur. The default arroyo is saving a Velocity channel at caching time and using this channel to extrapolate the sub-samples at loading fourth dimension. This approach works well with most cases of changing topology. The alternative is interpolating velocities at loading time from the 2 nearest samples. Apparently, this would work, similar with Alembic, simply in the cases of consistent topology. It is useful for saving disk space and speeding up saving fourth dimension when it is known in advance that the topology is not changing over the course of the whole blitheness segment.

A Simple Motion Blur Test¶

Let'southward create a very simple test case and see how the native Maya primitives, the Alembic cache, and the XMesh enshroud interact with the Maya Software Renderer.

The Basic Scene¶

  • Create a Cylinder Polygon Primitive object with a Radius of about 2.5 and a Pinnacle of about 12.
  • Ready the Subdivisions Height value to 100
  • Add a Curve deformer and animate it from 0 degrees on frame ane to 180 degrees on frame 24.
  • Create a second Cylinder Polygon Archaic next to the first i with the same settings.
  • Keyframe the Subdivisions Summit from 1 on frame 1 to 100 on frame 24.
  • Add a Bend deformer and breathing it from 0 degrees on frame ane to 180 degrees on frame 24.

Effect: Playing dorsum the animation or moving the fourth dimension slider volition show two cylinders bending into donuts on frame 24, with the right one likewise changing its tiptop segments over time.

Caching To XMesh¶

  • Select the Cylinder with the changing topology and click the XMesh Saver icon on the XMesh shelf.
  • In the XMesh Saver dialog, the Cylinder will exist added automatically every bit the object to cache.
  • Under Output Path, enter a Name for the sequence, for instance "BendingCylinder"
  • Under Revision, enter "v001"
  • In the Frames To Save panel, press Playback Range to set the Start Frame to 1 and Finish Frame to 24. Get out Samples Per Frame at 1 to save samples simply on total frames.
  • Nether Channels To Salvage, brand sure "Velocity" aqueduct is checked. By default, both Velocity and all other channels except for Normals should be checked.
  • Printing the SAVE XMESH SEQUENCE TO DISK.

RESULT: An XMesh sequence will exist written to deejay. The size of the whole cache folder should be effectually 693,460 bytes (the actual size may vary slightly depending on diverse factors).

../../../_images/xmeshmy_bendcylinder_saverUI.png

Creating An XMesh Loader¶

Now that we have the cache on disk, let's load it back:

  • Click the XMesh Loader icon on the XMesh shelf.
  • Navigate to the cache folder specified in the XMesh Saver Base of operations Path, go down into the sequence proper noun folder and into the version folder.
  • Pick the .MEL file with the same name as the sequence, e.g. BendingCylinder_.mel

Issue: An XMesh Loader volition be created at the world origin and volition load the aforementioned geometry every bit the saved object. Move it along X to the right of the second cylinder we cached.

Caching To Alembic¶

  • Just for comparing, let'south also create an ABC cache using the built-in Alembic plugin.
  • Select the Cylinder with the changing topology.
  • In the Maya Menus, get to Pipeline Cache> Alembic Cache > Export Selection To Alembic…
  • Specify a file name to save, for example BendingCylinder_v001.abc, and salvage.
  • Using Pipeline Cache> Alembic Cache > Import Alembic… to recreate the Cylinder from the cache and move it to the right of the XMesh Loader.

RESULT: We now have two primitive objects and two geometry caches in the scene. The ABC file created should exist around 2,686,302 bytes.

Playing Dorsum The Animation With Subframes¶

  • Open the Time Slider Preferences and uncheck the Snap option to allow the Time to exist changed at sub-frames
  • Drag the Fourth dimension Slider to explore the animation of the scene objects.

Issue: The get-go 3 objects - the consistent topology primitive, the irresolute topology archaic and the XMesh Loader - will play dorsum smoothly. The fourth object, the Alembic cache loader, volition stutter showing simply the full frames it cached due to the disability to interpolate between ii frames with irresolute topology.

Rendering With Movement Blur¶

Nosotros are now gear up to exam the actual Movement Blur rendering.

  • Brand certain you lot are in the Front view
  • Open the Render Settings dialog and switch to resolution of 640x480 in the Common Tab.
  • In the Maya Software tab, expand the Move Blur settings and cheque the Move Blur checkbox.
  • Leave the Motility Mistiness mode at 3D.
  • Leave the Blur By Frame at 1.0.
  • Hit the Render the current frame icon.
  • Click the Display Alpha Channel icon to see the Alpha channel.

Consequence: The beginning and the third objects from the left will be motion blurred slightly.

../../../_images/xmeshmy_bendcylinder_motionblur_blurbyframe1.png

Increasing The Motion Blur¶

  • Increase the Blur Past Frame value to ii.0
  • Re-render the frame

Outcome: The motility blur will be more pronounced on the starting time and third objects. The 2nd (irresolute topology Maya primitive) and the fourth (Alembic cache) volition evidence no motion mistiness.

../../../_images/xmeshmy_bendcylinder_motionblur_blurbyframe2.png

Using The Shutter Interval And Exploring The Limits Of XMesh Motility Mistiness¶

  • In the Return Settings dialog, check the Use Shutter Open up/Close checkbox.
  • Get out the defaults -0.5 / 0.5 values
  • Rerender the frame.

RESULT: The Xmesh object shows only the geometry from the previous frame (every bit compared to the source archaic which shows the current frame), and no motion mistiness is produced. A Warning appears in the script editor proverb

// Warning: line 0: TrenderPolyShape::sample: mesh 'sequenceXMeshShape1' delivered an empty surface. //

../../../_images/xmeshmy_bendcylinder_motionblur_shutter-05_05.png

This shows that we have reached the limit of the XMesh velocity extrapolation capabilities - the two samples requested by the renderer must still be inside the range of the electric current frame.

  • Change the Shutter Close value to 0.49
  • Re-render the frame

RESULT: Now the XMesh Loader is using the aforementioned sample to produce both the Shutter Open and Shutter Close geometries, and the Motion Blur works again!

../../../_images/xmeshmy_bendcylinder_motionblur_shutter-05_049.png

CONCLUSION¶

As you tin can see, the XMesh enshroud not only uses about 4 times less deejay space than Alembic, but is too able to produce Motion Blur where even the Maya Primitive source object that was cached could not!