Philemo: “I would like to thank @Magaremoto for the starting point of this idea. He suggested to look into Renderman to pick good ideas.

I discovered that Renderman subdivides meshes so that each facet fits in a Pixel. The first idea I had reading this was that would be great for displacement.

That done, I needed a subdivision (or tessellation) method that respected the existing render and was fast enough. Carrara using Phong shading, I decided to use Phong tessellation. This algorithm, created by Tamy Boubekeur and Marc Alexa (see https://perso.telecom-paristech.fr/boubek/papers/PhongTessellation/). This method is widely used in games to give nice contours to low poly models. As the author says, “Our technique is a geometric version of Phong normal interpolation, not applied on normals but on the vertex positions. We call this strategy Phong Tessellation. “.”

 

Carrara and displacement

Carrara usually does a fine job to simulate displacement with bump mapping when the surface is facing the camera and the light. This is not so good when the camera and/or the light are grazing the surface. Also, contours do not reflect the impression given by facing facets.

Carrara has displacement. It works great on geometric primitives (like sphere, plane,..). For meshes, it’s a little more … touchy. Displacing the vertices at the facet size is usually not enough. So, there is subdivision. The problem here is that the complete mesh is subdivided, regardless of it actually on the screen and visible from the camera. Heavy subdivision usually takes a lot of time.

Micro-dispalcement

The idea of this Plug-in is to subdivide heavily (up to 4 vertices per pixel), but only what is necessary. So, off-screen facets or facing away from the camera are not subdivided. Contours are perfect due to subdivision and micro displacement is now possible.

Micro displacement is using displacement in place of bump mapping. It allows to have consistency in quality between facing and grazing angles, both from the Camera and the lights, as it uses real geometry and is not trying to simulate it.

As Carrara is already very good at simulating displacement by bump mapping, for realistic values of displacement, the improvement is very subtle and should be considered before using.

For instance, for a grazing angle (upper jaw), the first image is rendered using bump mapping and the second one using micro displacement. There are differences, although you may have to look for them and I think the overall quality is better.

On this example on a facing fragment, (the forehead), the difference is not obvious at all:

Macro Displacement

Macro displacement is used to simulate geometry at run time. It usually has both displacement (or height) map and bump/normal map.

This is where the plugin takes its full power:

Usage of the plugin

Phong tessellation is a modifier that applies to meshes.

Select the modifier from the list:

There are 3 parameters in this plugin:

  •  Enabled: Activate the plugin. Otherwise do nothing. Use it to re-generate the tessellation is camera, object or displacement has changed.
  • Shape factor: Strength of the Phong effect. 0 will give you flat shading, 0,5 is normal, 1 is overdone (stuffed fabric effect).
  • Vertex per half pixel: number of vertices generated by half screen pixel horizontally and vertically. 1 is 4 vertices per pixel, 2 is 1 per pixel, 4 is 2 per square of 2×2 pixels and so on. Use value 1 for micro displacement or macro displacement with sharp contrast, 2 or less is the displacement map is blurred. Starting from value 1, each successive value divides the number of vertices generated by value squared (2 is 4 times less, 3 is 9 times, 4 16 times and so on).

 

 

Displacement

To set displacement, use the standard displacement shader in the shader room.Before doing so, untick if necessary the “enabled” value in the modifier (otherwise it may take a very longtime).

First make sure the “enable displacement” is disabled.
Then set amplitude and offset and displacement shader as usual.

Performances

On my 5 years old laptop, tessellation generates about 1 million facets per second. Displacement is about 3 times faster.

Afterwards, Carrara needs at least as much time to digest all those facets.

Rendering is usually 2,5 times slower at maximum precision.

Download

Windows version is available at Sourceforge.

OSX version coming soon.