A GUIDE TO MOTION BLUR AND DOF WITH V-Ray
Vray final

TOPICS COVERED:

1. Motion Blur
2. Depth Of Field


Download the scene here
Note: The scene will only work with Max 9.

Vray final

Global Switches

Disable default lights. Leave everything else default.

 
Vray final

Global Illumination and Irradiance Map

- Make sure GI is turned on
- Primary bounces set to Irradiance Map
- Secondary Bounces set to QMC
- Irradiance map preset set to Medium

Vray final

V-Ray Environment

- GI Environment override is turned on and set to 1.0 and given a light yellow color

- Reflection/environment override is enable but it is not necessary for this particular scene

Vray final

Camera Settings

- Check Specify Focus

- Under the Sampling rollout enable Depth of Field and Motion Blur by clicking the checkboxes.

- Enter a value for the subdivs (Higher values will take longer to render)

Note: Enabling DOF or Motion Blur will increase render times.

 
Vray final

Top View

When using Depth Of Field you can adjust where or what you want the camera to focus on by changing the Specify Focus value.


Here I want the camera to focus on the torus knot. So, in the top viewport, I position the focus planes roughly in the center of the torus knot object.

 


Vray final

Rendered View

As you can see, the torus knot is in focus and the more distant objects in the scene slowly fall out of focus.

Vray final

Top View

Now lets change the area of interest to one of the center cylinders.

To do this you simply increase the Specify Focus value so that the focus planes are close to the object/objects you want to focus on.


 
Vray final

Rendered View

As you can see, the torus knot is now blurred and the central cylinder is in focus.

Note: you can animate the Specify Focus spinner. Just know that with DOF enabled you may be looking at some high render times

Vray final
Motion Blur OFF

Motion Blur

In this example of motion blur the yellow sphere moves across the scene over a period of 20 frames.

Note: Motion blur is disabled in the image on the left.

Vray final
Motion Blur ON




Enable Motion Blur by clicking the checkbox. For this example I used a value of 32 for the subdivs. (Higher subdiv values will increase rendertimes)


Here is a more detailed explanation of V-Ray's motion blur courtesy of John O'Connell | http://www.joconnell.com


Vray tries to replicate how a camera works which is by opening the shutter and closing it again every frame - what it's doing is correct, it's capturing the objects movement from where it was at the start of the frame (lets say frame 1 for arguments sake) and where it ends up (lets say frame 2).

When vray calculates the blur, it does it using sub frame sampling to determine how the object has travelled between frames 1 and 2 and thus catches all of the positions in between.

How many positions in between is determined by the motion blur geometry samples. The default of 2 isn't great, it'll sample the object at its starting position frame 1, and it's end position frame 2. This is a linear blur between the two positions and if the object rotates or arcs in any way, it'll make a boxy looking blur. If you set the geometry samples to 3, it'll add another sample and sample the objects position at 3 places. Frame 1, frame 1.5 (cut down the middle) and then frame 2. If you set it to 4 samples, you'll get better arcs again since it'll get the object at frame 1, frame 1.33, frame 1.66 and frame 2.

What vray is doing is totally correct, but what we're used to seeing is the scanline vector motion blur. As you can see, the vray blur moves the object off it's position and rotation when you turn on blur into a place between where it starts and finishes. The scanline doesn't, it simply makes a rough motion vector of how the object moves and smudges it along the direction of the vector without changing its position or rotation. Lets take for example an object that moves from the left of screen to the right of screen in 1 frame. If you render this in vray, you'll correctly get the object positioned between the left and right with motion blur. In the scanline, it'll render the object in the position it started from in frame 1, and then smear the object in the direction of where it's headed - most importantly the centre of the blur is not halfway between where the object started and finished, but right where the object started from. What this gives the effect of, is that the object had actually started further to the left than at frame 1 and is moving to the right. Here's a diagram:

Vray final

On the top line you have a set of 3 frames rendered with no blur in the scanline - vray would look the same.

On the second line you have the scanline vector smudge. If you notice how it's working, it renders the object in place, then smudges across it based on the direction it was moving between the current frame and the previous frame. In this case frame one is wrong technically since it's not seeing how the object is moving between frames one and two. Likewise frame 3 is wrong since the object is getting some blur - its come to a total halt at frame 3.

On the bottom line is vray blur which in this case is getting that the object is moving between the left and middle and sampling it as it moves - it's correct in this case. Again the second image shows it moving between the middle and right positions so vray gets it correct here too sampling again as it moves. On the last image, the sphere has come to a halt so it correctly gets no blur.

Here's an image set to inteval 0:

Vray final


Now that's all very well and good but what it we dont want technical accuracy - where would we need vrays blur to behave like the scanline blur? Loads of places. There could be times that you need to render in the scanline and combine this with a vray render - there might be an effect that only renders in the scanline or is quicker to render in the scanline such as transparency mapped hair like hairFX or even afterburn (I know it works - its just an example). You might want to render a series of matte passes in the scanline for speed reasons.

Thankfully vray gives us a control to determine where it's taking as the point to base its blur around - we can see that the scanline blurs on the frame whereas vray blurs between frames. This control is called interval center in the vray camera dialog in the render settings. If you set that value to 0, it centres the blur around the start of the frame. 0.5 (default) is based halfway between frames and is the most correct, and 1 will center the blur around the end of the frame (probably least useful). So if you want to get closer to the scanline, set your interval center to 0.


ALL CONTENT © 2006 V-Ray ELITE
UNLESS NOTED OTHERWISE
ALL 3DS MAX FILES AND TUTORIALS WERE CREATED
BY JOE PIZZINI UNLESS NOTED OTHERWISE

V-Ray ELITE IS NOT AFFILIATED IN ANY WAY WITH CHAOS GROUP THE MAKERS OF V-Ray. V-Ray ELITE.COM IS ADMINISTERED BY JOE PIZZINI
DUE TO THE HIGH VOLUME OF EMAILS, USERS OF V-Ray ELITE.COM ARE ENCOURAGED
TO ASK V-Ray RELATED QUESTIONS ON THE OFFICIAL SUPPORT FORUMS