![]() |
cuemol2/LuxRenderExportCueMol: Molecular Visualization Framework |
![]() |
Global illumination rendering by LuxRenderIn CueMol 2.2.2.388, you can use LuxRender (http://www.luxrender.net/) export function to create photo-realistic images using Global Illumination method. 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 LuxRenderTo 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. http://www.luxrender.net/en_GB/standalone If you are using 64-bit version OS, you may install the 64-bit version. Download the CueMol style file for LuxRenderThe following style file contains several LuxRender-specific material settings. https://sourceforge.net/projects/cuemol/files/sample-files/LuxRender/luxrend_style_v1.xml 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 LuxRenderLoad the style file into the ScenePlease 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 RenderersWithout (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:
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 settingsIn 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 LuxRenderThen, 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. TonemappingTone 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. Miscellaneous
|