First physically based rendered images

Project Page Next project post Post History

In an attempt to improve the colour reproduction in Hyperion, I'm trying to implement my own physically based rendering (PBR). PBR rendering is computer science's attempt at recreating the real world in a render engine. My hats off to them, they've done a pretty damn good job figuring it out, so people like me can benefit in our own way.

Now, let me enter the equation.... Ha!

So, I had to spend some time reading material and reviewing YouTube videos on the subject. I found a really good one here, which saved me a lot of troubles. Maybe it can help someone else too.

My first few attempts ended in black screens. Probably no surprise there. I had to fiddle with the code for awhile just to get something to render. But eventually, I got this:

Hyperion's first PBR render
1 hour and 0.363 seconds

It looks like the dragon is made of metal. It's not right, but, it's a start! I ended up leaving this one rendering for awhile because I got caught watching the end of a Terminator film at the time. So it rendered at a small resolution for just a tick over an hour.

I think it's actually turned out really cool!

But we have some work to do still. Upon inspecting my code further, I realised I had some vector multiplication that wasn't working right. Short rant here: for some reason, in the SDK library I'm using, a "vector multiplied by a vector" does not do what you think it does. It actually produces a dot product. Well, that's all fine (they should have said...), but they have a function called "Dot" anyway. So why on Earth they thought it would be good to have two different versions of this - who knows... It gets worse, the operator they supply (that your meant to use) for multiplying two vectors, returns a new vector of the result, but it actually changes one of the vectors' internal data floats in the process. Why...

But back to Hyperion. After working through the code and debugging some problems, I believe I finally sorted the issues out. Here's a new and improved Hyperion render, using the new PBR colour engine:

Hyperion's new PBR colours

I had to change the exposure levels a bit, as it came through a bit dark. For comparison, here's a render of the old colour engine versus the new PBR engine:

The new PBR engine looks like it works well.

Now let me explain the difference in brightness. The scene is lit by an HDRI sky (a big sphere with an HDRI photo on it). And this is what lights the scene. So in this render, the brightness is now correct as per the HDRI sky (I believe...!).

The PBR engine is definitely doing a lot more under the hood now. And when I make Hyperion's material structure better, which I will work on soon, the PBR engine should start to shine.

And, more importantly, I might even be able to render out a simple animation. That will be cool!

And finally, for a bit of fun, here's a neat render with the materials on full metallic:

Hyperion PBR render with metallic surfaces