:: Preliminaries ::

First of all, you must have lamps defined in your scenes. The script will detect them (whatever layer they are set in) and then calculate the Scattering effect according to their position from the object on which the scatter effect is intended.

The scattering is translated into Vertex Color Light information. Because of this, you have to toggle on the VCol Light button in the Material tab of the Shading (F5 key) menu.

Of course, the script can be runned for many objects in the same scene. You will have to make sure that the object you intend the Scattering effect for is selected while using the script.

  • Set at least one lamp
  • Set 'on' the VCol Light button for the material of the object to be effected
  • Make sure the object to be effected is selected

:: How to use the script ::

The use of the script is very straightforward. Split your 3D view in two half. In one of it, hit SHIFT+F1 key in order to append the script in it. Browse up to the location you unzipped the file MHssss01.zip, and browse the MSssss01.blend exactly as if it was a directory. Go in the Text directory, then select the MHquickSSS.py file (right click on it, it should appear highlighted in blue) and import it (strike the ENTER key). Now turn the 3D view in a Text window using the SHIFT+F11 key. Click on the select-button button in order to choose between the available text files, and select MHquickSSS.py. With the mouse cursor in this view, hit ALT+P to run the python script. The GUI of the script should now appear on the screen.

QuickSSS-GUI

Setting the colors of the scatter effect:

  • Epidermal scatter:
    The three sliders (Rt, Gt, Bt) set the tangential color of the scatter effect, e.g. the dermal color. They range from 0 to 255. The color should be as close as possible to the the base material color.
  • Subdermal scatter:
    The three sliders (Rp, Gp, Bp) set the perpendicular color of the scatter effect, e.g. the subdermal color. They range from 0 to 255. For a human skin, the color should be red-like.

Setting the behavior of the scatter effect:

  • Scattering:
    This rules the diffusion of the scatter effect through the object effected. Low value will produce very local scattering effect, while a high value will produce a scattering effect diffusing more widely through the object's surface. Starting with a middle value (e.g. 0,5) is a good idea. It could range from 0.10 to 1.00
  • Power:
    This rules the intensity of the scatter effect. A low value will produce a scatter effect barely noticeable, while a high value can produce an over-burning and overwhelming effect. Starting with a middle value (e.g. 0,5) is a good idea. It could range from 0.10 to 1.00

Utility buttons:

  • Exit:
    This button simply exits from the GUI of the python script. All values and settings are automatically discarded.
  • Save:
    This button lets you save the settings of the GUI. It's very convenient if you want to recall old values, or if you wan to run the script on multiple objects, each with their own settings.
  • Load:
    This button lets you load settings previously saved.
  • START:
    This button starts the calculation of the scattering effect according to the settings of the GUI, on the object that is currently selected. It stores the result of its calculus as VCol Light intensity.

:: What to do when the effect is too strong?::

Finding the good settings for getting good scattering effects could sometime become tricky. You have to maintain a believable amount of lighting energy in your scenes, and sometimes, the results you will get will look like surexposed, especially if you use Radiosity and/or Ambient Occlusion. There are a few tricks that will help you out:

  • Play with the Power of the effect:
    It should be your very first move. With strong lights and AO set on, you will easily obtain surexposed shots. Decrease the Power slider as much as needed. Sometimes, you will still have too strong results with Power set as low as 0.10 (which is the lowest allowed value).
  • Divide or Multiply the color scatter values:
    If you are already at the minimal Power value allowed (e.g. 0.10) then you can divide the Rt and Rp, Gt and Gb and Bt and Bb values by two, four or more. The advantage is that you will retain the component balance between the R, G and B for each color scatter, while decreasing dramatically the scatter effect.

:: Experimenting with the script::

::01::

Start with downloading the example file, and unpack it where you want. Then open the example-file.blend with Blender. You should see the following scene loaded:

example-file-start

Place the mouse over the text window on the right of the screen, and strike ALT+P to activate the python script. You should get the interface to the QuickSSS script you are now familiar with.

QuickSSS-GUI

Make sure the humanoid model (it is the base mesh from the MakeHuman project, of course) is selected (outlined in pink). Go to the Shading (F5) menu and make sure the VCol Light button is turned on in the Material tab.

material

::02::

First, we will set the Epidermal scatter color. We should choose it close to the material color, but in this case, we will try to match exactly the material color. The color components of the material actually are R 0.930, G 0.880 and B 0.810. These colors are coded on a range of 0.000 to 1.000, while the Epidermal scatter color is coded on a range of 0 to 255 (future versions of the QuickSSS script should correct it, though). In order to get exactly the material color as Epidermal scatter color, multiply each component by 255 in order to get the tangential components:

  • Rt 237
    Gt 224
    Bt 207

Now, we will set the Subdermal scatter color. We choose a dark red color, and set the perpendicular components accordingly:

  • Rp 90
    Gp 0
    Bp 0

For the moment, we keep the Scattering and Power sliders to their default value of 1.000. Click on the START button and watch the output in the console to make sure the calculations are on their way:

START QUICK SSS
RAMP COLOR = [18, 0, 0]
Illumination using colors [237, 224, 207] [18, 0, 0]
NAME Lamp COOR (4.4890670776367188, 2.1764450073242188, 5.9038619995117188)
NAME Lamp.001 COOR (-5.26708984375, -2.6502838134765625, 5.9038619995117188)
Quick SSS time 1.63442206383
START GENERIC ROLLOFF [90, 0, 0]
Illumination using colors [18, 0, 0] [18, 0, 0]
NAME Camera COOR (2.7734222412109375, -2.3189888000488281, 1.738490104675293)
Rolloff time 1.196434021

The interesting information is the processing time appearing on the last line. On my computer (AMD Athlon 3000+ with 512 Mb memory) the computations lasted a little more than 1 second, which is quite acceptable for a mesh of 43499 vertice!

2lamps-noAO

::03::

Now go into the Shading (F5) menu, but choose the World buttons and activate the Ambient Occlusion option. Set the parameters according to the following snapshot:

ao-settings

The new render is obviously over-exposed, while no QuickSSS setting has been changed.

2lamps-ao

::04::

We will try to get a better effect by decreasing the Power of the SSS effect. In order to fo this, set the Power value to something like 0.300 and then press again the START button in order to force the recomputation of the VCol Light information.

2lamps-AO-lowPower

Compared to the first attempt, this one looks washed-out, but it is because of the first one which was a little too much saturated, due to the strong Subdermal scatter component. Here are the final settings of our example scene:

final-settings