Global illumination rendering by LuxRender

In CueMol, you can use LuxRender ( export function to create photo-realistic images using Global Illumination method.

luxrend_sample1.jpg luxrend_sample2.jpg

Although the rendering using global illumination can produce much more photo-realistic images than POV-Ray rendering, it takes quite long time for the calculation (ranges from several tens of minutes to more than hours) even with the state-of-the-art computers.

Download and install LuxRender

To use LuxRender, you have to install the stand-alone version of LuxRender to your computer. Download the standalone version of LuxRender from the following link.

If you are using 64-bit version OS, you may install the 64-bit version.

Download the CueMol style file for LuxRender

The following style file contains several LuxRender-specific material settings.

Please download copy the file to the same directory as your scene (qsc) file(s). You can use LuxRender export function without using this style file, but this file enables you to use some LuxRender-specific materials/textures easily.

Prepare scene for LuxRender

Load the style file into the Scene

Please create your scene file (or open your existing qsc scene file) in CueMol. Then, in the "Scene" panel, right-click the "Styles" node, and you will see the style context menu. In the context menu, select the "Style file --> Load..." menu.


You will find the file dialog for selecting the existing style file, so please select the above xml file (i.e. luxrend_style_v1.xml, etc).

Finally, the new style "luxrender" will apear under the Styles node in the Scene panel.


About the details for the style and style file, also refer the cuemol2/Style page.

Material settings of Renderers

Without (or default) material settings, objects are rendered using soft glossy appearance. To change the appearances, you have to change the material settings of the renderes.

Please double-click the renderer in the Scene panel, and you will see the rendere's property dialog. In the dialog, please select the common setting tab. In the common property page, there is the material drop-down list. Please select the material from the list.

file not found.

In the current version of the style file (luxrend_style_v1.xml), there are following materials:

Soft glossy material. Also see glossy material in LuxRender documentation.
Glossy material. Also see glossy material in LuxRender documentation.
Metaric material with specular reflections. Also see ShinyMetal material in LuxRender documentation.
Metaric material with diffuse reflections. Also see ShinyMetal material in LuxRender documentation.
Matte material. Also see Matte material in LuxRender documentation.
Vanished woood like material, created by the combination of blender procedural textures. In this material, all of the color settings are ignored.
Alder woood like material, created by the combination of blender procedural textures. In this material, all of the color settings are ignored.

The materials not listed above (but in the list) are for the POV-Ray rendering, so selecting them will result in the default appearance (soft glossy).

Adjust the camera settings

In the LuxRender rendering, default distance value, 200, is too large for the molecules with small sizes, and results in rendering artifacts.

If you are using the orthographic projection (this is CueMol's default), please adjust the camera distance value as small as possible. (However, if you move the camera too much close to the objects, you will find the objects are clipped. Please adjust the camera distance so that objects are not clipped!)

Orthographic projection is independent from the camera distance, so you will not find any change in the molecule view.

If you are using the perspective projection, it is also better to reduce the camera distance, as in the orthographic projection. However, the perspective projection is dependent on the camera distance. You may find that the molecule view become skewed, when you reduce the camera distance. If you feel that the image is too much skewed, I recommend to use the orthographic projection.

Export the scene to the LuxRender scene file (lxs)

To export the scene for the rendering by LuxRender, please select the menu "Rendering-->Export Scene...". In the file dialog, please change the file type to "LuxRender Scene (*.lxs)" and change the file name, if required.

After selecting the file name, you will find the dialog for the image size settings (as shown below). Please enter the image size in pixel unit to render in LuxRender. The image size cannot be changed in LuxRender.


Rendering by LuxRender

Then, launch LuxRender and open the lxs file exported by CueMol (from menu File-->Open..., and so on). Scene loading and rendering immediately start after opening the file by the dialog. The rendered image is updated every 3 seconds and saved to the disk every 60 seconds (in the default setting).


You will find the PNG and EXR (HDR image format) files in the same directory as the lxs file.


Tone mapping is a procedure to convert the HDR image (produced by LuxRender) to the conventional low-dynamic range images (such as PNG, JPG, etc.). The default parameter of LuxRender for the tone mapping is not optimized for the CueMol output, and you may feel it too dark or bright. You have to adjust the tone mapping parameters.


Please change the kernel of tone mapping to "Linear" (I think it is the most simple and intuitive), and you will find following settings:


Please change the shutter speed to 0.001, and change the Film ISO by +/-10 to brightness of the image. (Leave other parameters to the default values, i.e., 2.8 for F-stop and 1.0 for gamma)

You can adjust the brightness using the HDR histogram showed below:


The vertical lines at the left and right of the plot area represent black and white levels, respectively, after converted the low-dynamic range images. If the peaks of the histogram go out from this black and white levels, the image results in over and under exposure. If you are rendering the image with a white background, it is good indicator to adjust the highest peek (which corresponds to the background white pixels) to come near the white level.


Also you can use other kernels to adjust the tone mapping. Please refer the LuxRender documentation page (Tone mapping) for further information.


  • Fog (depth cueing) is ignored in the current version of the exporter. The objects near and far from the slab are clipped in the LuxRender rendering.
  • The speed of the rendering heavily depends on the material settings. If you use materials with reflections (especially metalic materials) for many objects, it takes long time for the convergence of the rendering. In contrast, the "matte" material is the fastest.
  • In the current version of the LuxRender exporter, the output contains "haltspp" (=10000) option, which automatically stop the rendering after calculating the specified (i.e., 10000) samples per pixels. Usually, this setting is too enough for good appearance, but you may have to caluclate much more, especially in the scene with may reflective objects. In that case, you have to increase the "haltspp" value in the lxs scene file, by editing the lxs file using text editor.

Last-modified: Wed, 01 Jun 2016 14:20:59 JST (1965d)