Having a go at translucency


Yes, it's possible to simulate translucency in Cinema4D. I came up with this technique after a short debate on the Cinema4D forum wich ended up with the conclusion "You'll have to wait for BhodiNUT to finish their shader set". While I am of course awaiting anxiously the release of their shader set, I found there IS a way to have translucency in Cinema4D without custom shaders or post production. Let me explain.
Translucency is the effect that something that is only lighted from the back receives color on the front. This is mainly due to the object being slightly transparent, so the light travels through the object, where it is scattered and effectively 'lights' the object from the inside.The standard raytracing algorythm used in most apps doesn't account for this, neither does Radiosity or Caustics. The algorythm you need has to add up the light from all directions, and not be bothered with the surface normal, as the Raytracing algorythm is. There is one shader in C4D that does this - the 3D fog shader. If you set this shader to 'volumetric' it will look for light (and shadow) from all directions and add them up. After all, fog itself has no surface.

Okay, but a translucent object DOES have a surface! And you want this to have an effect. The solution in this is simple: you split up the translucent object into two parts: the surface object, the one in which you define how the surface will be lighted, and the volume object, or the object that defines how the light inside the object is handled. The first you just give a standard material, the volume object you use the fog shader on.

I built a very simple scene to test out the concept. Just a leaf-object (a hypernurb), a spotlight with shadows (I used soft, but it works just as well with hard) and an object to cast a shadow - a torus in this case.

I also added an area light at the bottom and a sky object with a gradient shader. Not neccesary, but it looks a lot nicer :).

Then, I split up the hypernurb object into two parts - one for the surface shader and one for the 3d fog.

The fog shader is setup like shown below. You don't need too many samples, but sadly 4 is the least C4D allows. Of course, you'll have to turn on 'volumetric'. Set the fog to no decrease, turn up the thickness, and give the fog a color. Somehow, this color setting dictates the color of the shadows.

The surface shader can be most any material, as long as it has some transparency. Also it's a good idea to make the transparency additive, this will make your backlighted areas brighter.

When you add these textures to the two objects like this, you'll run into trouble.

The reason for this is of course that the two object occupy the exact same space, and the raytracer has trouble deciding wich one to render, resulting in some ugly noise and artifacts. Now, you can of course scale up the surface object, or do a 'normal move' on it's polygons, but for total control, I simply added a white texture to the displacement channel of the surface shader, and set the maximum displacement to something tiny (0.1). This makes the surface shader just a tiny bit larger on a polygon-basis, and works like a charm.

For the final look, you will mainly want to play with the transparency settings of the surface shader. You can also meddle with the thickness of the fog shader, but don't set it below 100%, as this will only make it darker, not less opaque (I think this is a bug, and have reported it). If you want to use more translucent objects in the scene, casting shadows onto eachother, remember that the darkness of the shadow is directly related to the transparency of the surface shader, not to the fog (the 3d fog shader doesn't cast shadows).

The file used in the above description can be found here. Make sure you righclick(PC) or ctrl-click(Mac) and download the file to disk, else your browser may try to display the file as text.

 

(techniques)