首页 > > 详细

解析迭代、Python解析、辅导php编程、asp辅导、调试SPSS

CSE 287
Project - Raytracing
Instructions:
● Your project must be an interactive program that responds to the keystrokes, as outlined in the
keystroke document.
● Videos illustrate the behavior. of the project:
○ Video A
○ 0:00 Introduction
0:30 Lights
1:57 Shadows
2:15 Spotlight
3:25 Tie light to camera/world
5:05 Transparency
5:45 Shapes and textures
○ Video B
○ 0:00 Resizing
0:30 Reflections
1:28 Anti-aliasing
○ Video C
■ 0:00 Two viewports
● You may not talk with students from who have taken this course in previous semesters; you are
expected to complete this project on your own. It is also worth noting that there are subtle
differences between this semester’s code base and previous semesters. In addition, we may run
scripts to detect unnatural similarities between all student submissions.
● You may not use ​glViewport ​or any other ​gl ​or ​glu ​functions. We never talked about
these and you should not be using them. Of course, you may use ​glm ​functions.

(70) REQUIRED FEATURES

1. (38) Lighting, shading, and shadows​​. The lighting/shading of your scene must include:
a. (15) ​​One positional light and the correct implementation of the equations to render the
objects with a realistic appearance. Backfaces must be rendered.
b. (2) ​​Attenuation that can be turned on/off via keystrokes.
c. (6) ​​Spotlight. The spotlight will not illuminate any intersection points that fall outside the
light’s cone. If outside the cone, the light considers the intersection point as black;
otherwise, the intersection point is rendered like a regular positional light. (Note:
spotlights often have a different approach for rendering the interior of the cone. Our class
will simply render the interior of the cone in the normal fashion.)
d. (15) ​​Shadows. Implement shadows by checking shadow feelers for each surface
intersection. If the shadow feeling intersects with another surface before the shadow
feeler reaches the light source, that particular light should provide only ambient
contribution.
2. (8) Objects. ​​Your scene must include, at a minimum, the following objects, each with their own
material common properties (e.g., gold):
a. Cylinder with closed ends and aligned with Y axis.
b. Cylinder with open ends and aligned with X axis.
c. Cone
d. Sphere
e. Plane
3. (8) Textures​​. The Y-oriented cylinder must have its sides (the top and bottom must be solid but
can appear as any material) textured with the any recognizable PPM file that you choose. Do this
by merging the texel value and lighted value (using the underlying, lighted, material property) at a
50-50 proportions.
4. (8) Transparency.​​ At least one object in your scene should be transparent. The position of the
transparent object must be placed on a timer to illustrate that the display is correct, given its
relative position to opaque objects. That is, the transparent object must move in front of and then
behind opaque objects.
5. (8) Resizing​​. The display must not display skewed images when the window is resized.

(30) CHOOSE ANY TWO ADDITIONAL FEATURES - 15 EACH

1. Light tied to world or camera​​. When the light’s position is (10, 10, 10), it is typically thought of
as being at (10, 10, 10) in the global world coordinate system. However, it is sometimes useful to
have the light’s position relative to the camera’s frame. Keystrokes should allow the user to
switch between these two modes. Further, the keystrokes that alter the spotlight’s position and
direction should respond accurately.
2. Reflections​​. Add inter-object reflections by tracing a reflection ray to the closest surface
intersection for each view ray. Once generated, the reflection ray can be traced in exactly the
same way as the viewing rays. The best way to accomplish this is by calling the
traceIndividualRay ​method recursively and adding what it returns to the total color for
the pixel. To do this, it is necessary to keep the recursion from being infinite. This can be
accomplished by adding an additional parameter -- ​depth ​-- to the ​traceIndividualRay
method. This parameter can be decremented prior to each recursive call. The recursion would
stop when the value is less than or equal to zero.
3. Viewports​​. The scene will be rendered from two different vantage points. The two images will
occupy the left and right halves of the screen respectively. The two camera positions must be
chosen in a way to allow the user to obviously see that the two images come from the same scene,
yet different enough to allow the user to discern that the images come from two different vantage
points.
4. Anti-aliasing​​. Because of the discrete nature of raster image
representation, rendered images will include aliasing artifacts.
These artifacts create a jagged or stair stepped in objects that
should appear smooth. In ray tracing applications, anti-aliasing
can be performed by tracing multiple rays per pixel. Your
approach should subdivide each pixel into the, say, 3x3 grid,
casting one ray per subpixel. The resulting color should then be
the average color of the 9 rays (for a 3x3). A 3x3 will provide a
more refined image than a 2x2 or 1x1 grids.

You must provide a report (PDF file) that contains:
● An itemized list of the functionalities that work and those that do not.
● Screenshots of your program’s display should be inserted into your report. The image should
annotated to highlight the functionalities that were completed. This might include, for example,
images of the scene with and without antialiasing.
● If you do not provide a report, missing items, or is inaccurate, 15 points will be automatically
deducted from your overall score. Your report should not be misleading or deceitful.

联系我们
  • QQ:99515681
  • 邮箱:99515681@qq.com
  • 工作时间:8:00-21:00
  • 微信:codinghelp
热点标签

联系我们 - QQ: 99515681 微信:codinghelp
程序辅导网!