Tech/LxEngine/Samples/Ray Tracer
From Athile
It may contain inaccurate, incorrect information. Use at your own risk.
Contents |
Overview
The Ray Tracer sample intends to be a basic ray tracer employing the LxEngine MVC model and constructs.
The goal of the sample is to demonstrate how easily a ray-tracer can be constructed such that as close to 100% of development time can be spent on the ray-tracing code and close to 0% on data i/o and display.
Features
The ray tracer sample intends to be a basic ray-tracer familiar to students of an introductory computer graphics course. The code is intended to be as clean, elegant, and instructive as possible. The feature set should never be a priority over the code clarity.
Current Features
|
Planned Features
|
Details
How does a ray tracer fit into the LxEngine architecture?
First, fit it into an MVC model. The Model will be scene data: the geometry, lights, materials, cameras, etc. The View will be of an image. The Controller will be the ray-tracer itself, that processes the model and produces the image.
In LxEngine terms:
- 1 Document for the source scene
- 1 Runtime which adds...
- Components for each Element in the scene
- Index for spatial queries on the scene
- Controller which takes a source Document and produces a second Document that is the output image
- A View that views the output image
- Controller that sends pause, exit messages to the Runtime
Thought: Split the ray-tracer sample into a tutorial, which is a series of samples, each building upon the code from the last and adding text along the way. Use this in conjunction with the Engine Programming book.
Tutorial
- Shell application
- Adding the Model
- Adding the View
- Adding the Ray Tracer
- Adding more object types and attributes
- Adding scripting