Hi all.

I have worked on C-Ray a bit more in the past weeks, and I made it compatible with Windows 7. So it should be able to run on any Windows 7/10 machine now. Another thing is that I have completely replaced the underlying OpenGL code with d3d11 code. I find d3d11 a lot stricter and harder to make mistakes with than OpenGL, so I will go with that in the future.

I have cleaned up code a bit and open sourced it on github, you can find a link to it on the project page. The only caveat is that "Buddah" model is not on the repository because github apparently has a problem with big files. Anyhow, the code is completely public now!

Finally, the technical bit. I haven't done much in terms of the path tracer itself, but I have added a simple thin lens model which gives decent depth of field. By default, C-Ray automatically adjusts focal distance based on the center pixel's depth, but you can change that in control panel. Anyways, here is the new list of requirements:

OS: Windows 7/10
API: Must support direct3d11
Memory: For simple models, a couple of megabytes. For complex models, expect around 800MB of memory usage.

The new demo has replaced the old one, so if you download the demo file linked in the project page, it will be the updated version.

That's about it, I realize that so far I've only been posting updates about the demo, and that's about to change now. I will delve into more technical details and share some vital algorithms and technologies to get this kind of GPU path tracing working. Stay tuned!
Read More →
Demo!

Hi guys, it’s an honor to have CRay be featured on the handmade network. The project is accepted earlier than I anticipated, so I scrambled to make a (hopefully) good-enough demo for people to play around with. Here it is:

CRay Demo

Now I will provide a short tutorial on the basic controls and what you should expect to see. Keep in mind that it is very likely for there to be a bug in CRay that is only triggered on certain machines (it’s OpenGL, after all). So if you see any unexpected error messages pop up, please report them to CRay’s forum as it will help me to identify these bugs and make CRay more robust.

Requirements

Windows 10 (will work on compatibility later)
At least OpenGL 4.4
At least 2GB of memory (as for now, will be improved on this later)

Tutorial

Upon startup, you should be greeted with a monkey, like this:


A direct-lit money

I picked the monkey as the startup model since it’s only 500 faces, and should be able to be ran on most GPUs. I also set the initial light bounce count to 1, just so you can see how well your machine is holding up against CRay. You can increase the bounce count to see indirect lighting, but the computation becomes more and more expensive at every extra bounce:


A path traced monkey with 2 bounces of indirect light

You can also move around in the scene. Use WASD to move horizontally, X to move up, and Z to move down. Hit Q if the UI is hidden. To orient your camera, simply use your mouse to drag across the screen.

You can edit lighting state with the UI, whose control should be quite self-evident. Simply hold down on the fields and drag around to edit their values. The only field that needs a bit explaining is the “L” field. It is the direction pointing towards sun light.

If you aren’t happy with this dull looking monkey, you can try other models that came with the demo. Hit “Load Model” to pick one that sounds interesting to you.


The iconic dragon model, though it requires quite some GPU power to render

Besides small standalone models, there are also some interior scenes that are interesting to tweak. In particular, “sponza”, “conference”, “sibenik”, and “fireplace_room” are all interior scenes that can give very interesting light interaction results. However, they are also the most expensive compute due to their primitive distributions and how many incoherent rays that must be traced to simulate the indoor indirect lighting.


Sponza with two bounces of light

There is still huge room for improvements, both in terms of performance and visual quality. That is why I requested CRay be featured on handmade network, so that I can record and document things that I do along this journey and hopefully get to a point where CRay becomes what I envision it to become. Hopefully you will enjoy the demo!
Read More →