3D tutorials, tips and techniques, inspiration and community.

Tuesday, December 13, 2011

Creating a 3D Illustration for a Book Cover in Blender

Elizabeth Castro just published a new book about EPUB production, with the title From InDesign CS 5.5 to EPUB and Kindle. She asked me to create an illustration for the cover. This is just one more book in a series of miniguides about the same topic, so I decided to continue with the same general theme as I used in the first cover illustration I created for this series. I wanted to maintain the diagonal element on the front cover, and leave the back cover relatively empty. Also, I wanted to keep some sort of horizontal divider. Other than that, I knew I had to use some image that made some reference to the word point, since these minguides are all expansions of the original Straight to the Point book. That's where the dart idea came in. This is the final render.


Final render, at a smaller resolution. In order to choose a render resolution,
I multiplied the size of the cover, plus bleed, by 300 (as in 300 dpi) and that
gave me the final size, approximately 3500 x 2700 pixels.
The white line (not in the actual final image) separates the front cover from
the back cover.
This is the final cover design (not done by me).
All the models in the image were created in Blender from reference images of darts and dartboards. The final render was done in Cycles, the new render engine recently incorporated into Blender. What's great about Cycles is that it allows for real-time render previews, which takes away a lot of the guessing related to lighting. Another great thing is that it's a physically correct renderer, which means that you can achieve realistic-looking results with less fidgeting than with Blender's original render engine (Blender Internal). Also, it does depth of field beautifully, and although it is physically-correct, it still lets you cheat your way out of any problem. Unfortunately, at the time I'm writing this, it still does not support compositing, otherwise I would have added some motion blur. Actually, I could have added it in Photoshop, but we decided against it because we wanted something simpler—it's a book cover, not a video game!

Here is a clay render of the models' wires.





Many of the original materials are relatively complex, and involve mixing two or more layers (‘nodes’ in Cycles parlance) to achieve a certain effect. What's neat is that you can save node groups to be reused later on, even across files, which is a real time saver. I am attaching a screenshot of the node setup for the red plastic with black lettering on the dart fletching. Roughly, the red plastic finish is achieved by combining a Glossy and a Matte material, but the mix is controlled by a Fresnel node, which determines the intensity of an effect depending on the view angle of the camera. The lettering texture defines what is red plastic and what is black—just like an alpha channel in Photoshop.





Sunday, December 11, 2011

Opening Multiple Copies of Blender on Mac OSX

Up until recently, I thought that there was no way to have several windows (or copies) of Blender open at the same time on Mac OSX. Actually, this rumor has been spread around both in the Blender forums and in the real world, to the point one would even doubt the validity of using Blender on a Mac—some people in the Win-Blender community can be so snide against the Mac sometimes... :D Not fair.

Anyway, I just discovered a very easy way to get around this apparent limitation. My solution does not involve having several copies of Blender, but rather using the Terminal to open multiple copies of the same Blender application. Yes, the Terminal, that little known utility that scares most Mac users out of their wits, or at least it used to have such an effect on me.

There are two things you need to know about the Terminal. First, you can navigate to any folder in your Mac from within a Terminal window. To do so, you open a new Terminal window, type cd (which stands for change directory,) and enter the name of the folder or file you want to have accessible. After that, just press Enter. The Terminal allows to autocomplete file and folder names by pressing Tab. To make sure you are where you're supposed to be, type ls (for list) and press Enter. That shows you the files in the folder you are viewing. You can type an entire path to a specific folder or file by separating the folder inside folders with a /. To backtrack, type cd .. (that's two dots) and press Enter. To go to the root user folder, type cd ~. These basic commands will allow you to start navigating your Mac from the Terminal.

The second things is that you can perform commands from the Terminal. You can open programs and files, edit them, save the changes. Actually, it can do this and more, but at least it is important to realize that you can open a program from the Terminal. In order to work on a file, you need to navigate to the folder where that file is contained—in the same way that, in order to open a file, you need to go to the folder and double-click on its icon.

Once you can do that, go ahead and start a new Terminal window. Navigate to your Blender application folder. Yes, what we see on the Finder as Blender is not a program, but a package: a special Mac folder that contains the program itself and other files used by the program, like the icons, scripts, and default file. Anyway, navigate inside your Blender package, all the way to the folder where the actual program resides. If you have Blender in the main Applications folder in your Mac, the path to it would be (assuming you start from your user folder):
cd ../../Applications/blender/blender.app/Contents/MacOS/
Then, once you're there, open Blender by typing

./blender

The terminal spews out a couple of unintelligible lines, which I choose to ignore:


ndof: 3Dx driver not found
found bundled python: /Applications/blender/blender.app/Contents/MacOS/2.60/python
[Lux 2011-Dec-11 13:37:01] Using pylux version 0.9 (dev)

In any case, the end result is that you get a new Blender window open, independent of the other(s), and it allows you to work with two files at the same time! Cool stuff. I would suggest saving this text somewhere, either as text or as a script, so that you don't have to enter it manually every time. If I work out a Python script for this, I'll make sure to share it.

Enjoy!

Thursday, December 8, 2011

Cycles Nodes Microtutorial

Recently, I opened an older Blender file I had used to do some test renders in Cycles, and I noticed that some of the materials were broken. At first I thought that the new Cycles had changed so much that the older setup was no longer compatible. Then, I realized that the reason for the broken nodes was that I had not connected some of the node inputs into outputs of the same color. Cycles was fine, after all, and all that was needed was that I connect same color with same color. So this is the tutorial.
Very basic: for Cycles nodes (and for any node, in general) connect same color to same color. That's it.

