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

Tuesday, May 29, 2012

Daffodils—Final Scene

Here is my (most likely) final render of the Daffodil scene. I decided to add an HDR to get more interesting reflections on the glass. I set its intensity to a fairly low amount, so that the overall feel would not be lost. I rendered it to just 1000 samples in Cycles, because I wanted to keep some of the graininess, which sometimes can add interest to an image. I applied a bit of color correction in Photoshop.  At some point in the future, I would like to make a digital painting version of it, since the initial inspiration has always been 17th century paintings with high contrast between shadows and lights.




Another render from a different angle, with a slightly different setup.

Saturday, May 26, 2012

A Celebration of Pep

Pep Guardiola, Barça's coach for the last four years, just lead his team one last time to win the final of the Spanish King's Cup against Athletic Bilbao. Barça won the match 3-0 :) Actually, the highlight of the game might have been the deafening booing of the Spanish anthem by the Catalans and the Basques right before the game.

Guardiola is, without a doubt, the most successful Barça coach ever. Actually, he might be the most successful European coach ever. During these last four years, his team has won something like 16 out of 20 possible titles—I'm citing from memory, so forgive me if the figures are not exact. Before he became Barça's coach, I used to be pretty disenchanted with the team, which was mostly composed of foreign players who had nothing to do with Barcelona or Catalonia. He changed all that. He built a team from the ground up, capitalizing on local talent. Even Messi, the world-famous soccer player, grew up as a player in the Barça academy. That is something to be proud of.

Anyway, I created a little scene in recognition to all this. Visca el Barça!

Model created in Blender. Rendered in Cycles.
For the embroidery, I made use of Blender's particle hair system.



Thursday, May 24, 2012

A fine procedural wood material for Cycles—Dissected

Just yesterday, I discovered this forum thread on Blenderartists, entitled A fine procedural wood material for Cycles, where the author, wesdves, shares an incredibly complex and good looking procedural material created with Cycles nodes. The .blend file is available for download on his first post. Just taking a look at the node setup for this material is mind-boggling (figure 2). The author has groups of nodes within other groups of nodes, all interconnected, mixing together, doing weird math, and in the end you get this great, realistic-looking result:


Figure 1. I created my own scene, appended (Shift-F1) the Wood material,
assigned it to a subdivided cube, and hit Render. This is the result.

Figure 2. This is what the node setup for the Wood material looks like. This is just the tip of the iceberg :)
Click on it to see a larger version.

I decided to render the file at different node locations to see how this thing was put together. Here are some of these renders, explained. I hope not only to learn a bit more about nodes in general, but also to share this knowledge so that others can come up with similar crazy stuff.

The first thing I did was connect each one of the two Mix nodes that come out of the color nodes at the bottom of the window (figure 2), one at a time, and do a render of that (figures 3 and 4). After all, that's where the color is coming from. Notice that the color distribution on each of these two Mix nodes is controlled by the same Wood.Rings node group, which I rendered too (figure 5). This Wood.Rings node in turn gets some kind of information from two other node groups (Wood Gnarl, Grain and Stain, and Wood.Planks), originating all from the Object output of a Texture Coordinate node. Notice also that, against what I think should be standard procedure, the author has connected yellow outputs to blue outputs along the way. This is probably OK here, although I have to admit that it hurts my eyes :) 

Figure 3. Result of rendering Mix 1.

Figure 4. Result of rendering Mix 2.

Figure 5. This is what you get when you connect the Wood.Rings
group into the Color input socket of the Glossy BSDF node and render it. 

Since a mix node puts these two outputs (figures 3 and 4) together through a third input (figure 5), I figured that's the same as having two images layered in Photoshop and mixing them through an alpha channel. So that's precisely what I did next. The result is shown on figures 6 and 7.


Figure 6. The final result of compositing figures 3 and 4 in Photoshop.
I think it's very similar to the final result in Cycles.

Figure 7. The Photoshop layers setup. I'm using an inverted version
of figure 5 as a layer mask to control the mix.


