|scene from Mathias Baas|
Of course, the major feature in this release is blobby rendering. The subject has already been discussed at great length in the two previous posts and I will not say more, apart from the fact that blobbies have now a dedicated page into the gallery. But there are some other interesting features worth mentioning.
In the RenderMan terminology, a "primitive variable" ("primvar" for short) is a mechanism that allows you to attach arbitrary data (variables) to objects (primitives). These values are interpolated or not (depending on their interpolation type) and passed from the object to its shader at render time. By overwriting shader parameters, they modify the way a geometric primitive is shaded. A single shader instance may then be reused for a myriad of objects. I finally implemented support for them in all XRT primitives (except for subdivision surfaces).
Some finishing touches to the RenderMan client
Apart from blobby support and a few bugs fixes, binary output is now implemented.
Blobby rendering ribs and some Python scripts using the new Python binding for RenderMan API are now available in the examples archive.
Posted: 04 Nov 2013 17:40
Actually, there is much more to blobs than adding mere spheres. XRT implementation supports various operations and field functions.
A max operation is roughly equivalent to a union operation in CSG whereas the min operation is like an intersection. Max is used most of the time to prevent blending between shapes. In the following pictures, a hand is modelled from several blobby ellipsoids, first with no blending at all, then with all shapes blended together, then with blending selectively disabled between fingers. For each of the four fingers, the blobs describing it are added together, along with the adjacent blobs at the edge of the palm. A separate added-together group is made of all the palm blobs. The whole field function is just the max of these five overlapping blending groups.
Another useful operation is sub, which substracts one field from another. As illustrated in the following picture, depending on the strength of the field, we can either put a dent in it (left topmost shape) or dig a hole through it (right topmost shape). The bottom row is the max of two fields to help visualizing them.
There are three other supported operations: mul (multiply fields), neg (negate a field) and div (divide two fields) but I have not yet found any meaningful usage of these. Therefore, I'll skip them.
XRT implements field functions as plugins. Let me present you some of them.
A capsule field function is the distance field built from a line segment (ideally suited for sausage or spaghetti like shapes). Note how the shapes smoothly blend when their respective line segments are abutting (whether they share the same orientation or not). Actually, if you subdivide a capsule into a sum of shorter capsules, the resulting field is exactly the same as the single capsule.
Here are more spaghettis (the sum of 480 capsules in a toroidal spiral)
A cube field function defines a cube centered at the origin. Pretty lame, isn't it ? Things get more interesting when the cube is combined with other shapes.
A plane field fuction defines a unit square in the xy-plane, at z=0, centered at the origin.