On this page |
Overview ¶
Motion Blur in Karma requires time samples authored on the USD stage. The quality of the render blur is influenced by render settings.
Karma renders motion blur by default. The defaults should give good transform and deformation blur. If you have bad or no motion blur with Karma, this issue is usually insufficient data in USD.
USD time samples ¶
By default, Houdini only cooks the current frame interactively, which usually works well. In Solaris, animated nodes author USD time samples, but only for the current frame. One time sample is not enough to render motion blur. Many sub-frame samples are necessary when rendering rapidly-changing motion, because USD only supports linear interpolation between authored time samples.
Note
Karma internally represents rotations as quaternions beginning with Houdini 20.0. This means you might not need to author as many samples in USD, to get decent motion blur.
To increase the quality of motion blur, you can use the following nodes to add and manage time sub-samples.
|
The simplest way to author sufficient time samples. If you add this node after the Karma Render Settings, it automatically caches enough time samples to blur across the shutter frame, using the camera set in the render settings. |
|
|
Handy for caching time samples around the current frame, or across the timeline. This node has controls for managing sub-frame sampling as well. |
|
|
Inline, file-based caching of USD files to disk, using an embedded USD ROP. |
|
|
Ideally prims will be exported with enough samples, but if that’s not an option you can use this node to author sub-frame samples based on existing animated transforms in USD. This can create smooth rotational blur for spinning objects like propellers. |
Volumes are not directly stored in USD, so the only way to vary them across time is to animate different volume asset paths at each time sample. You should have a separate volume file for each time-sample.
Cooking Houdini Time Samples Efficiently
In Solaris, Houdini time dependencies can have much more overhead than you might expect, especially coming from SOPs. If you have animated LOP nodes, or animated SOP Imports, add a Cache LOP or File Cache LOP after them in the network. This makes sure that non-animated LOP nodes only cook once, and not every time you change frames.
Even more efficient adding Cache/File Cache node, is setting the Sampling Behavior. Certain LOP nodes support authoring multiple time samples in a single cook. This can be many times faster than using a Cache LOP for a single LOP node with expressions or keyframes. This option uses the shutter settings from a camera prim to author only the necessary time samples. See Sampling Behavior for more information.
Motion blur basics ¶
Once two or more time samples exist on geometry prims, Karma will render transform or geometry motion blur. Karma render settings has Motion Samples from Stage turned on by default, so it uses all time samples across the shutter frame for transform and geometry motion blur. This means adjusting the Transform and Geometry Time Samples is usually unnecessary to get smoother motion blur, as long as there are enough time samples in USD.
Beginning in Houdini 20.0, Karma internally represents transforms as quaternions. This can allow Karma to smoothly interpolate rotations, without requiring artists to author many time samples in USD.
You can set Karma’s motion blur settings per-primitive using a Render Geometry Settings LOP. This lets you target specific objects in the scene, which might need more expensive motion blur settings, without making the entire image slower to render.
Note
To set geometry and transform samples manually, add a Render Settings Edit node and turn off Motion Samples from Stage.
Transform blur ¶
Animated, rigid transforms of primitives and cameras generate motion blur. By default, Karma needs at least two samples to interpolate motion. Increasing the number of samples can give better blur of extremely fast motion.
USD and Hydra only support linear interpolation between time samples. This works for most cases, but fast-rotating primitives will likely need many sub-frame time samples to get accurate blur. Ideally, you should export prims with enough samples, but if that’s not an option you can use the Resample Transforms LOP. It uses existing transform animation in USD to author sub-frame samples and get smooth rotations for spinning objects like propellers.
Transform Blur Properties
Motion Samples From Stage
Instead of choosing the motion samples explicitly, Karma can also choose the motion samples based on the samples authored on the USD stage. This option will choose just the right number of samples to capture the motion described on the stage.
This setting applies to both transform and deformation motion samples for both geometry and instances.
Note: If the samples on the stage don’t align with the shutter times on the camera, it’s possible there will be some minor interpolation issues over the first and last segments (since motion will be truncated rather than interpolated).
Transform Time Samples
The number of samples to compute when rendering transformation motion blur over the shutter open time. The default is 2 samples (at the start and end of the shutter time), giving one blurred segment.
If you have object moving and changing direction extremely quickly, you might want to increase the number of samples to capture the sub-frame direction changes.
In the above example, it requires 40 transformation samples to correctly render the complex motion that occurs within one frame. (This amount of change within a single frame is very unusual and only used as a demonstration.)
Transformation blur simulates blur by interpolating each object’s transformation between frames, so it’s cheap to compute but does not capture surface deformation. To enable blurring deforming geometry, increase karma:object:geosamples.
Geometry/deformation blur ¶
Deforming the points
of a prim over time generates geometry blur. Geometry blur is multiplied with any transformation blur. For geometry blur to work, it needs multiple time samples in USD, and the number of points cannot change between samples.
Note
In USD, points
is a single-precision attribute. Transforms (such as xformOps
) are double-precision.
Geometry Blur Properties
Motion Samples From Stage
Instead of choosing the motion samples explicitly, Karma can also choose the motion samples based on the samples authored on the USD stage. This option will choose just the right number of samples to capture the motion described on the stage.
This setting applies to both transform and deformation motion samples for both geometry and instances.
Note: If the samples on the stage don’t align with the shutter times on the camera, it’s possible there will be some minor interpolation issues over the first and last segments (since motion will be truncated rather than interpolated).
Geometry Time Samples
The number of sub-frame samples to compute when rendering deformation motion blur over the shutter open time. The default is 1 (sample only at the start of the shutter time), giving no deformation blur by default. If you want rapidly deforming geometry to blur properly, you must increase this value to 2 or more. Note that this value is limited by the number of sub-samples available in the USD file being rendered. An exception to this is the USD Skel deformer which allows.
“Deformation” may refer to simple transformations at the Geometry (SOP) level, or actual surface deformation, such as a character or object which changes shape rapidly over the course of a frame.
Objects whose deformations are quite complex within a single frame will require a higher number of Geo Time Samples.
Deformation blur also lets you blur attribute change over the shutter time. For example, if point colors are changing rapidly as the object moves, you can blur the Cd
attribute.
Increasing the number of Geo Time Samples can have an impact on the amount of memory Karma uses. For each additional Sample, Karma must retain a copy of the geometry in memory while it samples across the shutter time. When optimizing your renders, it is a good idea to find the minimum number of Geo Time Samples necessary to create a smooth motion trail.
Deformation blur is ignored for objects that have Velocity motion blur turned on.
Velocity/Acceleration Blur ¶
For particles or mesh topologies that change over time, you can add velocity attributes to generate blur directly. When a velocities
attribute is available, Karma will simply blur along the points in the attribute.
Karma also supports a more natural looking style, acceleration blur. Karma uses accelerations
to blur the points along an arc, rather than linearly along the velocities
vectors. Karma uses the number of geometry time samples to break the path into multiple segments. Three or more samples is necessary for the motion blur to be non-linear. Two samples will give the same results as velocity blur.
Note
Acceleration blur ignores Motion Samples from Stage, since it requires geometry time samples.
Velocity Blur Properties
Velocity Blur
This parameter lets you choose what type of geometry velocity blur to do on an object, if any. Separate from transform blur and deformation blur, you can render motion blur based on point movement, using attributes stored on the points that record change over time. You should use this type of blur if the number points in the geometry changes over time (for example, a particle simulation where points are born and die).
If your geometry changes topology frame-to-frame, Karma will not be able to interpolate the geometry to correctly calculate Motion Blur. In these cases, motion blur can use a velocities
and/or accelerations
attribute which is consistent even while the underlying geometry is changing. The surface of a fluid simulation is a good example of this. In this case, and other types of simulation data, the solvers will automatically create the velocity attribute.
Note
In Solaris, velocities
, accelerations
, and angularVelocities
attributes are equivalent to v
, accel
, and w
in SOPs, respectively.
No Velocity Blur
Do not render motion blur on this object, even if the renderer is set to allow motion blur.
Velocity Blur
To use velocity blur, you must compute and store point velocities in a point attribute velocities
. The renderer uses this attribute, if it exists, to render velocity motion blur (assuming the renderer is set to allow motion blur). The velocities
attribute may be created automatically by simulation nodes (such as particle DOPs), or you can compute and add it using the Point velocity SOP.
The velocities
attribute value is measured in Houdini units per second.
Acceleration Blur
To use acceleration blur, you must compute and store point acceleration in a point attribute accelerations
. The renderer uses this attribute, if it exists, to render multi-segment acceleration motion blur (assuming the renderer is set to allow motion blur). The accel
attribute may be created automatically by simulation nodes, or you can compute and add it using the Point velocity SOP.
When Acceleration Blur is on, if the geometry has a angular velocity attribute (w
), rapid rotation will also be blurred. This should be a vector attribute, where the components represent rotation speeds in radians per second around X, Y, and Z.
When this is set to “Velocity Blur” or “Acceleration Blur”, deformation blur is not applied to the object. When this is set to “Acceleration Blur”, use the karma:object:geosamples property to set the number of acceleration samples.
Point instances ¶
Instance Velocity Blur controls motion blur of geometry instanced onto points. It behaves very similarly to velocity blur. Karma uses velocities
and accelerations
on each instanced point for velocity and acceleration blur. However, instanced motion blur has its own samples control, Instance Motion Samples.
Instance Velocity Blur Properties
Instance Velocity Blur
When defining motion blur on instances, the transform of each instance can be blurred in addition to any motion blur occurring on the prototype. This option controls how the instance will compute the motion blur of the transform on each instance. For example, when instancing prototypes to a particle system, you'd likely want to use velocity blur to compute motion blur (the transform on the prototype would be blurred by the velocity on the particles).
No Velocity Blur
Use deformation blur of the instance to compute the blur on the transform.
Velocity Blur
To use velocity blur, the instance must be a point instancer with velocity attributes on the points.
The velocities
attribute value is measured in Houdini units per second.
Acceleration Blur
To use acceleration blur, the instance must be a point instancer with point velocities and acceleration values. The renderer uses this attribute, if it exists, to render multi-segment acceleration motion blur (assuming the renderer is set to allow motion blur). The accel
attribute may be created automatically by simulation nodes, or you can compute and add it using the Point velocity SOP; this will be converted to accelerations
when the SOP geometry is converted to USD.
Instance Motion Samples
When motion blur on instances is computed using Acceleration Blur or Deformation Blur, this parameter specifies the number of motion segments used for motion blur.