I continued doing some digging, connecting node outputs into the Glossy BSDF shader node, and here are some of the results I got.


Figure 8. This is what you get if you render the Object output
from the Texture Coordinate node. The colors depend on their
orientation in the local X Y Z space of the object. I think red is
for X, blue is for Z, and green for Y (not seen here,
only the yellow hints at it).

Figure 9. The result of rendering the Wood Gnarl, Grain and
Dirt node group.

Figure 10. The result of rendering the Wood Planks node group.
These last two are almost identical.

I'm going to try to dissect one of the node groups in this whole node setup. There is a lot of math that, frankly, I don't understand completely. Some of it seems superfluous and overly convoluted, but checking every step is a feat of back-engineering by itself, outside of the scope of this dissection exercise. I have a feeling that a simpler solution might have been possible in some areas—but I don't know fr sure right now. I'm going to focus on the Wood.Planks node group and try to have an intuitive sense for what it's doing. If you click on the Wood.Planks node and hit Tab, it expands, and it shows its contents (figures 11 and 12).


Figure 11. The collapsed Wood.Planks node group.

Figure 12. The Wood.Planks node group in all its splendor. Actually, not quite. notice more node groups inside of it :)

This Wood.Planks node group starts by separating the color components from the Object output in the Texture Coordinates node. If you render each of those three components you get the images shown on figures 13 to 15. Notice that they are greyscale, because each of the channels in an RGB image is defined in a scale from 0 to 1 (or 0 to 256, or whatever). An RGB color has three dimensions—a greyscale value has only one dimension.


Figure 13. Grayscale output for Red.

Figure 14. Grayscale output for Green.

Figure 15. Grayscale output for Blue.
 Each one of these separate channels goes through a conveyor-belt-like process that changes it a bit a time. The most important step is where they go through the node group named Wood.Modulator (figures 16 and 17) by its author. You can read about modulation is on Wikipedia's article about it. In the end, the images above get converted to what you see on figures 18 to 20.


Figure 16. The collapsed Wood.Modulator node group.

Figure 17. Expanded Wood.Modulator node group. Lots of math happening here. basically, the grayscale values are
subjected to division, rounding, subtraction, and multiplying with each other and with a starting value.

Figure 18. Red value after the modulation treatment.

Figure 19. Green value after the modulation treatment.

Figure 20. Blue value after the modulation treatment.

The Wood.Modulator node group has to outputs. So far, I looked at what the Frac output does. Here is what the Int output looks like:


Figure 21. Int output result.

I'm not going to continue with the remaining node groups. Some of them incorporate procedural textures modified with math—which gives the wood grain look. Also, you probably get the idea by now of how to begin to dissect a node setup and how to go about analyzing things. Someone on the forums mentioned that it would be great if there was some kind of system for adding comments to nodes. I think it would be a great thing to have—yet another tool for learning and sharing.










Tuesday, May 22, 2012

Daffodils Part II

Here is an update to the scene. I decided that I might change the lighting radically, even if it makes the image a bit dark—I'll probably tweak that with the compositing nodes later on. My goal is to achieve a classical chiaroscuro effect. Rendered in Cycles at 500 samples. Its not a final render. Suggestions and comments more than welcome.


Monday, May 21, 2012

Daffodils

Here is a scene I've been working on since the beginning of the spring. I decided daffodils are my new favorite flower. Never really paid much attention to these humble flowers, but they are truly incredible works of nature. At first, I was going to have this be an outdoors scene, but somehow it turned into an indoor scene, a kind of still life. I hope to instill some of my love for 17th century art into this piece. We'll see. Also, before I forget, the name daffodil comes from asphodel (from the Greek ἀσφόδελος), another name for the plant and flower.

I started modeling the flowers in Cheetah3D, but I ended up modeling everything else in Blender. As for the render, I used Blender's Cycles. ,The scene is still a work in progress, as I need to work on the textures and add a couple of details. Also, modeling those shears was incredibly fun!


