Setting up volumetric scattering
From LuxRender Wiki
Here we will be setting up a scene for volumetric scattering (see volumes) to simulate a dusty environment. We will be using Blender and the new LuxCore as render API. This is a pretty simple setup so feel free to use your own scene or go ahead and grab the starter file here.
On the World tab in Blender add a new volume and name it 'dusty air'. Pick Homogeneous as volume type and set scattering color to full white (RGB:1,1,1) and set scattering scale to 0.0005. If you want a more dusty-looking air, the scattering scale is the value you should raise.
Now we need a container for the volume. Add a cube and scale it up so that all the other objects fit inside it. Apply the cube's scale (Ctrl-A) and rename the cube to something like 'dust cube'. The edges of the cube will mark where the dusty volume begins so it's very important to keep track of which objects are inside of it and which are not. In this scene we can put all objects inside of it and that simplifies the setup a lot. If you use another scene that has got objects which aren't inside the dusty volume there is just one more step we need to do. We will take care of that soon.
Next add a material for the dust cube on the materials tab, rename it to something like 'dust cube' and click 'Use Material Nodes'.
If the node editor is not already open, split the 3D View and open up the node editor in one of the views. Switch to the material node view at the bottom of the node editor. Delete the matte material node and add a Transparent node (Shift-A -> Material -> Transparent(Null)).
When setting up volumes we specify an interior and exterior volume for each material. To find out which is which we take a look at the face normal. In the 3D View enter edit mode for the cube and toggle on 'Show Normals' on the properties panel(N). It's important to note that the normal points to the exterior regardless of the shape of the object. The normals on this default cube is already correct, the normals points to the outside of the object. However, a more detailed object could have some flipped normals which would cause the material to look wrong. It's good practice to check if the normals are right.
OK, so where to normals points that is the exterior and we want the 'dusty air' volume to be inside of the cube, so we will pick the 'dusty air' volume as interior volume. In the node editor pick the volume as interior on the material output node.
Now to the objects which are inside of that scattering volume. Since all objects in the scene are located inside of the cube we can set the default exterior volume to be the 'dusty air' volume and that will make all materials and lights and cameras use that exterior volume. Pick the dusty volume as the default exterior on the World tab. If you used the starter file located at the beginning of this page you are all done now. Render it!
The default volume applies to all materials, lights and cameras. If any of them were outside the dust cube you would need a clear volume and assign that volume to their exterior. If you use a hdri/hemi lamp or the sun lamp you should also use a clear volume set as their exterior. The reason is that the hemi/sun lamp does not have a specific location in the scene, only a rotation. Let's have a quick look at that if it applies to your scene. Add a new volume on the World tab. Rename it to something like 'clean air' and pick type Clear. Next we need to pick this clear volume as exterior for the materials and cameras that are outside of the dust cube or for any sun or hemi lamp.