Skip to content

Commit

Permalink
hw2 text change
Browse files Browse the repository at this point in the history
  • Loading branch information
ziyi-zhang committed Feb 27, 2024
1 parent c63fdbe commit 8537bb4
Showing 1 changed file with 26 additions and 10 deletions.
36 changes: 26 additions & 10 deletions pa2.html
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ <h3>Preliminaries: Updating Nori and downloading scene data</h3>

<p>
Try rendering this new scene. You will find that rendering is <em>very</em> slow.
The reason for this is that the Nori basecode currently implements a brute
The reason for this is that the Nori codebase currently implements a brute
force ray intersection algorithm found in the files
<code>include/nori/accel.h</code> and <code>include/nori/accel.cpp</code>.
Our main concern is the function
Expand All @@ -62,7 +62,7 @@ <h3>Preliminaries: Updating Nori and downloading scene data</h3>

<p>
which traces a ray <code>ray</code> against all triangles and stores the
resulting information in special <code>Intersection</code> data structure.
resulting information in a special <code>Intersection</code> data structure.
The function returns <code>true</code> if an intersection was found and
<code>false</code> otherwise.
The parameter <code>shadowRay</code> signals to the implementation
Expand Down Expand Up @@ -253,21 +253,37 @@ <h3>Part 3: Improved ray traversal <em>(15 points)</em></h3>
<h3>Part 4: Efficiency <em>(40 points)</em></h3>
<div class="text-justify">
<p>
An efficient ray tracing implementation is essential in modern rendering systems, and considerable care is taken to ensure that this operation runs as quickly as possible. A general rule of thumb is that certain expensive C++ constructs should never be used while tracing a ray (i.e. during octree traversal in your case). This includes operations that perform dynamic memory allocation (<code>malloc</code>, the <code>new</code> operator, or STL data structures that internally perform dynamic memory allocation, such as <code>std::vector</code>). Note that this doesn't mean that you can't use <code>std::vector</code>s in your code--in fact, you will find many of them in existing Nori code. However, a <code>std::vector</code> should never be created *per ray* inside performance-critical ray traversal code.
An efficient ray tracing implementation is essential in modern rendering
systems, and considerable care is taken to ensure that this operation runs as
fast as possible. A general rule of thumb is that expensive C++ operations
should never be used while tracing a ray (i.e. during octree traversal in your
case). This includes operations that perform dynamic memory allocation
(<code>malloc</code>, the <code>new</code> operator, or STL data structures that
internally perform dynamic memory allocation, such as
<code>std::vector</code>). Note that this doesn't mean that you can't use
<code>std::vector</code>s in your code--in fact, you will find many of them in
existing Nori code. However, a <code>std::vector</code> should never be created
*per ray* inside performance-critical ray traversal code.
</p>
<p>
In this part, you will be asked to optimize your octree code to achieve the best possible performance.
A speedup of 10k is not absurd, but the exact number depends on your hardware. This part of the grading will take into account the relative performance with others.
A correct implementation with average performance will get 50% of the efficiency points.
In this section, you will be required to enhance the efficiency of your
octree code. A speed improvement of up to 10,000 times is achievable,
although the exact amount may vary depending on your hardware. Your grade
will be based on the level of efficiency improvement you achieve,
categorized into specific groups. There is no need to push for the utmost
limit of optimization as long as you achieve the highest efficiency
category.
</p>
</div>

<h3>Bonus: Hacker Points <em>(5 points)</em></h3>

<div class="alert alert-danger" role="alert"><b>Disclaimer</b>: Hacker points are “underpriced” bonus points
for the daring few. Sometimes you might be required to implement something that was not taught in class and
you might have to do some research and creative thinking. Hacker points are awarded only to students who
implemented all of the remaining assignment, and they are added to the final score.
<div class="alert alert-danger" role="alert"><b>Disclaimer</b>: Hacker points
are “underpriced” bonus points for the daring few. Sometimes you might be
required to implement something that was not taught in class and you might have
to do some research and creative thinking. Hacker points are awarded only to
students who implemented the entire feature correctly, and they are added to
the final score of this assignment.
</div>
<div class="text-justify">
<p>
Expand Down

0 comments on commit 8537bb4

Please sign in to comment.