The tile texture comes from the CGTextures site.
I can't quite decide on the color for the cloth :)
Rendered to 500 samples on Cycles.

Tuesday, May 15, 2012

Photoshop CS6 3D Tools Reviewed

With the recent release of Adobe CS6, Photoshop's 3D functions have undergone a thorough rewrite, although I don't think they are yet a replacement for a dedicated 3D package. As in past versions of the program, these 3D functions come only with the extended edition, which frankly seems a bit disappointing, but I am not a marketing wizard, so who knows :)

Possibly the most important changes are around the new improved workflow (3D panel, 3D layers), the new options for rendering and GL previews, the camera positioning, and materials. In spite of these improvements, I still don't find that using Photoshop for high end 3D rendering is a realistic (no pun intended) option. I find the tools a bit clunky and old-fashioned—especially when compared to modern render engines, unbiased or not. However, Photoshop is a good tool to create quick product mock-ups intended for traditional publications. 3D models can be incorporated in several ways: via a 3D postcard function that turns an image into a flat 3D object; by adding built-in shapes (cubes, spheres, donuts, displacement map planes); by importing files in 3D formats, like .obj; finally, as in older versions of the program, one can extrude sections of an image to generate an editable 3D object.

Materials are handled much more like in other 3D packages, with the ability to define diffuse, specular, transparency, and bump maps. Actually, this might be Photoshop's strongest advantage in a 3D workflow: many 3D artists are already used to switching to Photoshop (or an alternative, like Gimp) to work on textures. Since Photoshop can now generate UV maps, even though its current UV tools are pretty limited, it is conceivable to adopt a Photoshop-only texturing workflow. It could be its strongest point. Photoshop's built-in materials are great for those who still learning about creating materials, and for those who are in a hurry.

Moving around in the 3D space is more intuitive and more resemblant to other 3D packages. Earlier versions had these funny tools on the toolbar for moving around. 3D navigational tools are now placed in the 3D context, not on the toolbar, and can be keyboard-accessed. Also, a grid floor with colored axes is available now, with an extra orthographic inset panel to help positioning. This makes positioning of the camera and objects much easier, which makes compositing a real possibility from within Photoshop. Actually, in my opinion, it would be wise to invest more energy in improving the compositing potential of Photoshop's existing 3D functions, even if it means losing some quasi-3D modeling stuff which is best left to more capable apps.

Rendering has also been improved. Photoshop now can take advantage of the GPU to render and preview scenes faster. Also, now it has a better raytracing render engine, which makes renders look much more professional and nice. Personally, I'd still recommend using some proper render engine for that, unless there's nothing else available. Lights have been improved as well. There are now more types of lights (like a sun-like infinite ray light), and it is easier to control where they go in the scene. Also, a new option for IBL (image based lighting) has been added, so one can place an image on the background, to act as both a lighting source, and be reflected off shiny surfaces.

Overall, I think Photoshop Extended 3D tools are pretty decent for a 2D program :) However, until there is serious camera and compositing control, I don't think many 3D pros or hobbyists are gonna switch any time soon. On the other hand, Photoshop's 3D tools might just be perfect for, say, a fast-paced studio needing to generate no-fuss, get-the-work-done product visualization mockups.

Monday, May 14, 2012

New Demo Reel

I just updated my demo reel. I had not watched it recently, and then one day I noticed it needed an update really badly :) For one thing, the old demo reel had both unfinished projects (a big no-no), and some stuff that wasn't supposed to be there. My new demo reel has now my best pieces, and I have added some new and old illustrations and 2D art. I used to do a lot of comic-style drawings (lots of goblins and warriors and aliens), and a bit of some traditional stuff—like figure drawings, which are fascinatingly productive. I've been trying to get back to drawing and painting, so I think it's OK to include this, since it is more indicative of where I am currently. As usual, comments and crits are more than welcome :)

Thanks for watching and enjoy!