From LuxRender Wiki
This page documents LuxBlend25, the LuxRender exporter for Blender 2.5 series.
Compared to LuxBlend for Blender 2.49, LuxBlend25 is much better integrated in Blender. Instead of adding its own window, LuxBlend now replaces parts of the Blender interface. Also, one can now even choose to display LuxRender's render result straight in Blender.
For installation instructions, please check the LuxBlend 2.5 installation instructions page.
As LuxRender's material system differs significantly from Blender's own material system, materials can not be converted perfectly. Therefore it is recommended to select LuxRender in Blender render engine selector right away.
When using LuxRender, there is now a distinction between external and internal rendering modes. In external rendering mode, LuxRender will launch its own window whenever a rendering is started. In internal rendering mode, LuxRender functions in the background and will show the rendered result in Blender's UV/Image Editor window only. Which mode to use depends on the intended use and your own preferences; switching between the modes can be done in the render panel.
Some changes from Blender 2.49
- Portals are technically a mesh option. So, they can be found under the "mesh options" panel.
- Environment maps can be found under the hemi-infinite lamp type
- The light material is not used in LuxBlend25. The more-proper "emission" control is used instead.
- LuxRender does not actually use a World Medium internally, so there is no such thing to edit in 2.5. If you make a volume and put it on the "default exterior" slot it will be applied to all objects without an exterior volume.
- Displacement is a mesh option, so (like portals) it can be found in the "mesh options" panel.
- Bounding volumes are not supported in 2.5. They will likely be removed from the core entirely in a future release of LuxRender. Instead use a "homogeneous" volume as your "default exterior" volume. This will give the same effect using the new "object volumes" system which is faster and more flexible anyway.
Documentation for the render panel can be found at the LuxBlend25 Render Panel page.
World Panel (volumes)
The world panel contains a volume editor, controls to set default exterior and interior volumes and light group controls.
A default interior and exterior volume can be set here. These volumes will be used for all lights, cameras and materials that do not have a volume specified in their own relevant panel. Amongst others, this can be useful when using homogeneous atmospheric effects, which require a volume to be assigned to all lights.
In this panel one can configure all volumes that are used in a project. The add and remove buttons create and delete volumes; the plus and minus sign on the right of the preset dropdown create and delete presets.
The type dropdown menu contains the two volume types (clear and homogeneous).
The IOR field defines the index of refraction. For the letter, presets are available. Instead of a constant value, one can use a Fresnel texture by pressing the T button, creating the texture and assigning it.
The Fresnel textures that are being assigned to a volume will be inherited by materials of the "glass2" type that use the volume in question. Other materials will use the volume's absorption and scattering, but will use an index of refraction as defined in their material setup.
Sets the absorption color, defined at the depth as set in the Abs. at depth field. This distance is defined in meters.
Sets the scattering color.
For more detailed information about volume properties, please check the LuxRender Volumes page.
This panel can be used to add, remove and rename light groups, as well as adjust their gain settings. It can also be found in the render layers panel.
Object Data Panel - Lights and Environment
In Blender's lamp properties panel, you can edit your lamp objects in the scene. For point, spot, and area lamps, these parameters are similar to those of mesh lights. Spot lamps will have a few additional controls for the spot shape. To add a sunsky, create a sun lamp and configure it here. A Hemi lamp can export to one of two different lamps in LuxRender, "infinite" and "distant". The infinite lamp is used for environment mapping, so if you set a hemi as "infinite" you will have a field to add an environment map (HDRI) file.
The location of a sun or hemi lamp in the scene does not matter, only its rotation. In LuxRender, the infinite, distant, and sun/sky lamps are always considered to be further away than all geometry. The rotation of the lamp will determine the rotation of the environment map (hemi-infinite) or location of the sun/distant lamp in the sky (sun lamp and hemi-distant, respectively). If you set "infinite" and did not define an environment map for the hemi lamp, it will shine as a single color (as defined by the color field) and will appear the same regardless of rotation.
In most cases it is best to have an environment light of some kind (sky or infinite) unless your scene is completely enclosed by geometry. Using a distant or bare (skyless) sun lamp will result in a completely black world, which will look strange in reflections. This may be desirable for some space scenes, although you should still consider using an HDRI starfield image.
Object Data Panel - Mesh Options
The mesh options panel contains controls for subdivision and displacement (including microdisplacement), defining exit portals and overriding mesh export settings.
Here you can override the export format type (PLY or .lxo) for individual meshes.
This menu allows you to select whether a mesh should be instanced or not. In most cases, this can be left as "automatic" and let LuxBlend25 figure out whether it can be instanced or not. In some cases, you may wish to force it as an instance or not as an instance. For example, if a mesh appears different in LuxRender than in the viewport, you can try setting this to "never" for that mesh.
By ticking this box, LuxRender will consider the current mesh to be an exit portal.
This option will generate a tangent space for the mesh, which will ensure that baked normal maps fit correctly. If you are using a baked normal map with this mesh, this option should be enabled. Otherwise, it should be left disabled.
This section contains subdivision controls. By using LuxRender's subdivision instead of Blender's Subdivision Surface modifier, the exported file will be much smaller. LuxRender does not currently support using loop and microdisplacement subdivision on the same mesh.
If you would like to use LuxRender's displacement or microdisplacement features, there is a texture field here where you can add your displacement map. This map can be taken from a texture assigned to a material which is in turn assigned to this mesh (Blender does not permit textures to be assigned to a mesh directly).
Object Data Panel - Camera
Blender's camera panel can be used to choose between a perspective, orthographic, or the panoramic environment camera, including its main controls: scale/focal length, shift and clipping values. A checkbox allows you to disable clipping entirely.
When using Depth of Filed, one can either enter a distance or an object to focus on. You can also enable auto focus to override these options, as well as set the blades and distribution for shaped and ring bokeh effects. You can also disable depth of field entirely, which will result in everything being in focus. More information: Depth of Field: Lens radius and focus distance.
In the LuxRender Camera panel one can configure camera settings that are specific to LuxRender.
Exterior sets an exterior medium for the camera. Note that if you're using homogenous atmospheric effects, it's probably more convenient to set a default exterior for the whole scene in the World tab.
Apart from influencing Depth of Field, the f/stop setting will also be used by the linear tone mapper if that is being used. The ISO value is only being used by the linear tone mapper.
Exposure can be set in various way, the most common of them being absolute. To set a time, leave Open at 0 and set Close at the desired shutter time (in seconds).
When motion blur is enabled, you can also set the distribution and number of steps. See Motion Blur for more information
For internal rendering, update interval determines how often the image editor will be refreshed. The Integrated Imaging workflow' checkbox will provide the render result in raw EXR format to Blender's UV/Image Editor window without saving them on disk, and without applying gamma or color correction. Z Depth and alpha channels will be saved if the OpenEXR file format is selected with the appropriate options in Blender's Render panel.
For external rendering, you can set how often to save the file to disk, and if you are using the GUI, how often it should refresh. By checking one or more of the file format extensions, images in those formats will be written to disk. When enabled, some files will present options, such as what bit depth to use. An alpha channel is also optional. The Write FLM will write a LuxRender Film file to disk at the specified save interval. Film files allow a render to be stopped and resumed. Be aware that these files tend to be rather large.
Color Clamping options and Firefly Rejection can be set here. The tiles option will configure the number of framebuffer strips used. 0 will determine this automatically based on image resolution and number of render threads.
Color Space and Camera Response can be set here.
A Tonemapper can be selected and configured here.
Materials Panel and Texture Panel
Documentation for the materials panel and the textures panel can be found at the LuxBlend25 Materials page.
Particles Panel and Physics Panel
LuxBlend25 supports exporting particle systems which use the "object", "group", or "path" render types. Setings such as the "render emitter" option will be respected.
LuxBlend25 supports rendering the smoke output from Blender's smoke simulator. This requires some libraries to be present with the LuxBlend25 install so that it can read the smoke cache and convert it to a format LuxRender can understand. See this forum post for more information.
When you bake your smoke, you must be sure to give your cache a name in the "Smoke Cache" panel. This is necessary so that LuxBlend25 can find the cache on disk in order to export it. Lastly, there is a checkbox in the render settings panel to enable or disable exporting smoke. Smoke can be time consuming to export, so you may wish to leave this off for test renders.
If you would like to color the smoke, you can make a "homogenous" volume and attach it to a material on the smoke tank (aka the domain object). LuxRender will not actually use the homogeneous volume to render the smoke, but it will use the color and asymmetry settings supplied.
If you render smoke using the bidirectional integrator, you may notice some strange effects, namely the smoke renders unusually dark. This is a shortcoming of the system used by LuxRender to render the smoke, volumegrid. Volumegrid is an old system with a lot of incompatabilities, but for the time being it is the only option, since as of this writing (v1.0), the new volume system does not yet support heterogeneous/voxel rendering.
No special steps are required to render the results of the cloth, softbody, fluid, and ocean simulators, as these output an actual mesh object. However, you may find it beneficial to lower the simulation resolution and use LuxRender's loop sudivision to smooth out the mesh. This can help reduce simulation and export time.
Batch Mode and Distributed Rendering
You can use Blender's batch mode (also called background mode or shell mode) to render with LuxRender from the command line. This allows Blender to "host" the render job and handle commands from the user or queue manger, going from one frame to the next. This is particularly useful for animations, especially with render farms.
LuxRender's own network rendering system can also be configured from within LuxBlend25. In fact, it can even be used for batch mode jobs if you so desire. LuxRender's network render can be configured from the "LuxRender Networking" panel in render settings. You can provide a list of IP addresses and the update interval, and LuxRender will connect to them on startup. This works with either Internal or External rendering mode.
When using Blender in batch mode with LuxRender there are a few things to keep in mind. First of all, you MUST set LuxBlend25 to either use internal mode, or external with LuxConsole. Do NOT specify the LuxRender GUI, it lacks the ability to handle batch jobs fed to it via a command line interface. Using internal mode is recommended with render queue managers, since it removes the need to have a common path to LuxConsole for all nodes. Second, there is no way of passing external-renderer-specific commands to Blender, meaning all of your LuxRender settings need to be set in the .blend file ahead of time.
Setting up the .blend file for batch mode
To prep your .blend file for using LuxRender in batch mode, it is recommended to use internal rendering mode, enable "Integrated Imaging Workflow" under LuxRender Film in the Camera panel, and to disable "write to disk" under LuxRender Engine Configuration. This will keep your output directory clear by having Blender only write the finished image. Disabling "Integrated Imaging Workflow" will cause PyLux to write its own copy of the image to disk, leaving you with a redundant copy of every frame. If you enable "write to disk" PyLux will write the LuxRender scene files, which are generally not necessary for batch mode renders.
The important thing is to properly configure your stopping points using haltspp or halttime. It is VERY IMPORTANT to remember that LuxBlend25 will stop PyLux immediately without waiting for a safe stopping point. So if you are using the lowdiscrepancy sampler AND internal mode, you should disregard advice elsewhere to set haltspp lower than pixelsamples. That assumes it will wait for a safe stop. Instead, you should set haltspp and pixelsamples to the same value. This does not affect LuxConsole, which will wait for safe stopping point.
Starting the batch render
To start the batch render, you simply need to call Blender as you would for a batch render with Blender Internal. (See this page for more info on how to do that). There are really no LuxRender specific flags, except for one. The "engine" flag. You can set this in your script:
This will force Blender to use LuxBlend25 as its renderer for that batch run, However, if you saved the .blend file with "LuxRender" set in the engine select menu, this will be the default anyway. Skipping this flag in your script template allows you to use the template for engines other than LuxRender.
Once you run the command, Blender will launch as a background process, and feed the frames to Pylux or LuxConsole one at a time. You can simply leave and come back when all the frames are done.