Rendering |
![]() |
Digital Image Synthesis, Fall 2005
|
Jump to...
project #2
|
project #1: AcceleratorAssigned: 2005/10/06Due: 2005/10/28 11:59pm results Project descriptionIn this project, you will write an accelerator plug-in for pbrt. Pbrt already has accelerator plug-ins of uniform graid (grid) and Kd-tree (kdtree). You are free to implement any other one, such as hierarchical bounding volume, octree or BSP tree. You can refer to this paper to find out the popular options for ray tracing acceleration and the reference papers for those algorithms. Please notice that your score for this project only depends on the relative rating of your plug-in in the group who implement the same algorithm, not the absolute rating of the whole class in terms of execution time. To maximize the number of algorithms implemented by the class, bonuses will be awarded to those who choose the algorithms less students implement. This is basically an individual project. If you want to team with others, please have my permission first.To add a plug-in for pbrt, assuming that you are adding a "hiererchical bounding volume" accelerator plug-in called hbv, you will do the following
Accelerator "hbv" To extract parameters from the scene file, at the end of the source file of your plug-in, you have something like the following (excerpted from sphere.cpp, the meaning of the above function should be very intuitive.) extern "C" DLLEXPORT Shape *CreateShape(const Transform& o2w, bool reverseOrientation, const ParamSet& params) { float radius = params.FindOneFloat("radius", 1.f); float zmin = params.FindOneFloat("zmin", -radius); float zmax = params.FindOneFloat("zmax", radius); float phimax = params.FindOneFloat("phimax", 360.f); return new Sphere(o2w, reverseOrientation, radius, zmin, zmax, phimax); }For accelerator plug-ins, check the function CreateAccelerator near the end of grid.cpp or kdtree.cpp for examples. You can extract the parameters for your plug-in by calling FindOneFloat and the like. The interface for extracting parameters from ParamSet is defined in core/paramset.*. To sum up, for your project #1, your don't have to touch the pbrt kernel. The only thing you need to do is to add a file under accelerators directory, add it into Makefile and invoke it from scene file. SubmissionYou have to turn in the source code for your plug-in and a very brief report in html format. The report should describe which acceleration algorithm you have implemented (no need to explain the algorithm if you just follow the original algorithm) and what variants you have used. Most importantly, you should test your accelerators on five designated scenes (balls, buddha, tt, sibenik, plants-directsun) and report the execution times of your plug-in and the standard kd-tree plug-in of pbrt. Please be as fair as possible when measuring the execution time for both plug-ins. For example, you should use the same machine and compilation setting for both. After measuring these ten times, please fill them into this xls file and send it to me with your source file and report. Note that the accelerator I measured in this file is the uniform grid provided by pbrt and it is generally 2 to 7 times slower than kd-tree!Reference
|
|||||||
![]() |
![]() |