MNRT 1.00 Source Code and Documentation

05 Dec 2010

Finally I can provide a link where you can download the source code for the initial release of MNRT (version 1.00). At first, I tried to place the code on Google Code, as I read a lot of its simplicity. However I got some server error during registration, which seemed to be related to the Mercurial revision control system. Consequently I wasn’t able to connect to the Mercurial repository.

However I did not want to give up the time I spent reading about Mercurial. So I tried another Mercurial-based code hosting provider, namely CodePlex, Microsoft’s counterpart to Google Code. Up to now I like this system very much. I only encountered problems uploading my huge project to the repository (using hg push <host>). They were related to my slow upload connection, as I got timeout errors.

The solution was to upload revision by revision using hg push -r <number> <host>. However I did not have more than one revision as I unfortunately developed MNRT without any revision control. So I created virtual revisions by adding the source files in chunks (core files, GUI files, …). I call them virtual, as they are not related to some development process.

The resulting repository at CodePlex can be found here:

MNRT project on CodePlex.

A comprehensive source code documentation created using Doxygen is available here:

MNRT source code documentation.


Please note that it's not possible to submit additional comments. The comment form did not make it into this version of my site.

By: rusty 16 Dec 2010

Hi, very interesting work. Could you please make a video for people without fast CUDA enabled GPUs to see how it runs?

Thanks in advance.

By: Mathias 17 Dec 2010

Hi rusty,

my application isn’t that well suited for real time applications, yet. I get about 0.5 – 3 fps on a GTX 460 using temporal coherency, but that component of MNRT is highly experimental.

With ray tracing only, good frame rates are possible, but that depends on whether the kd-tree is reconstructed every frame (dynamic scene ‘emulation’ mode) or not.

I believe a video about ray tracing only performance on CUDA would not be that interesting (my test scenes aren’t interesting enough). On the other side, a video showing very low frame rates for photon mapping + ray tracing + dynamic kd-tree isn’t pretty either.

However I will look into it and check for possible stuff for a video. But I cannot promise anything.


By: Alex Norcliffe 22 Dec 2010

Hi – quick question, sorry it’s a little off topic to MNRT but I came across this post because I’m trying to run ‘hg push -r’ to CodePlex and am getting errors such as “abort: error: An existing connection was forcibly closed by the remote host” even when trying to push one revision greater than that which is already pushed.

Did you successfully use this with CodePlex, and if so did you run into any quirks? I’m trying to use it to solve the exact same problem – doing a whole push of our changes transfers about 80MB and then just returns “503 Bad Gateway”

Many thanks for any reply
Alex Norcliffe

By: Mathias 22 Dec 2010

Hi Alex,

unfortunately I forgot the exact error messages I got when trying to push the whole package of MNRT at once. I believe it was a “504 Gateway Time-out”. It however took ages till that error message popped up. The transfer still took lots of time after I partitioned MNRT into chunks, but I encountered no more problems.

Have you performed successful pushes to your repository in the past? Maybe it’s only some temporary server-side problem, e.g. some failed connection that wasn’t reset correctly.

How large is the revision you want to push, i.e. how many MB where added/updated since the last revision? In case you also fragmented your 80 MB into several revisions: Have you tried to achieve a roughly uniform fragmentation?


By: tker 16 May 2011

could it be combined with pbrt?

and how?

By: Mathias 16 May 2011

Hi tker,

sure it would be possible to combine it with PBRT. That, however, would not be a matter of minutes.

You’d have to analyse which parts of MNRT you’d want to incorporate into PBRT, e.g. kd-tree construction. As I’m no expert of PBRT, I cannot give any suggestions on where to start. Generally, PBRT is more complex and models a lot more stuff than MNRT. E.g. it has quite a variety of models for materials or reflection.


By: tker 17 May 2011

Hi Mathias,
Thanks for your reply. Pbrt is really complex. MNRT is good too and valuable to study.I’m learning the photon mapping part with you program and some other materials. Do you have any progress or a new version of it? such as the ray tracing part, and else
Best regards

By: tker 17 May 2011

Uh, the “ray tracing part” I just said is about the button of “File–>Benchmark–>Ray Tracing” ^_^

By: Mathias 17 May 2011

Hi tker,

I’m happy that you see a valuable thing in my application. It is nowhere near the feature complexity of PBRT, however redoing PBRT on the GPU is probably no task one could solve within a period of a few months.

Sadly I wasn’t able to work on MNRT that much since I released it on Codeplex. Earlier the last exams in my studies and now my new job are greatly reducing my free time.

So there is still no benchmark feature for ray tracing. When I added this menu entry, I thought it would be quite easy to add such a thing. Shortly thereafter I dropped this idea because I wasn’t able to create nice camera tracks by hand using the simplistic mouse/keyboard input of MNRT. Some smoothing mechanism or even automatic camera control would be required here.