You are browsing as a guest. Sign up (or log in) to start making projects!

1h 12m 10s logged

I fixed one big thing today! Shadow Acne. (Yes that’s what it’s called). This is an issue where a ray starts too close to its origin and accidentally hits itself, causing black freckles all over the image. (As seen in the first photo below). It seemed the only way to fix it was to increase pixel sampling, which is shooting multiple rays at each pixel that are all slightly offset and calculating the average of the colors hit, as seen in the second photo. The downside to this is that it makes the renderer MUCH slower. Image generation jumped from a few seconds to ~2 minutes.

I also spent a decent amount of time getting a better understanding of the pipeline and rendering process. Here’s a rundown of how it works if you’re interested:

  1. Start by initializing the camera, image and viewport size, and defining the position of every object in the world.
  2. Loop through each pixel in the image.
  3. For each pixel looped through, loop through every object in the scene. Run each object’s respective “hit” function to calculate whether or not it was hit.
  4. If the object was hit, run the sampling process as explained above. If not, color the sky gradient.

Obviously there’s much more to it but that’s too much to explain.

0
3

Comments 0

No comments yet. Be the first!