Starting up the ray tracer coding

At last I am starting the coding part after making some decision about the spects of the project

here are the spects:

Type

Priority

Ray
Tracing Method

Backward
ray tracing

1st
priority

Primitive
Types

Sphere and Plane

1st
priority

Triangles

2nd
priority

Meshes

3rd priority

Super
Sampling (anti aliasing, soft shadows)

Fixed

2nd
priority

Dynamic

3rd priority

Main
Data Structure

KD
Tree

1st
priority

Job
Distribution Method

Fixed

1st
priority

Dynamic

2nd priority

Texturing
(2D-3D)

2D texturing

2nd
priority task

3D texturing

4th
priority

Diffuse
Lightning

N/A (will be considered during development time)

So the project is mostly focused on multiprocessing and implementation of the acceleration structure.

One of the important decisions I made is about development process. I want to follow an evolutional method during development. First of all I’ll create a very basic framework to build up my the ray-tracer. At the moment I am working on that framework and already got some results and probably will put a uml diagram of my framework. At the very beginning I wanted to implement the ray-tracer with minimum use of object oriented patterns. However, it really was a pain in the neck. After creating a pure procedural screen-paint-only structure (which only paints the screen) I started implementing a more object oriented one.

I got these results for only screen painting (just setting the color codes of the pixel in a 800×600 window (by the way I am using windows functions to do that, probably will move to OpenGL frambuffers anyway))

Almost completely procedural

Much more object Oriented

start =
49171717, end = 49174713, render time for 1001 times = 334.112139 frames/sec

start =
17424906, end = 17427921, render time for 1001 times = 332.006623 frames/sec

start =
49175571, end = 49178597, render time for 1001 times = 330.799725 frames/sec

start =
19881640, end = 19884640, render time for 1001 times = 333.666656 frames/sec

start =
49179814, end = 49182809, render time for 1001 times = 334.223695 frames/sec

start =
19885890, end = 19888921, render time for 1001 times = 33254031 frames/sec

Leave a Reply