Post by manxome on Dec 3, 2019 19:11:44 GMT
I was finally tired of working with tiny images and not seeing any results until the complete PPM was written.
Inspired by Chrisd's prior thread I decided I wanted to watch my images being ray traced live. You can't appreciate your ray tracer until you can watch them live!
Anyhow, I decided to ray trace in multiple passes and block fill / pixelate the image. For example, If I make my pixels start at 10x10, then my image will take 100 passes to render, with each pass doing 1% of the pixels.
It turns out that after a single pass I can see specular highlights, shadows, reflections, refractions and determine if the camera position/direction is appropriate. I can then let it continue to run, or stop the run to correct anything.
Better yet, I can work on huge images if I want; no more squinting and wondering what I am looking at.
In the examples below, I show a ***5000x5000*** rendition of the Reflect/Refract image. I ran this with a 25x25 initial pixel size, so 625 passes.
Obviously you don't need to preview such huge images, but the idea is that this technique allows you to fill your screen with an image in a very short amount of time.
My monitor is 3840x2160 and it is no problem to preview images of this size. It sure beats the 200x100 images that I had been using.
The first pic is a jpeg of the completed image after 625 passes and more than 82 minutes.
The second pic is the image shown after just one pass, that is, after less than 1/6 of 1% of the ray tracing has completed. This pass was completed, after set up etc, in approximately 21 seconds. You can see so much detail.
I am really happy I decided to show the ray tracing live, you will be too!
Oh, I also have the option of printing the final image, or any pass actually, to Png or Jpg, besides writing the Ppm.
Have fun
Inspired by Chrisd's prior thread I decided I wanted to watch my images being ray traced live. You can't appreciate your ray tracer until you can watch them live!
Anyhow, I decided to ray trace in multiple passes and block fill / pixelate the image. For example, If I make my pixels start at 10x10, then my image will take 100 passes to render, with each pass doing 1% of the pixels.
It turns out that after a single pass I can see specular highlights, shadows, reflections, refractions and determine if the camera position/direction is appropriate. I can then let it continue to run, or stop the run to correct anything.
Better yet, I can work on huge images if I want; no more squinting and wondering what I am looking at.
In the examples below, I show a ***5000x5000*** rendition of the Reflect/Refract image. I ran this with a 25x25 initial pixel size, so 625 passes.
Obviously you don't need to preview such huge images, but the idea is that this technique allows you to fill your screen with an image in a very short amount of time.
My monitor is 3840x2160 and it is no problem to preview images of this size. It sure beats the 200x100 images that I had been using.
The first pic is a jpeg of the completed image after 625 passes and more than 82 minutes.
The second pic is the image shown after just one pass, that is, after less than 1/6 of 1% of the ray tracing has completed. This pass was completed, after set up etc, in approximately 21 seconds. You can see so much detail.
I am really happy I decided to show the ray tracing live, you will be too!
Oh, I also have the option of printing the final image, or any pass actually, to Png or Jpg, besides writing the Ppm.
Have fun