I was recently asked to put together a video showcasing my ray tracing project for the University of Hull to show some of the new Computer Science students starting this September. As detailed in my last post, ray tracing was the subject of my third year dissertation project and I have since been extending the project into real-time using DirectX 11, endeavouring hopefully to continue it as part of my MSc by creating a rendering program that can be used to design and produce complex implicit ray marched geometry through a simple UI interface.
The video unfortunately had to be recorded at 640×480 resolution to maintain good FPS due to my aging laptop GPU (around 4 years old now!). As a result, I recommend not viewing it in full-screen to avoid scaling ‘fuzziness’.
Scene Loading:
Recently I have been working on a scene loading system for it in preparation for implementing a UI with the ability to save and load created scenes. I developed a scene scripting format that allows simple definition of the various distance functions that make up a scene, along with material types and lighting properties. The scene loader parses a scene file and then procedurally generates the HLSL distance field code that will be executed in the pixel shader to render the scene. I’ve used a similar looking format to POVRay’s scene files.
light
{
position <-1.5, 3, -4.5>
}
sphere
{
radius 1
position <-2,1,0>
}
{
diffuse <1,0,0,0.25>
specular <1,1,1,25>
}
plane
{
normal <0,1,0>
}
material
{
diffuse <0.5,1,0.5,0.5>
specular <1,1,1,99>
}
{
threshold 1
blend
{
threshold 1
blend
{
threshold 1
sphere
{
radius 1
position <-2,1,0>
}
sphere
{
radius 1
position <2,1,0>
}
}
sphere
{
radius 1
position <0,2,0>
}
}
sphere
{
radius 1
position <0,1,-2>
}
}
material
{
diffuse <1,0,1,0.25>
specular <1,1,1,25>
}
light
{
position <-1.5, 3, -4.5>
}
repeatBegin
{
frequency <8.1,0,8.1>
}
twistY
{
magnitude 0.04
box
{
dimensions <1,4,1>
position <0,3,0>
}
}
material
{
diffuse <1,0.5,0,0.1>
specular <1,1,1,5>
}
sphere
{
radius 2
position <0,9,0>
}
material
{
diffuse <0,0.5,1,0.5>
specular <1,1,1,30>
}
repeatEnd
plane
{
normal <0,1,0>
}
material
{
diffuse <0.2,0.2,0.2,0.5>
specular <1,1,1,99>
}