Skip to content

** Speeding Up LuxRender **

Jason Brenneman edited this page Sep 30, 2023 · 3 revisions

Speeding Up LuxRender

One of the biggest mistakes new users make with any global illumination renderer is trying to rely too much on indirect light. While LuxRender can solve indirect lighting situations eventually, direct light is always faster. A good habit is to use the direct lighting integrator when setting up your scene lighting. As a rule of thumb, if your scene lighting looks good without global illumination, it will look great and render quickly when you switch to a global illumination-capable integrator (such as Bidirectional).

There are also some steps you can take to optimize the scene to make it a bit faster:

  • First, keep reflectance (i.e. brightness) in diffuse components of your materials below 0.8. This will allow a ray to "use up" its energy so LuxRender can be done with it sooner, and it will also help your scene to de-noise faster. On the same note, avoid using specular colors higher than .25 (or much lower, 0.02-0.05 is a good range for most everyday objects). Reflection color on metal materials should be kept below .8 as well. If this makes your scene too dim, simply adjust the tone mapping to expose it more.

  • Second, limit the number of faces on objects that are used as mesh lights. Each face in a mesh light is a light that must be sampled, so keep them as simple as possible. If you have a densely-tessellated, but dim mesh light, you can also use the "power" or "importance" light strategies to avoid sampling the large number of faces. This will remove the performance hit of a dense mesh light, but can produce strange results if the light significantly contributes to the scene illumination. This trick works best for dimly-glowing objects, such as indicator LEDs, bioluminescent creatures, and so forth.

  • Third, homogeneous volumes are much slower than "clear" type volumes or no volumetrics at all, so SSS and atmospheric effects should be use sparingly unless you are ready for a very long render. Also, consider using the "single" volume integrator when using atmospheric scattering.

  • Fourth, procedural textures and microd isplacement add calculations every time a ray intersects them, so don't get carried away with them.

  • Fifth, if you aren't sure what settings to use, use the Metropolis sampler, Bidirectional Path Tracing, the Mitchell filter, and the QBVH accelerator. This should give a clean, artifact-free image with reasonable speed.

If you are doing test renders, lowering resolution, rendering only a portion of the frame, or using a simpler surface integrator (such as Direct) can give useful results in less time.

Russian Roulette Explained

By default, LuxRender uses a technique called Russian Roulette (RR). The Russian Roulette technique is a way to reduce the average recursion depth of a ray (number of bounces) in an unbiased way. Usually the main contributions happen in the first few bounces of a ray, so going all the way to 20+ bounces will usually not contribute significantly, but will take 4x the time of just 5 bounces.

The Russian Roulette technique offers two modes: probability and efficiency. The former uses a fixed probability to terminate a path for each bounce. The default is efficiency, which takes into consideration how much light there is to be gained by going one step further. This usually reduces noise a lot better than the probability mode, however it is material dependent. If the material is entirely white, then there's a 100% probability of it continuing to bounce, since the material will reflect all the light from that bounce and thus that extra bounce will contribute 100%.

So, if you're using Russian Roulette in efficiency mode, which is the default, then the darker the material, the shorter the average depth, and thus the quicker LuxRender can start on a new sample.

In addition, the lower average depth helps to prevent fireflies since low probability events that are accepted will have to be scaled up to compensate for all the other low probability events that were not accepted.

Clone this wiki locally