利用者:Gdh/GSoC-2013/Proposal

提供: wiki
移動先: 案内検索

Application and Proposal

Name

Gavin Howard

Contact Information

IRC nick: gdh

Synopsis

My planned project is to add Deformation Motion Blur to the Cycles Render Engine.

Benefits to Blender

Cycles is meant to be a renderer for animations. The biggest thing that sets animations apart from still images is motion of objects. One of the things that animators and artists expect in a renderer is the ability to handle motion blur. Motion blur of whole objects is easy. Most renderers have it. It is more difficult to apply motion blur to certain parts of an object, and it is necessary for animations with rigged characters or objects.

The benefit to Blender and artists from this project would be the ability to have that type of motion blur which would apply in different amounts to different vertices of an object. In the real world, such blur happens all of the time, and artists will benefit greatly from having that ability. Blender in general, and Cycles in particular, will benefit greatly because it will set Blender and Cycles apart as one of the few, if not the only, path tracing renderers that have that ability, which would further their position as the world's premier animation software and renderer.

Deliverables

There are not many deliverables for this project, but in order to help the artists and users better, I have made a list of the ones that I believe will benefit them:

  • Deformation motion blur integrated into the Cycles Render Engine CPU kernel.
  • Detailed design and end-user docs in the Blender Wiki.
  • If deemed necessary, a tutorial to teach end users how to use the new feature.

Astute readers will notice that I only promise to deliver code to integrate Deformation Motion Blur only on the CPU. This is to keep the scope of the project manageable. However, if I do learn quickly, and the feature does not take as long as I think it will, then I will do my best to deliver the following as well:

  • Deformation motion blur integrated into the Cycles Render Engine CUDA kernel.

Project Details

This project will encompass the entire software engineering process. I will do everything from design the implementation, subject to approval, to implementation and testing, to merging into trunk if possible.

I will begin by designing the feature and how it is going to be integrated into the Cycles Render Engine. The design will be subject to approval, of course, and I expect to do several iterations of design. My goal is to choose the optimal design, one which uses as little memory as possible while requiring as little processing time as possible. The design may also include optimizations that I will use to make the code run faster or use less memory. If so, those optimizations will have to be documented both on the wiki and in the code. Based on my deliverables above, I will design for both CPU and CUDA implementations. If I do not have CUDA code finished by the end of the summer, I intend to add it as soon as possible afterward.

After the design is approved, I will begin the coding process. I would like to test the code as much as possible while I am in the process of writing it; that will make the integration testing so much easier. If possible, I would like to welcome some artists to test my code if possible. I will produce weekly custom builds to help with that. I want there to be as much community participation as possible during the coding process. Having active community participation and testing on this project will allow me to catch bugs sooner as well as make the community feel that they are contributing back and that they are making a difference.

After the CPU kernel it finished, I will put it through extensive testing. The community can help here as well. After everything is thoroughly tested, and with the blessing of Ton, Brecht, and other developers, I will merge those features into the trunk.

If there is still time left in the summer, I will begin work on the CUDA implementation. I don't know how much I will be able to do on it, but with help from the community, I might be able to do quite a bit before the summer's end.

BVH and Intersection Considerations

Because deforming objects do not keep their shape, they are likely to break the bounding boxes made for them. If I were to simply create a bounding box that would bound the mesh through all of its deformations for that frame, the bounding box could be terribly slow. However, adding bounding boxes could use excessive memory if not done right.

After looking through the code, I realized that the BVH implements a separate node type that has a BoundBox inside of it. Because the bounding box does not take much memory, and the node handles the interactions with the BVH, I would like to extend the node class to hold a list of bounding boxes, one per segment between sample. It would only hold a list if the bounding box is intended for a deforming mesh. The node would still have one "master" BoundBox, but that BoundBox would be a combination of the BoundBoxes that would hold the mesh's motion blur segments. If I were to do that, I don't think I would have to modify the BVH code at all, except for the node class.

If that were to be implemented, the node class would simply have to look at which segment we want to look at and return that BoundBox. That way, intersection would be nearly the same as it is now; it should not be any less efficient. Memory use would increase, but since bounding boxes are relatively light on memory, that shouldn't be a problem.

Project Schedule

I expect this project to take the entire summer. I will have another summer job at the same time; however, I plan to spend at least 40 hours per week on this project. I plan to make weekly reports that Brecht can present at the developers' meeting on IRC. I will not be present at those meetings because I do not do work like that on Sunday. (It is because of my religion, and I hope that it won't be a problem that I won't attend the developers' meeting.) I also plan to provide custom 64-bit Linux builds with those reports. I do not have any other operating system available, so I won't be able to compile for other operating systems.

Timeline:

  • Late May: Begin design.
  • Early to mid June: Design should be approved, and coding will begin.
  • Mid to late July: Initial coding will be complete, and integration testing will begin.
  • Late August: Testing will be complete. The feature will be ready to merge into trunk.
    • At this time, coding will begin on the CUDA implementation of the feature.

Bio

I am 21 years old. I was born and raised in rural Idaho. I attended Brigham Young University-Idaho for two semesters, and now, I am set to attend Brigham Young University in Utah this fall. My major will be Computer Science - Animation Emphasis. I enjoy movies, and I enjoy programming. I never had any experience in 3D graphics until a friend introduced me to Blender. Since I discovered Blender, I have been slowly gaining experience as an artist. I am not an artist, but I would like to become one. I hope to eventually own an animation studio producing feature-length films with Blender as the star.

I am not very experienced in coding 3D software; however, I have submitted two very trivial patches to Blender. I have submitted a node colors fix and a CMake build fix.

I believe I am the best student for this project for several reasons. One, that is the field I am going into. Two, I am very passionate about what I do; I don't do mediocre work. Three, because I want to use Blender in a studio later in life, I will be motivated to do the best I can beyond whatever motivations I have besides. Even though I am not very experienced, I learn quickly, and I am thorough. I do walk-throughs on my own code, and I test as much as possible. Most of all, I understand that community matters above everything else, and I intend to use that to involve the community from the beginning.