My implementation of “Lightcuts”(CPU version) – got 100% speed-up
2011-02-10 19:34
417 查看
My CPU version(C/C++) of Lightcuts (http://portal.acm.org/citation.cfm?id=1073318) has been done right now. It rocks, indeed.
(Testing Platform: Intel Core 2 Quad CPU Q6700 @2.66 GHz)
My initial testing sample: 3 venus model (1418 triangles for each, total 4254), and 483 Virtual Point Lights, the original rendering time withOUT Lightcuts is 2505.08s, while it decreases to 1303.61s – that is about 92% speed-up, nearly 100% (about 29% VPL are only important enough, that is, 71% of the non-important VPL have been cut)! Also according to the paper, Lightcuts offers a “strong sub-linear complexity”!
However, it also suffers from some limitations, as the most techniques. There are two steps of Lightcuts processing: 1. traverse the binary light tree and select the right ones; 2. evaluate pixel color linearly using the ones selected from Step 1. So it assumes that intersection computation should be much more expensive than light tree traversal operation. Or, more VPL with simple geometry will emphasize the tree traversal time cost. For example, a scene of 9 simple spheres, 5490 VPLs may even slower than the original linear algorithm. (287.88s for original algorithm, while 345.324s for Lightcuts version, in which 241.378s for tree traversal)
There's some trick when coding traversal piece: according to the paper, the redundance of the light tree is quite obvious, and this gives a perfect scenario for Dynamic Programming. This saves a lot of unnecessary relevance factor computation I believe.
Now check out the two images:
The former one is the image generated withOUT Lightcuts, and the latter one is from Lightcuts. No visual differences!
(Testing Platform: Intel Core 2 Quad CPU Q6700 @2.66 GHz)
My initial testing sample: 3 venus model (1418 triangles for each, total 4254), and 483 Virtual Point Lights, the original rendering time withOUT Lightcuts is 2505.08s, while it decreases to 1303.61s – that is about 92% speed-up, nearly 100% (about 29% VPL are only important enough, that is, 71% of the non-important VPL have been cut)! Also according to the paper, Lightcuts offers a “strong sub-linear complexity”!
However, it also suffers from some limitations, as the most techniques. There are two steps of Lightcuts processing: 1. traverse the binary light tree and select the right ones; 2. evaluate pixel color linearly using the ones selected from Step 1. So it assumes that intersection computation should be much more expensive than light tree traversal operation. Or, more VPL with simple geometry will emphasize the tree traversal time cost. For example, a scene of 9 simple spheres, 5490 VPLs may even slower than the original linear algorithm. (287.88s for original algorithm, while 345.324s for Lightcuts version, in which 241.378s for tree traversal)
There's some trick when coding traversal piece: according to the paper, the redundance of the light tree is quite obvious, and this gives a perfect scenario for Dynamic Programming. This saves a lot of unnecessary relevance factor computation I believe.
Now check out the two images:
The former one is the image generated withOUT Lightcuts, and the latter one is from Lightcuts. No visual differences!
相关文章推荐
- PL/SQL Warning “This is the trial version of PL/SQL Developer You’ve got 5 day(s) left!”
- Back Up of My Blog Page-Skin
- Final version of my GPU Volume Renderer
- My Solution to Lowest Common Ancestor of a Binary Tree(Down-Up Approach)
- The serializable class Myplayer does not declare a static final serialVersionUID field of type long
- The serializable class Myuser does not declare a static final serialVersionUID field of type long
- tracker-store and tracker-miner-fs eating up my CPU on every startup
- My implementation of AVL tree
- tracker-store and tracker-miner-fs eating up my CPU on every startup
- Efficient ticket lock synchronization implementation using early wakeup in the presence of oversubscription
- My Solution to Lowest Common Ancestor of a Binary Tree Part I(Bottom-up Approach)
- [Perl Module] How can I look up the version of CPAN module?
- 297. My son is my son till he has got him a wife, but my daughter is my daughter all the days of her
- C++11: forwarding parameter packs and define my own version of make_shared
- JSF Implementation: go into the world of MyFaces
- [转载]This version of the rendering library is more recent than your version of ADT plug in. Please up
- Customized version of Stack C++(自定义版本)
- My start of git
- Error running app: This version of Android Studio is incompatible with the Gradle Plugin used. Try d
- Java compiler level does not match the version of the installed Java project facet问题处理