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 WorkAcknowledgementsLererReal-Time Raytracer6.111 Final ProjectAdam Lerer, Sam Gross5/20/2007AbstractRaytracing 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.1LererREAL-TIME RAYTRACER.....................................................................................1Abstract...........................................................................................................................................................1Overview..........................................................................................................................................................3The Raytracer.................................................................................................................................................4Design Decisions..............................................................................................................................................5Number representation.................................................................................................................................5Vector Normalization & Division................................................................................................................6I/O Buses to the Raytracing Units...............................................................................................................7Module Description / Implementation.......................................................................................................10Master Controller (MC).............................................................................................................................10Vector Projection........................................................................................................................................11Vector Normalizer......................................................................................................................................11SRAM Controller.......................................................................................................................................12VGA Controller.........................................................................................................................................12Raytracing Unit (RTU)..............................................................................................................................12Intersector..................................................................................................................................................13Divider.......................................................................................................................................................15Shader........................................................................................................................................................15Lights, Shapes, Materials...........................................................................................................................16Simulation & Testing....................................................................................................................................17Results............................................................................................................................................................18Future Work..................................................................................................................................................18Acknowledgements.......................................................................................................................................192LererOverviewFigure 1: Raytraced Image of Three Spheres on a PlaneRaytracing 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. 3LererFigure 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 RaytracerThis paper describes a custom digital system that performs raytracing, designed inVerilog 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 foreach 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 units. The master controller also synchronizesthe
View Full Document