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>
}
Ray tracing have started to fascinate me, especially for soft real-time applications like games. Have followed on twitter and bookmarked your blog. Interesting stuff!
If you know of any good reads on the subject I’d love to know.
Keep up the good work, peace
Thanks for the comment, sorry for the late response, coursework deadlines etc..
Indeed, ray tracing is a fascinating topic. It’s high quality rendering capability combined with such simplicity is alluring and makes a great little hobby project. It’s applications in modern games is already becoming more pervasive.
If your interested in programming then I’d recommend ‘Physically Based Rendering’ – Matt Phar. Having said that, there are many good websites to be found just by doing a quick search in Google for ‘ray tracing’. In particular, for ray marching and GPU-based ray tracing techniques I’d recommend checking out Inigo Quilez who runs the http://www.shadertoy.com site. He has some great articles at http://www.iquilezles.org/.
Any chance that this will be released to the public at some point? It could be very helpful in vision research projects.