# Simulate the Motion Blur effect in PBRT - PowerPoint PPT Presentation

PPT – Simulate the Motion Blur effect in PBRT PowerPoint presentation | free to view - id: f46a3-NWRlM

The Adobe Flash plugin is needed to view this content

Get the plugin now

View by Category
Title:

## Simulate the Motion Blur effect in PBRT

Description:

### The basic idea is to interpolate the camera during the period of two timestamps, ... The cameras are interpolated along the track of the transformation from a ... – PowerPoint PPT presentation

Number of Views:299
Avg rating:3.0/5.0
Slides: 15
Provided by: jin153
Category:
Tags:
Transcript and Presenter's Notes

Title: Simulate the Motion Blur effect in PBRT

1
Simulate the Motion Blur effect in PBRT
• using quaternions

2
Motivation and goals
• The motivation of choosing this topic is that I
found the motion blur is a very common effect in
photographing.
• My goal for this project is to implement a new
camera plug-in in PBRT named motionblur to
simulate the motion blur effect.

3
The approach
• The basic idea is to interpolate the camera
during the period of two timestamps, one of which
is the shutter opening time t0 and the other is
the shutter closing time t1. The cameras are
interpolated along the track of the
transformation from a position on t0 to another
position on t1.

4
The approach
• A naive approach is linearly interpolating the
components of the two transformation matrices
individually, but this will not give the accurate
result.
• More sophisticated approaches
• 1. Decompose the matrices into translation and
rotation components, linearly interpolating the
translation components, and interpolating the
rotation with quaternions.
• 2. Directly interpolating the matrices without
decomposition, using Alexas method.

5
The approach
• The decomposition approach is used and
implemented in this project
• For the translation components, the linear
interpolation is used
• Let M0 and M1 be the transformation matrices of
camera at shutter opening time and shutter
closing time respectively, the translation
components for M0 are M003, M013 and
M023, the translation components for M1 are
M103, M113 and M123.
• Let M be the matrix interpolated between M0 and
M1 at time t, where t0 lt t lt t1 and t0 0,
t1 1, the linear interpolation of translation
components are
• M03 (1 t) M003 t M103
• M13 (1 t) M013 t M113
• M23 (1 t) M023 t M123

6
The approach
• For the rotation, a new concept called
quaternion is used
• Definitions of quaternion

7
The approach
• Convert the matrices into unit quaternions
• First, transfer the rotation components of the
transformation matrices M0 and M1 into matrices
in orthogonal system and normalize them to get
M0 and M1. For example
• // normalize x
• M000 M000/sqrt(M0002 M0012
M0022 )
• M001 M001/sqrt(M0002 M0012
M0022 )
• M002 M002/sqrt(M0002 M0012
M0022 )
• // y z cross x
• M010 M021M002 -
M022M001
• M011 M022M000 -
M020M002
• M012 M020M001 -
M021M000
• // normalize y
• M010 M010/sqrt(M0102 M0112
M0122 )
• M011 M011/sqrt(M0102 M0112
M0122 )
• M012 M012/sqrt(M0102 M0112
M0122 )
• // z x cross y
• M020 M001M012 -
M002M011
• M021 M002M010 -
M000M012
• M022 M000M011 -
M001M010
• // normalize z

8
The approach
• Then convert M0 and M1 into quaternions Q0
and Q1, take M0 for example
• Let Q0 (x, y, z), w
• Q0.w 0.5sqrt(M000 M011
M022 1.0)
• Q0.x (M021 - M012)/(4 Q0.w)
• Q0.y (M002 - M020)/(4 Q0.w)
• Q0.z (M010 - M001)/(4 Q0.w)
• Interpolate the quaternions
• Let Q be the quaternion interpolated between Q0
and Q1 at time t
• Q Q0(sinO(1-t)/sinO) Q1(sinOt/sinO), where
cosOQ0Q1.
• Transfer quaternion Q (x, y, z), w back to
transformation matrix Q
• Finally, combine the translation components and
rotation components together to get the
transformation matrix that should be interpolated
at time t.

9
The literatures
• Cook R. L., Porter T., Carpenter L. Distributed
Ray Tracing
• Ken Shoemake Quaternions
• Marc Alexa Linear Combination of Transformations
• Matt Pharr Greg Humphreys Physically Based
Rendering

10
Results
Translation
Scene of motion blur using decomposition approach
Scene of motion blur using naïve approach
Scene at shutter open time
Scene at shutter close time
11
Results
Rotation
Scene of motion blur using decomposition approach
Scene of motion blur using naïve approach
Scene at shutter open time
Scene at shutter close time
12
Critical Evaluation
• The most significant problem for this project is
how to interpolate the rotation components
accurately. Shoemakes paper about quaternion is
helpful to deal with this problem. I read the
paper to understand why the quaternions are
suitable to solve the interpolation of the
rotation
• Another difficulty is that when converting the
matrices into quaternions, the map the rotation
components in of the matrices into an orthogonal
system first, and normalize the components along
x, y, z axis, then they can be convert to
quaternions using the equation mentioned above.
Otherwise, the result will not be correct. In my
implementation, I use a method named
orthoNomalize to deal with it. I also wrote a
quaternion class and overload some operator to
deal with calculation of quaternions.

13
Critical Evaluation Critical Evaluation
• The drawback of the approach is that we need to
decompose the matrices into translation and
rotation components which results with lots of
work, also transferring between matrix and
quaternion is complicated. Alexas paper provides
another solution to interpolate between matrices
directly. However, I failed to implement it due
to the incorrect results of implementing the
logarithm of matrix.

14
Demo