Image courtesy of Hossein Mirfattah
Main speed bottleneck in Maxwell
The render speed in Maxwell, as in any other renderer, it highly dependent on certain parameters of the scene that can dramatically affect the speed of the process. The first we would advise to check are:
Depth of Field: Maxwell calculates the correct depth of field in the image directly from the camera diaphragm aperture just like in a real camera. However, if you want to reduce the depth of filed effect and its cost on the rendering, increase the F-Stop value of your camera or use a Pinhole camera model, that produces no depth of field at all.
Motion Blur: The blurry effect visible on moving objects is calculated by Maxwell regarding the camera Shutter speed. You can try removing completely the Motion Blur calculations by disabling the Motion blur global checkbox on the Render Options panel.
Displacement: Materials with Displacement can slow down the render, specially if the subdivision is high and/or if the displacement distance is long. Try disabling completely the displacement on the whole scene by disabling the global Displacement checkbox on the Render Options panel to see how was it affecting your render times.
Caustics: Maxwell calculates correct caustics for granted according to the materials in the scene. However, under certain circumstances, caustics can get harder to clean. Why not trying to test without them to see if your render cleans faster? You have a global Caustics dropdown on the Render options panel to enable/disable them.
Color Multilight: Although the Multilight calculations doesn't have any extra time cost, they involve the usage of more Ram, and even more in the case of Color Multilight. Try moving to Intensity Multilight or even disabling it on your first speed tests.
Sharpness: The Sharpness parameter on the Camera panel controls the antialiasing of the image and can make you image to look more or less sharp. Low Sharpness values blur the image a bit, but are often used to dissimulate the noise on fast renders. Unlike other renderers, in Maxwell this is a non-destructive parameter that you can interactively play with during or after the render without damaging the image at all.
Materials complexity: Certain materials, particularly those with Additive layers, SSS translucency or soft glossy reflections, are responsible of most of the rendering calculations, so understanding and optimizing materials is very important to keep your render times short. For easy speed tests, you can try your scene in a plain diffuse grey clay to see how the illumination is performing in the absence of complex materials, by simple enabling the Override material checkbox on the Render Options panel.
More advanced render optimization tips
Below you can find a few more tips on things to avoid in your scene setups and materials to keep render times low and avoid excessive noise.
Geometry: Make sure your emitting surfaces are as low-polygons as possible. Usually a single sided polygon will suffice.
Not enclosed: If possible, do not completely enclose your emitters inside a dielectric object. All light that is emitted through the dielectric object is considered caustic light and will take longer to render.
Not intersecting: Make sure your emitter is not intersecting other geometry. In most cases this will not be a problem but it may add to the render time and produce strange results in the lighting. Regular geometry can intersect other geometry.
Strength: Keep your emitters at real world values. If your render is turning out too dark, don´t raise the power to several thousands of watts as that will break the realism and can also introduce more noise in the render. Instead, you should control the exposure by using the camera exposure settings (f-Stop, Shutter speed, ISO).
Nr of ML sliders: the more separate emitter sliders you have, the more RAM Maxwell needs as each light channel must be stored separately while rendering. If you do not necessarily need separate emitter control for all emitters you can "merge" them by applying the same emitter material to the geometries.
Color ML: This option will require more RAM than Intensity-only ML, because each RGB channel must be stored separately while rendering. Avoid this mode if you don't need to also change the color of the emitters while rendering.
Saturated/bright materials (very important)
AGS (Architectural Glass Solution)
Deciding between the two displacement methods available in Maxwell Render (on-the-fly and pretesselated), you should take into consideration the following:
- both methods will render faster if the underlying base mesh is already somewhat subdivided - this means that you can lower the precision parameter and still have detailed displacements. Otherwise, if you are trying to have a detailed displacement on a single polygon plane for example, Maxwell has to internally subdivide the mesh many times, either while rendering with the on-the-fly method, or before rendering, with the pretesselated method. With the first method this will mean an increase in render time, with the second method this will mean an increase in the RAM usage.
- for small height displacements with lots of fine detail, the on-the-fly method can be very fast, and is recommended since it will not consume any extra RAM, no matter how high the precision parameter is.
- if your render computer has a lot of RAM you can use the pretesselated displacement which renders much faster in most cases compared with the on-the-fly displacement.
- the adaptive option for the on-the-fly displacement should not be used for the final render, it can instead be used as an initial "test" of the displacement texture, to see how much displacement detail can be extracted from a particular texture. But for very large displacement textures, if you have the adaptive option on, Maxwell will try and subdivide the geometry down to the very last pixel of the texture, which will increase render time a lot. In most cases you don´t need such detailed displacements and you can instead control the detail with the precision parameter to balance detail vs render time.
There are a few important things to keep in mind to create efficient materials (including the satured/bright materials info above):
- avoid more than one Layer set to additive mode, especially if the Layer weight is set to 100%. This means the material can eventually reflect back too much light and introduce noise in the render. If you want to create a plastic material, instead of having two BSDFs (one diffuse bottom layer and one specular top layer set to additive mode), it is recommended instead to use a single BSDF set to diffuse, and add a Coating component to it. Set the thickness of the coating high (eg. 5000nm) to avoid any coloration effects in the coating.
- keep your materials simple: the vast majority of the most common material types need only two-three BSDFs in one Layer, or two Layers with one BSDF in each Layer. The more Layers you have the more material data Maxwell has to continuously calculate.
Some render channels do take longer to render than others - especially the shadow pass channel because it takes into account the full GI of the scene (including for ex. reflected caustics that brighten up parts of the shadow). Other channels such as motion vector, normals, matID, objID render quickly but still take away from the computing power for the main render channel. For this reason, it is recommended to turn off these channels while setting up and tweaking the lighting/materials in the scene.
Direct Light vs Indirect Light
Scenes with a higher proportion of indirect light (bounced light) than from direct light (light coming directly from the environment or emitters in its first bounce), typically the case of interior scenes, are usually one of the hardest scenarios for any render engine, as each ray takes longer to find an emitter so the image takes also longer to get clean. But fortunately this is an issue that real photographers have also to deal with when photographing interiors, and there are several interesting photography techniques we can learn from them that can also be applied when working with Maxwell to speed up the renders. Take a look at this page if you have to deal with indoor renders.