In VFXWorld's last excerpt from The Magic of Houdini, Will Cunningham finishes his analysis of the various kinds of motion blur.
This is the last in a series of excerpts from the Thomson Course Technology book The Magic of Houdini by Will Cunningham. This month, VFXWorld readers conclude learning about the basics of the dominant tool that has been used in the creation of some of the most awe-inspiring animation and cinematic effects ever made.
You have motion blur on objects that are moving around and that is simply super. What about if the object is changing shape? Well, that is where Deformation Blur flies in and says simply super is not enough, man. Remember this general rule of thumb. If the only animation on an object is in the Object's Transform tab, you can just use Transformation Blur and be done with it. However, if anything is animated inside the object at the SOP level, Deformation motion blur will be required. It is important to note that Deformation motion blur also includes Transformation blur, so if you have animation inside the object and animation of the object itself, use Deformation blur and you will get the correct results.
It is even more important to remember the following fact. If your geometry changes point numbers from frame to frame, deformation blur will not work! Deformation blur works by comparing the point positions at the current frame to the point positions at the next frame. If the point numbers or point count change from frame to frame, your motion blur will freak out! Thankfully, Velocity Blur can save you and you will look at it in just a moment.
1. Load the MotionBlurStarter.hip file, if you don't already have it open.
2. Turn on the Display flag of the Tree object. Turn off the Display flag of the Flying_Cube and Debris, if they are not already off.
3. Play the animation back and you will that the tree is deforming. If you want, check out the SOP network for the tree, it's just a Twist SOP with a simple expression moving the tree back and forth.
4. Move to a frame where the tree is moving quickly. Frame 59 seems like a good choice.
5. Render with the fast_mantra ROP. OooOoo and there is no blur.
6. On the Tree object, set the Motion Blur parameter to Deformation Blur. On the fast_mantra ROP in the render commands dialog box, toggle off Render Quality (fine control) so you are again motion blurring raytraced shadows. Render the frame. Woowoo and there is now blur. Figure 1 shows this using the good_mantra output.
7. If you want, toggle back on the Render Quality (fine control) option so that the raytraced shadow is not motion blurred and generate an image sequence to see the blur across numerous frames. All the tips from the Transformation blur section apply here too.
Ahhhhh, wonderful, fanciful, imaginative, save you in the end, Velocity Blur. How many times has this saved a project? By my count, countless times! And I hope that you understand that I can count to at least 89. Velocity Blur is the true unsung hero of Mantra. Well, you can start the singing and tell the tale! I think you may know what comes next. Yes, a bit of poetic prose:
Oh Velocity Blur,Oh Velocity Blur,What is it in your essenceThat so readily makes my renders purr?If at times I overlook your contribution.Please take this, a poem, a song, as my ablution.
Velocity Blur works by taking a vector attribute on the points of the object being rendered and using that to blur the geometry at render time. A vector is simply a direction relative to the point. So, Mantra has all the information it needs to blur the geometry within a single frame! The really cool thing about Velocity Blur is that changing point counts do not matter so you do not have to worry about your geometry's point counts changing frame to frame. Also, you can create your own attribute and actually "motion blur" static geometry for very interesting effects. Before you can fly like a flamingo, you must slither like a snake.
1. Load the MotionBlurStarter.hip file. Make sure the Tree and Flying_Cube objects are not displayed.
2. Make sure you reset to frame one, as this next part uses particles.
3. Turn on the Debris object's Display flag and move to a frame where you can see the rocks. Frame 67 looks fine.
4. Render with fast_mantra, which will render the "rocks" with no motion blur, as shown in Figure 2.
5. In the Render tab of the Debris object, set the Motion Blur parameter to Velocity Attribute Blur. Render again and you now see motion blur as shown in Figure 3 So far, nothing too exciting as you have seen motion blur numerous times already. However, go into the SOP network for the Debris object and there are a couple of interesting things to note.
The first is that you are rendering particles and the number of particles changes per frame. All particle systems have the v (velocity) attribute on them by default. So as long as particles are rendered with Velocity Attribute Motion Blur, it is all well and good.
The second is that there is a Copy SOP copying a polygonal sphere onto the particles. This is a pretty common thing to do (copy geometry onto particles) so it is important to highlight an extra step here. Look at the Copy SOP's parameters in the Attribute page. Use Template Point Attributes is turned on and the To Point is using v in the Set column. This is copying the v attribute from the particle to the sphere that is being copied. This lets the spheres render using velocity motion blur.
Velocity Motion Blur -- The Remix
Now that the basics are out of the way, you can proceed into the realm of sweet delights.
1. Still inside the Debris object, append a Point SOP to the end and turn on its Display and Render flags.
2. In the Particle tab, change Keep Velocity to Add Velocity. Multiple each of the variables by five to get $VX*5, $VY*5, $VZ*5.
- 3. Render with fast_mantra and whoa! Those particles sho nuff do have long motion blur! Figure 4 shows this. In fact, it is as simple as just multiplying the v attribute to control the length of the blur when using Velocity Attribute Motion Blur. When using Deformation or Transformation blur, the only way to control the length of the blur is using the Camera's shutter parameter. In this .hip file, the Camera's shutter is set to 2, which is very unrealistic. A "real" film camera has a shutter that is open for only half a frame so a realistic setting is 0.5. You had it set to 2 so that it was easier to see the blur for the exercises.
4. You can now conjure another trick of the craft using velocity motion blur. You can create your own velocity attribute and have non-moving objects "blur" for cool effects. Go up to the Object level and turn off the display of all the objects except Ground.
5. Enter the Ground Object's SOP network and append a Point SOP at the bottom and don't (never!) forget to turn on its Display and Render flags.
6. Change Keep Velocity to Add Velocity. Delete the channels and set the parameters to 0,1,0 which will define a velocity pointing straight up in the Y axis.
7. Render with the fast_mantra renderer. The ground looks as you would expect, as shown in Figure 5.
8. On the ground object's Render tab, set the Motion Blur to Velocity Attribute Blur and render again. Hmm, more interesting! Figure 6 shows the result.
9. In the ground object's SOP network, turn up the value of the Velocity attribute to 0,10,0 and render it again. Hearken me to the days of hallucinatory ruminations already! Ponder it ye scalawags. The ground itself be smearing, as shown in Figure 7.
10. Wave the wand one last time and pull a blurred bunny out of the stove top ether. In the Y field, enter fit(rand($PT*5),0,1,-10,10) and render again. Sakes alive! Now there is random motion blur going up and down, between -10 and 10. Try turning up the number of divisions in the Grid SOP for a more patchy-looking rendered grid.
Find out more about how to apply each of Houdini's features to your projects as you take on modeling, character animation, particle effects animation, dynamic simulation animation, shading, digital asset creation and rendering. The Magic of Houdini by Will Cunninham. Boston, MA: Thomson Course Technology, 2006. 355 pages with illustrations. ISBN: 1-59863-082-2 ($49.95). Read other excerpts on VFXWorld.
Will Cunningham began his trek by studying both traditional art subjects and 3D computer software at the Academy of Entertainment and Technology. After his studies, he was hired as a Houdini technical intern by Side Effects, the developers of the Houdini software package. Eager to create effects for the big screen, he then jumped into production with BlackBox Digital on the feature,
The Prince and Me. Shortly thereafter, he also began teaching Introduction to Houdini at the Academy and has since taught both the introductory and intermediate Houdini courses. In the fall of 2004, he was awarded a fellowship grant by Santa Monica College to support his efforts in creating this book. Over the years, he has worked for a number of production studios on a variety of projects, including The Chronicles of Narnia: The Lion, the Witch and the Wardrobe, Open Season and Ghost Rider. Currently, he is enjoying effects challenges and learning opportunities at Sony Pictures Imageworks.