I've played with real time raytracing (and raymarching etc) quite a bit, but haven't spent that much time on non real time raytracing - for higher quality images or for pre-rendering videos and the like.

I know one common technique to improve image quality in the non real time case is to just cast A LOT more rays per pixel and average the results.

Are there any other techniques which stand out as good ways to improve image quality in the non real time case, over what you would normally do in the real time case?


3 Answers 3


Path tracing is the standard technique in non-realtime photorealistic rendering, and you should look specifically into bidirectional path tracing to get effects like caustics, which you can't really get with basic path tracing. Bidirectional path tracing also converges faster to the ground truth as shown in the below image: enter image description here Also Metropolis light transport (MLT) is a more advanced path tracing technique that converges even faster to the ground truth by mutating existing "good" paths: enter image description here

You can also use importance sampling for faster convergence by focusing more rays to the directions that matter more. I.e. by focusing rays based on BRDF (more towards the BRDF spike using probability density function) or to the light source, or get best of the two worlds and using multiple importance sampling. enter image description here This is all about reducing noise in unbiased manner. There are also denoising techniques to further reduce noise in the rendered images. enter image description here

I think it's best to first implement basic brute force Monte Carlo path tracer to serve as unbiased reference before looking into the more advanced techniques. It's quite easy to do mistakes and introduce biasing that goes unnoticed, so having simple implementation is good to have around for reference.

You can also get some really nice results by applying path tracing to participating media but that gets slow really fast :D enter image description here


One of the big ones is the use of constructive solid geometry rather than triangle meshes. Ray-triangle intersections are faster than almost any other ray-shape intersection, but it takes huge numbers of triangles to approximate the surface of a cylinder or torus, not to mention some of the really exotic shapes such as julia fractals or generalized parametric functions that some renderers support.

Another is the use of render-time photon mapping and diffuse interreflection calculations: this lets you get accurate lighting effects in a changing scene. In realtime raytracing, these are too expensive to compute, so either light sources and major geometry elements are forced to be stationary (to permit pre-calculation), or the effects are omitted entirely.

  • $\begingroup$ Subdivision surfaces are used a lot more than constructive solid geometry. They still involve triangles (or alternatively splines). $\endgroup$
    – user458
    Commented Aug 24, 2015 at 18:06

Even though I didn't know about monte carlo path tracing when I wrote this, I accidentally described it. Ironically, monte carlo path tracing is the answer I was looking for at the time.

Naive monte carlo path tracing works by evaluating something called the rendering equation to numerically solve the color value of a pixel. It takes random samples by randomly jittering within a pixel (there are better sampling strategies, and filtering: What is the fundamental reasoning for anti aliasing using multiple random samples within a pixel?) and also by bouncing in random directions when a ray hits a surface.

It can take a lot of samples to give you good results, and with not enough samples, your image will look noisy. It takes 4 times as many samples to cut the noise in half. Render times can be on the order of an hour using 8 modern CPU cores for a simple scene.

There are more advanced monte carlo path tracing techniques that let you get better images more quickly, such as importance sampling, or denoising the image after it's rendered.

Monte carlo path tracing can make photorealistic images and gives you many advanced rendering features just because it follows physical laws so gives realistic results.

You can read more about it here: http://blog.demofox.org/2016/09/21/path-tracing-getting-started-with-diffuse-and-emissive/

Here is an example image, which took about an hour to render using all 8 of my cpu cores:

enter image description here


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.