A semi-curated blog of computer graphics and rendering.

Hi! Things have been busy for me. I have been trying to lock onto computer graphics jobs, so if any of my 3 viewers know some job openings, please let me know. Also, I appreciate your presence. Truly I do.

Back to the main topic. I don’t have much time this week; so I spent them on rendering Spot, optimizing BVH construction, and adding a few things here and there (for example, adding uv interpolation, and rejection-sampling ray generataion.) I have also added texture sampling so now the renderings don’t have to be made out of crystals anymore. Let’s take a look at some of them!

GI Spot

Global Illuminated Spot

First we see our dear global illuminated Spot. In the current state however, since we don’t have a proper material system in place, this is simply rendered via a two-bounce low-budget fake GI method:

  1. Rays are generated and traced from the camera.
  2. Upon intersecting with a triangle, 5 new rays are reflected from the surface (surfaces are always Lambertian.)
  3. Now trace these 5 rays. When they intersect with a triangle, we calculate its brightness via the Phong shading model (without specular). If it doesn’t, we sample the sky brightness over there.
  4. We average over the brightness these 5 rays bring back, and combine that with the texture color to produce the final color.

After gamma correction, a matte-looking Spot is produced. I think that’s kind of cute!

Cornell Box (With Balls!)

Global Illuminated Cornell

Here’s the Cornell Box rendered using the same approximate method. You can see the brightness calculated from the Phong shading model in the reflection of the balls. There is also some kind of light leaking around the edges. To increase realism (because the light source is kind of small here,) the second-bounce sample size is increased to 100 (except the ball reflection - that’s still 1.)

Sponza!

Not Global Illuminated Sponza

This Sponza model is downloaded from here and man, it’s huge. Even fake GI is too much for LuaPT right now; and I think there’s also something wrong with the textures at the moment. I have tried rendering this scene with the same parameters as the cornell box, and it took me 30 full minutes with unsatisfactory result (I have tuned the samples down to 5 - don’t think that 100 samples are doable.)

That’s It For Now

So, that’s where we are at the moment. No big improvements this week, but a few QoL changes here and there. Maybe later down the line, I will turn this into a proper open source project by having a README.md and force all my friends to star it. My current plan is to implement BxDF in the short, forseeable future; due to the immense time needed to render Sponza, I guess you guys won’t be seeing it for another good while. So that’s all guys. See you next time!

You can check out the source code here.

+ Loading comments +
Copyleft 2023 42yeah.