There are a few colors, and this is what they mean:
Yellow: an RGB value.
Grey: a Greyscale value.
Green: a Shader (which is the same to say as Cycles material)
Blue: a Vector. A vector is a hard concept to explain. It has to do with the projection mode of the material on the model polygons, and the scaling and manipulation of the texture in its own local space. In essence, a vector is a way to describe a dimension. In Cycles, it is mainly, but not only, used to define the texture space (generated vs. UV).

I just Control-A added some nodes, doesn't much matter which. Notice that they all have different colors for the input
and output. It is essential to notice those colors, and connect things in the right order.

I connect the nodes. The final material is a Mix Shader with a B&W displacement from mixing a texture plus a color. The texture will be used in a Generated vector way, and scaled 5 times up (which make sit 5 times smaller—really). The Diffuse and Glossy shaders used in the Mix Shader don't specify a Vector, which in Cycles is UV by default.
So, to sum it up, connect same colors with same colors!

PS: here are two screenshots of a scenario where the material gets broken. Before and after. All I did was connect same color to same color. I think it worked.

Disconnected

Connected by following the rule

Tuesday, December 6, 2011

Photoshop's 3D Tools Reviewed

I've owned the extended edition of Photoshop CS5 for a while now, but I had never given the 3D tools included in it a thorough look. At first sight they might seem like stuffing in a turkey, but I decided to dig in, and see what they could be good for, and whether they could be used in a production environment.

When you open Photoshop CS5 Extended Edition, you get this new (to me) 3D menu with some functions that allow you to import 3D files into a layer and texture and render them, You also get a new 3D palette, where you control the 3D content at the scene, mesh and, material and light level. You can just use the File -> Open command to include 3D mesh into 3D layers.

Photoshop does not have quite as extensive a render toolset as that of many 3D packages, but that is to be expected: Photoshop is not a 3D tool. What it does, however, it does pretty well. I wish some of the 3D packages I use got some UI tips form it. Photoshop's functions allow you to create quick mock-ups and even some nice compositing effects very quickly and efficiently. Some of the best UI ideas include the way in which texture files are saved and edited  internally with the same PS file, and how they are displayed at the layer level.

One very good feature is the handling of material textures. You can create and save internally within the very same file a number of textures to be used on your model. These textures can affect the usual suspects: diffuse, opacity, bump, normal, environment, reflection, illumination, glossiness, and shine. Photoshop comes with an array of pre-defined materials with their own set of textures, which is a really good feature. Apparently, you can download user-made materials from the Adobe site, another good thing. Also, if you import an UV-mapped model, you can superimpose the UV layout automatically with the Create UV Overlays command—a real timesaver. Also, you can control the scene lights reasonably well. The light types are limited to Spot, Point, and Infinite.

However, when it comes to real power and flexibility when texturing in Photoshop, there are a few important limitations. I would recommend UV mapping externally, because Photoshop only has two automatic unwrapping options, which may or may not be what you need—most likely not. Basically, you can't apply seams and fine tune the unwrap. Also, I tried real-time bump texture painting, a really cool feature which I already used in Blender (see this tutorial,) but surprisingly pressure sensitivity seems to stop working when painting directly on the model.

On the downside of things, we have a lack of true camera control, useful if you're thinking of using Photoshop as a compositing and special effects post-render complement. The camera cannot be seen anywhere, and it is controlled through either some tools on the toolbox or right on the toolbar. I tried positioning it to match an existing scene, but axis and rotation values are not consistent among applications, and I did not have the patience to figure out Photoshop defaults.



New tools for controlling the position and rotation of the camera, both accessible through the toolbox
and the toolbar.

There are a quite few more 3D tools in Photoshop, most of them for extruding and 3D-izing images and selections within images. These functions are somewhat similar to Illustrator's 3D tools, although a bit more mature. I can see how they are really good at creating quick and dirty mock-ups, and with a bit of post-processing, they can be great, even brilliant :)

In the end, there is one final factor that means that, although Photoshop excels at 3D production tools, like UV painting, I don't think one can realistically use it as a true 3D package. I'm referring to the lack of global illumination. It does have raytracing shadows, but they look just like that: 3D shadows. The lack of radiosity inevitably gives the renders a 90's look. In any case, like I said earlier, Photoshop is not a 3D package, and this is just extra stuff you get if you think you might need it. In the end, it is a very solid tool, and I can see it expanding into some mesh sculpting in the future, although I think that 3D painting is where Photoshop could really excel, and the foundations are already there.

Friday, December 2, 2011

I Started Selling Models on Turbosquid!

So the title says it all. I decided to dust off some of my old models, get them all cleaned up, do some renders for the thumbnails, and start selling them on Turbosquid. So far I only uploaded one file, an old sports car I modeled for this Mac racing game, Redline. Because I am using the word "Porsche" for my model (it's a Boxster,) Turbosquid decided to put my submission up for review. Once it passes that review, the model is made available for purchase. Fingers crossed!

One of the things I like the best about Turbosquid so far is that they seem very well organized. Model sellers have a dashboard where they see all the models they have updated, their status, and the sales. It seems that once you start selling, your own status as a seller changes as well, and you get colored diamonds, Makes it seem like a game :).

Here is one of the renders I submitted for a thumbnail. The model itself is low-rez, with somewhere between 4K and 5K polygons, which is optimal for that game in question.