Sunday, April 21, 2013

Creating a Book Cover Illustration in Cycles

This coming April 23rd is a special day in Catalonia — it is Saint George's Day. According to legend, Saint George slay the dragon to save a damsel from being eaten by the dragon. According to some versions of the story, out of the dragon's blood a rosebush grew. Also, as it happens, April 23rd commemorates the deathday of two famous writers — Shakespeare and Cervantes. So, in Catalonia, for Saint George's day, it has become traditional to exchange roses and books.

As a way to celebrate Saint George's day, I have decided to jump-start my blog once more, which I've really had quite abandoned for the last few months. Today I will go over the production of a cover illustration which I created a few month ago for Elizabeth Castro's book, What's up with Catalonia? (figure 1).

Figure 1. I used Blender and Cycles, almost exclusively, to create this illustration.
This is a low-rez version of the final image.

Figure 2. This is what the final cover looks like.
The first thing I do when I need to create a cover illustration such as this is to get the book's final dimensions. Since we knew how many pages the book was going to have, the printer was able to tell us how thick the spine would be, in inches. With that measurement in mind, combined to the actual cover dimensions, I added 0.25 inch around the perimeter for the bleed, and multiplied the final figure by 300, which is the standard print resolution on glossy paper for four color images. From my prepress experience, I know you can go as low as 225dpi and get away with it, but nowadays storage is cheap, so why not go all the way to 300dpi? Anyway, I used this size, in pixels, for the Resolution fields in the Render Dimensions fields for the scene's camera. That's pretty much it.

Without further ado, I want to delve into a few of the technical details in the Blender file I used. First, I want to show a screenshot of the whole scene, to give a sense of how simple it really was to set up. Of course, simplicity is the result of long hours of eliminating unwanted fluff :)

Figure 3. The scene contains a camera, two light emitting planes, a floor with
a texture, and a few objects, some of which were recycled
from an old scene of mine. The parchments, which show some text from
the United States Declaration of Independence, were created specially for this illustration.

To model and texture the parchments I used two workflows which I find absolutely essential. The first, at the modeling stage, is the use of the Subdivision Surface and Displace modifiers (in that order) to produce irregular, organic surfaces. Each parchment is nothing more than a plane with a couple of extrusions and a bit of vertex tweaking. Here is a screenshot of one of them in Edit mode, so you can see how easy it was to model them:

Figure 4. A plane, with a couple of extrusions and a bit of
tweaking of vertices. The outside edges all have a 1.0 Crease
value, which can be assigned either by pressing N to access the
Properties panel and entering a number in the Mean Crease field,
or by pressing Shift-E to access this function on the fly.
Figure 5. The same plane with the Subsurf and Displace modifiers.
For the Displace modifier, I just used the built-in Clouds texture
with close to default settings.
Figure 6.  To access the textures used by the Displace modifier,
click on the little icon to the right of the texture name.
Creating the material for the parchment is where things started to get fun. I like keeping my nodes organized with Frames. For this, I select the nodes I want to join together inside a frame, and press Control-J. Then, I color and label the frames to give a visual clue of what's going on. I reuse old files of mine all the time, and sometimes they include convoluted noodles which I myself do not understand, so I finally decided I had to get more organized :) Anyway, here is a screenshot of the whole noodle for the material used on the parchment.

Figure 7. Click to enlarge the image. Oodles of noodles! 

The material shown on figure 7 is really two materials, one for the front and one for the back of the parchment. The yellow CATALAN FLAG frame and the green DECLARATION TEXT frame correspond to these two materials. Then, the two materials are mixed together with a Mix Shader. Which side receives which material is determined by the handy Backfacing output in the Geometry node. The Backfacing value says, “for the normal side of all polygons, output a 1; for the opposite, output a 0.” Because the Catalan flag material is in the topmost input socket of the Mix Shader, it is by default in the 0 position. That's why it is assigned the shading of the non-normal side of the faces. By the way, the red frame is just a texture for the bump map.

A final detail worth mentioning is that I used a mix between Transparent and Diffuse shaders, controlled by an image texture, to produce the worn-out edges of the parchments.

Monday, January 14, 2013

Hair in Cycles—My First Tribbles

I have been playing around with the new hair capabilities implemented in Cycles recently, and it's a lot of fun! One of these days I'll probably talk about how to use the Hair Info node, which provides a lot of flexibility with shading hair strands. Anyway, here are my first tribbles. Enjoy!