Personal Information:
· Name: Zheng CUI
· E-mail address: okmedcui@gmail.com
· IRC & forum nick: okmedcui
· GSOC Link ID: cui
Idea to implement: Raytraced Motion Blur
· Synopsis and Goals.
Description:
Motion Blur (MB) is the blurring or smearing along the direction of relative motion of any object moving with respect to the camera. This smearing may occur on an object that is moving or on a static background if the camera is moving. In a film or television image, this looks natural because the human eye behaves in much the same way. Motion blur adds realism not only to still renders, but to animations as well. There are several approaches to reproduce motion blur in raytracing.
Goals: Implement raytraced & geometry based motion blur and camera motion blur.
· Detailed description.
General algorithm:
Motion blur can be generated by either the translation or transformation of objects or the movement of camera. Camera based motion blur can be generated by selecting a shutter speed that is slightly slower than normal and moving the camera during the exposure. Thus for implementation of ray tracing, these two types of motion blur can be treated as the same kind of problem: calculation of time dependent intersection between a casted ray and bounding boxes. Distributed Ray Tracing (or Distribution Ray Tracing, DRT) is a well know algorithm for reproducing MB.
Conventional algorithm of DRT:
define a shutter interval shutter= -t_start+t_end
construct bounding box throughout the shutter interval
for(int it=0;it<MAXSAMPLES;it++)
pick t between the shutter interval
camera->getposition(t) before it shoots ray //i.e. alter primary_ray.origin if camera moved
shoot primary ray
trace ray
if(shutter==0) it=MAXSAMPLES endif
end forloop
interpolate result
Efficiency concern:
As multi-ray casting per pixel is expensive when MAXSAMPLES is large, it is efficient to take advantage of adaptive sampling. A threshold could be used to control the total number of iterations per forloop. i.e. in case of pixels in static regions, the illumination variance of samples taken within the shutter interval is small, thus small amount of samples are enough; while in case of pixels in MB area (eg. a fast moving object) such variance is big hence more samples should be taken.
Introducing time into scene construction & Inter/Extra-polation:
If user provides time-dependent scene info, implementation of DRT is straightforward. However in most cases, MB uses estimation of objects' positions or shapes based on frame-based scene info. To calculate such estimation, one way is to use an interpolation function, for instance a transformation matrix. Proper interpolation is crucial for realism of this project. Generally, a Lagrangian Motion Blur approach is good enough for the interpolation of vertices at an arbituary time t between frametime1 and frametime2. However for fluid rendering, a Eulerian Motion Blur approach should be applied (Doyub Kimy and Hyeong-Seok Ko, 2007).
Associating with photon map:
The direct lighting will get correctly calculated using DRT; but effects relying on photon map might not be evaluated correctly if affected by MB. Thus, I plan to implement a time dependent photon mapping algorithm (Mike Cammarano and Henrik Wann Jensen,2002).
The algorithm involves:
1. build a time dependent photon map
2. locate nearby photons
3. estimate time dependent radiance
As it associates with photon mapping algorithm, I might seek cooperation with the Progressive Photon Mapping project.
In short, this project will mainly update classes related to ray-object intersections for instance scene, camera, ray, bound, kd_tree, integrator.
· Workflow and Usabitily.
User can specify a shutter interval in millisecond by providing an integer input. Longer shutter interval will result in highly blurred effect. Input 0 to disable MB.
User can adjust the number of MAXSAMPLES –the more samples, the more realistic effect but longer rendering time.
User can adjust the value of a threshold used in adaptive sampling in MB, hence adjust the blur effect. Still there will be a trade-off between realistic effect and rendering time.
· Temptative schedule.
I am currently on exchange in Auckland. I do not need to worry about the grades obtained during exchange, hence it is easy for me to balance between academic work and GSOC, which means, I can spend plenty time working on YafaRay project.
Please refer to the table below for an estimated timeline of the project.
From now till June 14 I can work 14 hr/week. After July 1 I am able to work 56 hr/week.
|
- |
“Gearing Up” Period |
Continue my study on ray tracing and YafaRay source code. Except: |
|
26 Apr |
Designing Period |
Discuss with mentor(s), further study ray tracing or YafaRay if required. Design concrete algorithms. |
|
15 May |
Coding Period1 |
Code & review. Except: |
|
16 Jul |
Coding Period2 |
Discuss with mentor(s). |
|
9 Aug |
Finalization Work |
Scrub codes and documentation. |
Bio:
Hi, my name is Zheng CUI, preferably being called cc or cuiz. I am a year 3 undergraduate student from National University of Singapore, School of Computing. I love coding and used to code some tiny games, enjoy myself playing&debugging them. I have developed a strong interest in Computer Graphics since I took Computer Graphics last semester, and I plan to pursue a higher degree in CG. Essentially I have learnt some fundamental graphics theories including illumination models, lighting&shading, curves, particle systems and ray tracing. I learnt more concepts on ray tracing via online resources and library books. My primary programing language is C and I'm fluent in C++. I have learnt some Java and Pascal however I'm more comfortable with C/C++.
YafaRay is the only organization to which I submit application in GSOC 2010. I just want to focus and try an area that I am really interest in.
I have uploaded some of my programming works related CG to http://www.esnips.com/web/CuiG
There are screenshots of my work of implementing naive DRT on a simple raytracer, and two little games I coded.
References:
1. Mike Cammarano and Henrik Wann Jensen. 2002. Time Dependent Photon Mapping. http://graphics.ucsd.edu/~henrik/papers/time_photon/time_photon.pdf
2. http://en.wikipedia.org/wiki/Motion_blur#Computer_animation
3. http://web.cs.wpi.edu/~matt/courses/cs563/talks/dist_ray/dist.html
4. http://www.cs.columbia.edu/cg/mb/
5. http://graphics.stanford.edu/~boulos/research.htm
6. http://ompf.org/forum/viewtopic.php?f=10&t=537
7. Doyub Kimy and Hyeong-Seok Ko. 2007. Eulerian Motion Blur. http://graphics.snu.ac.kr/publications/conference_proceedings/2007-dykim-egwnp.pdf