Real-Time RaytracerAbstractOverviewThe RaytracerDesign DecisionsNumber representationVector Normalization & DivisionI/O Buses to the Raytracing UnitsModule Description / ImplementationMaster Controller (MC)Vector ProjectionVector NormalizerSRAM ControllerVGA ControllerRaytracing Unit (RTU)IntersectorDividerShaderLights, Shapes, MaterialsSimulation & TestingResultsFuture WorkAcknowledgementsLerer 1 Real-Time Raytracer 6.111 Final Project Adam Lerer, Sam Gross 5/20/2007 Abstract Raytracing is a 3D graphics algorithm used to generate extremely photorealistic images. This paper describes a highly parallelized implementation of a raytracing algorithm implemented in hardware on an FPGA. The system allows for rendering of planes and spheres, and is able to render shadows and reflections. Objects are shaded using the Phong shading model, which combines ambient, diffuse, and specular shading. Scenes can include simple animation, and users are able to navigate in scenes by translation and rotation.Lerer 2REAL-TIME RAYTRACER...................................................................................1 Abstract......................................................................................................................................................... 1 Overview ....................................................................................................................................................... 3 The Raytracer............................................................................................................................................... 4 Design Decisions ........................................................................................................................................... 5 Number representation............................................................................................................................... 5 Vector Normalization & Division.............................................................................................................. 6 I/O Buses to the Raytracing Units ............................................................................................................. 6 Module Description / Implementation..................................................................................................... 10 Master Controller (MC)........................................................................................................................... 10 Vector Projection..................................................................................................................................... 11 Vector Normalizer ................................................................................................................................... 11 SRAM Controller .................................................................................................................................... 12 VGA Controller ....................................................................................................................................... 12 Raytracing Unit (RTU)............................................................................................................................ 12 Intersector ................................................................................................................................................ 13 Divider..................................................................................................................................................... 15 Shader ...................................................................................................................................................... 15 Lights, Shapes, Materials......................................................................................................................... 16 Simulation & Testing ................................................................................................................................. 17 Results ......................................................................................................................................................... 18 Future Work............................................................................................................................................... 18 Acknowledgements..................................................................................................................................... 19Lerer 3Overview Figure 1: Raytraced Image of Three Spheres on a Plane Raytracing is a 3D graphics algorithm used to generate extremely photorealistic images. At each pixel of the screen, the raytracing algorithm finds the ray that goes from the viewer’s eye through that pixel, and determines which objects in the scene that ray intersects with. A color for the pixel is determined by properties of the closest intersected object and the relationship between the intersection and the lights in the scene. To calculate reflections, the algorithm adds the color of a ray reflected off the intersection point to the color of the pixel. Raytracing is a very time-consuming algorithm to compute in software, because the calculation of each pixel is independent and calculation of several intersection tests.Lerer 4 Figure 2: The Principle of Raytracing (Wikipedia) Each intersection test is also expensive, requiring several multiplications and often expensive operations such as division or square-root. Therefore, real-time raytracing in software is not yet realizable for complex scenes. However, the independence of each pixel allows for easy parallelization, which makes it ideally suited for custom hardware. The Raytracer This paper describes a custom digital system that performs raytracing, designed in Verilog and synthesized on the Virtex2-6000 FPGA. The system is made up of several independent raytracing units (RTUs), all controlled by a single master controller. A raytracing unit is given a ray as input and returns the rendered color for that ray. The raytracing unit determines the intersection of the ray with the objects in the scene, and for each light assigns a color to the point based on Phong shading. The raytracing unit also computes reflected rays in order to calculate colors caused by reflection. The master controller is responsible for calculating initial rays for each pixel on the screen and assigning them to raytracing
View Full Document