Search this blog

Showing posts with label Off-topic. Show all posts
Showing posts with label Off-topic. Show all posts

18 June, 2016

Learning to teach

This past couple of months I've been teaching once a week a rendering course at private art school here in Vancouver. It took quite a bit of my time for course preparation (which in turn left this blog dry), but it's a quite nice experience and a small way to contribute to our rendering community, if you can, I wouldn't discourage people into getting involved with teaching.

This is not the first time I held a class, I actually worked for a small professional school in Italy teaching the very basics of computers while I was going to university. But it's the first time I teach rendering in a systematic way, outside sporadic presentations at work and conferences. 

So, still lots to learn...

What to teach?

The first obstacle actually is to decide what to teach. I had a curriculum for this course as it was taught in previous years, it went through the motions of building an engine in OpenGL, and from what I can tell was fairly extensive, albeit a bit oldschool.
I decided pretty early on to scrap it as I didn't think I could provide enough value that way.

I have to premise that this course takes place over 7x3=21 hours, and it's part of what I imagine is a very intense, packed year of courses in game programming. 
It's one of the last courses that the students take, so there is an expectation of a certain level of proficiency with programming and math (I don't cover linear algebra, for example). So you really have to pick your battles and fight for student's attention.

It might be my own bias (as I started programming extremely young and went on towards more theoretical studies in my higher education), but I still think that APIs and frameworks can (and probably should) be self-learned. These are not complicated topics, and while you might pick some bad advice if you mindlessly accept everything the web throws at you, I didn't think going through such things would be the best use of (rather limited) time.

Ok, so I started with a clean slate. What now? This is truly challenging. You can easily talk to people at work, on in a conference, when you have a quite precise idea of what can be assumed to be "common knowledge". But here? Not so much.
So my first decision was to keep it agile... I had from the get go a rough conceptual plan of how to structure the seven lessons and how they could relate to each other, and I discussed it with the head of the faculty, but I did everything one lesson at a time, with a good dose of improvisation.

This is my strategy. I would think and jot down notes (pretty much as I do when I have some thoughts that I think might one day go on the blog...) on where I wanted to go with a lesson, starting with the overall objective (what I wanted the students to achieve). 
Then, the day before I would scramble and start laying down some slides, trying to keep them minimal (which is against my instincts), I just make sure I have enough supporting material, diagrams, illustrations, to cover what I wanted. 
I post the lesson materials online after the class, by actually pruning out things I didn't end up covering, writing a summary to cover the main points of the lesson and giving links to further resources.

The way I tried to adapt is to slightly over-prepare. Not as in to be very prepared and rehearsed (I don't rehearse), but to have a good amount of options for the class, as it's easier to cut corners in class than to have to scramble to find materials that you didn't expect to need. I never walk in the class thinking that I -have- to go through everything, and I don't have the lesson after the one I'm teaching prepared at all, so I can always adjust.

How to assess?

Improvising (to an extent) the lessons gives the freedom to adapt, but you can't adapt if you don't have the pulse of how things are going. And this is probably the hardest thing, ever. It's especially hard when you are very versed in a field, because you totally lose sight of what means not to understand certain concepts. 

The more basic the course the harder the task. If you ever teach an introductory class to programming, and have your students problem-solve, you'll see what I mean. It's actually hard to articulate why certain things are solved in a certain way, when for your brain it's just obviously what you need to do...

I'm not great at this yet actually. I waited with anticipation the student's solutions for my first assignment, because I had not a solid idea of it was going to be trivial or daunting, and if really things where coming through (they ended up doing great). Assignments are for teachers! I really don't care about assigning grades, I care about getting feedback!

That said, a few things I can share.

First. Generic "checkpoints" are worse than useless. Asking to an audience how things are going, whenever things are understood, or to ask questions freely, is at best a waste of time, and at worst a way to get a false sense of confidence. Questions have to be real. 

Problem solving in class is great. I tried to mix problem solving with in-class assignments, and the reason I think you need both is that if you do only questions you risk engaging always the same people (and pointed questions are a bit more aggressive), while assignments let you walk through desks and see how people are doing individually. 

Moreover, as this was a very intensive course, I could not expect really a lot of at-home study from the students (my class ends at 21:30!), and I think working in class goes well with such programs because you need to have the time to come up with solutions by your own, and practice, so if you can't do it at home, at least some degree of that was done during the class itself. 
Arguably all the real learning happens not because one memorizes a lesson as a teacher taught it, but by practicing and thinking hard enough that the underlying concepts start to become apparent.

Finally, just asking for guesses and speculations before revealing the next bit of information also just helps keeping people engaged and in general, awake!

The course.

A few people after learning that I was trying this asked for the course program. I can't share the course materials themselves, both due to contractual restrictions and because they are not polished enough to be comprehensible without me explaining them, but I will go through what ended up being my ideas for the lessons (keeping in mind that if I am to do this again, I will probably change a lot).

Lesson 1: Introduction. My background, how I did things and why that doesn't matter. The course objectives: giving a basic understanding of the field to facilitate further study and practical, hand-on tinkering with GPUs and shaders. Introduction to the "rendering problem". Rendering in a videogame company, what it means to be a rendering engineer, what are the problems we face (spoiler alert: tech is the easier part).

Lesson 2: What's a GPU? Starting from a CPU (serial execution) going towards a GPU (latency, hiding it with data-parallel work...). Going from the rendering equation to rasterization: visibility and shading. Some hand-on time with executing kernels on the GPU: ShaderToy.

Lesson 3: Going from data-parallel processing to 3d scenes. What goes on when we draw an object? Vertex shaders, pixel shaders. Tinkering in Unity.

Lesson 4: "Advanced" shading. Texturing, projections, UV mapping. Some fun examples (reflection mapping with pre-integrated cubemaps in Unity). "Advanced" lighting and back to the rendering equation. Fundamentals of PBR.

Lesson 5: Going past a single draw. Engine and (generic) rendering API concepts. API: resource creation (memory), binding of state (registers), draws -> command buffer. Engine: visibility and sorting. Rendering algorithms: shadow mapping, post-effects, forward and deferred rendering.

Lesson 6: DirectX 11 API in-class "live coding". I downloaded SharpDX (an DX9-10-11-12 C# wrapper) and we went from drawing a single 2D triangle (the "hello world" of rendering) to drawing a 3D quad.

Lesson 7. I haven't actually taught this yet, but I settled now with the idea of going through an actual contemporary game, showing art and rendering choices, workflows, and more advanced rendering algorithms.

Closing remarks.

Teaching gives us an unique perspective we don't have writing articles or speaking at conferences. We can see (if we pay attention) what people understand from our words, and we can see if we are boring or engaging. I still have a lot to improve. Especially narrowing down topics is hard! Creating something truly beautiful and to the point.

To a degree I think trying to squeeze too much into a lesson (or as I do in this blog, an article), responds to the same urges that make programmer over-generalize: being concerned about covering all the possible bases even if it comes at a detriment to the overall quality. I'm aggressively against these practices in code, but still not great at exercise the same restraint in lectures.

So, I'd better stop here!

14 March, 2015

OT: The design space of fountain pens

Met Stephen Hill at GDC this year, he casually mentioned that I should write an article about pens. Well Stephen maybe I WILL.

I try to live a reasonable life, but there are two things I do posses in more quantities I should: writing and photographic equipment. I would say that I collect them, but I don't keep these as a collector would, I actually use them with little regard, so I'm more just a compulsive buyer, I guess. 

But with much wasted money comes experience, or something.

- Why fountain pens

Calligraphy, duh! Line variation and reasons. Seriously though, they are different, and really it's a matter of taste... The feeling is different, they require less pressure, the ink is different... But nowadays rollerballs and gel pens have so many tips and technologies it's hard to compare. 
Also, on a purely utilitarian scale, I believe nothing can win a simple 0.5mm mechanical pencil...

Me writing this article.
Pen is a Namiki Vanishing Point ExtraFine
Notebook is a Midori Spiral Ring

So for the most part it is a personal choice, a matter of taste. I like them, they are elegant weapons for a more civilized age, and you might too. 
Now, without further ado, let's delve into this guide on how to start spending way too much money on pens.

- Nibs

First and foremost a fountain pen is about its nib. There are two main axes of nib selection: shape and material.

For shape, most pen brands will make three sizes of round tips: fine, medium and broad. Fancier brands might expand to extra fine, extra (or ultra or double) broad and maybe even ultra extra fine (sometimes also called needlepoint or accounting nib).

The catch here is that for the most part, these names carry little meaning. Especially on the finer scale the differences can be huge, traditionally Japanese nibs are finer, but some Japanese brands don't follow the rule.

A needlepoint nib (disassembled for repair), hand ground (Franklin-Christoph)

Italic, slab, oblique, cursive nibs are all variations of non round nibs, they produce a finer line in certain directions and a bolder one in others. Italic and slab are cut straight, with the italic being sharper (more difference between writing directions), crisper and harder to use. The oblique nib is cut at an angle. All these come in different sizes, usually specified as millimeters of their wider angle. Very wide stub nibs are also called "music" and often have more than a single ink slit, to keep the ink flowing. Lastly, "zoom" nibs, much rarer, have different weights at different angles.

Selection of Lamy steel nibs

More exotic nibs can be trickier to use and usually require better pens to work well. Bolder nibs lay down more ink, and thus stress the pen's ability of keeping a good, constant flow. Finer nibs are easier to break or misalign, they are harder to make and to make so they write smoothly. Very sharp italic nibs somewhat inherit the worst traits of both.

Consider also that broader nibs will use more ink (deplete faster), the ink will require more time to dry and can bleed more, but many people do like them better for fine writing as the properties of the ink (shading variation, sheen, color) show more with a wetter and more varied line.

Ink shading from an Italic nib
Image source: https://wonderpens.wordpress.com/tag/rhodia/

In terms of materials, there are really only two options: steel and gold. Both can then be plated in different materials (rhodium, ruthenium, pink gold, two-tone and so on) but that is only an aesthetic matter.

The functional difference between steel and gold is that the latter is softer, more flexible, thus it writes more smoothly and with more line variation. Steel is more durable and better for heavy handed writers.
Somewhat confusingly, both materials can be used to make flex and semi-flex nibs, which are thinner and specifically made to give lots of line variation. They are quite hard to use and suited mostly for calligraphy.

A Piltot/Namiki Falcon flex pen
Image source: https://www.youtube.com/watch?v=XMolEvB5EqA

Most pens have interchangeable nibs, and buying nibs alone is usually much cheaper than buying a full pen.

- Pen body

A big part in the choice of a pen is taken by its aesthetic, which is I guess entirely a matter of taste so I won't discuss it.

There are though a few functional considerations to keep in mind. Ergonomy of course is a big one. Bigger pens tend to be more comfortable but of course, less easy to carry around. Heavier pens might not be great for longer writing sessions, and balance can make a lot of difference.
For the most part, you'll have to try and see what fits you best. Remember to try any given pen with and without the cap posted, the balance will change significantly, with some pens designed to be posted while some others don't post very well.

The Franklin-Christoph 40 pocket need to be used with its cap posted,
it's way to short otherwise. Screw-on cap, clipless, can be converted to eyedropper

The filling mechanism and ink reservoir is also important. Most pens nowadays use plastic cartridges, most being "international standard". 
The second most widespread mechanism is the piston filler, which is quite convenient and usually has chambers that can carry more ink than a cartridge, but it won't allow you to carry spare ink as easily.

Now, you really will want to use bottled ink in your fountain pens, both because it's cheaper and it comes in a much wider selection, but having a cartridge pen won't stop you. Most of them can be fitted with "converters", special cartridges with a piston to suck ink from a bottle, and you can always refill a cartridge with a syringe (which I actually find less messy than dipping the nib in the bottle to refill).
Also, many (but not all) will work well as "eyedroppers", filling the cartridge chamber directly with ink (without a cartridge installed) and sealing it (a bit of with silicone grease on the screw)

There are other minor things to notice. As most pens are round, having a cap with a clip allows them not to roll, which might be something to consider even if you don't need to clip your pen to a notebook.

Nakaya "dorsal fin" model, an asymmetric design made to not roll even w/o a clip
Image source: http://www.leighreyes.com/?p=4313

The cap design and closing mechanism also matter, actually more than it might seem. Not only certain caps fit better posted than others, but certain designs are more prone to sucking some ink out every time you uncap. Screw on caps are less prone to this, but certain screws can be annoying to feel on the barrel of the pen, depending on how you hold it.

- Ink

A big reason to use fountain pens is that they allow to play with different inks. It might be actually a much more reasonable idea to collect and play with inks, than it is with different fountain pens.

Inks have lots of different attributes, even colors are not so simple as many inks can "shade", show variation (even drastic) as the pen lays down more or less ink on the page (according to pressure and speed), they can have sheen and even pigment or other particles embedded (these though are often more dangerous to use and can clog a pen if not properly handled)

Inks can be even more interesting than pens!
The Pen Addict is a good review site

They can be more or less lubricated, certain inks can flow well even in lesser pens while certain others tend to be more dry. If your pen is already on the dry side, you don't want to couple it with a dry ink, and vice-versa. Large nibs tend to need more flow (as they lay down a bolder line) but it's not rare to need wetter inks in extra-fine nibs as well, as the tines there need to be so small that non-well lubricated inks can have problems flowing.

Different inks also have different drying times, and tendency to feather or bleed through paper. Good paper will also help absorb less, but that also means it can increase dry times. Low feathering is important especially when using lesser papers or in finer nibs (that won't look as fine with an ink that expands a lot on the paper).

In practice though the first and most important characteristic to consider for daily use and note taking is water resistance. Most inks are not, and even a drop of water cleaned up quickly will ruin your notes. So before looking at color and other characteristics you have to be conscious about water resistance and decide if you need it or not. 
Dry times (smudging...) for me haven't been a problem on the other hand, but if you are left handed that can actually be very important (and I'll try to use a more porous paper that absorbs ink fast).

It's not in general "safe" to mix different inks, albeit most of the time it won't cause havoc and you can easily clean your pen by just running it under cold water until it flushes clean. There are certain brands who make mixable inks, but it's rare.

- Some recommendations

I will make a sweeping statement and say that there is no better "starter" fountain pen than a Lamy Safari (or Vista, a so called "demonstrator" - transparent version). Its aesthetic might not please everybody, but it's by far the best "writer" for the price, and it comes in a ridiculously wide selection of interchangeable nibs (they even make some optimized for left-handed writing).

A fairly recent contender to this throne is the TWSBI 850 and Mini, really great pens made to be fully disassembled easily. The Mini is probably the best compact pen you can buy today, it's a piston filler so it still holds quite a lot of ink too!

If you look for a great very extra-fine nib pen, I haven't so far found anything that beats the Pilot/Namiki Vanishing Point 18k gold nib (a.k.a. Capless Decimo). Right now it's my favorite pen, it's not very cheap, that's the only reason I didn't recommend it as starter. It's also pretty and unique. Some don't love its clip, with some effort it could be removed.

A&G Spalding and Bros make surprisingly good, cheap pens (considering the brand doesn't have a big history). Kaweco is cheaper brand recently gaining traction, but I don't like so far their nibs flow, especially on small pens you want -very- easy writing nibs, as these are to begin with not the most comfortable pens and applying pressure is fatiguing on them.

On the more expensive side, I would say to stay away from Montblanc and the other luxury brands, they are good pens but you pay because they are fancy more than because they are great. If you have lots of money or you want to make a really great gift, I'd personally go with a Nakaya, handmade and customized to your taste...

Medium-tier brands that I love, other than the already mentioned Namiki/Pilot (which also makes super expensive maki-e models, by the way) are Sailor and Platinum, both of them make great nibs (and true "Japanese" extra-fine ones) but somewhat more boring conventional "cigar" shaped pens. 
Franklin-Christoph is American brand which makes really unique, hand turned and not very expensive pens, worth a look.

There are of course many, many other great brands, certain fancy brands do make more "understated" models in their line which might turn out to be great, and vintage, used pens are also incredibly interesting, but all these I'd say would be less easy to recommend as a "first" pen.

After you get a pen you'll need paper and ink. Rhodia makes some great, inexpensive paper, but there are really many great brands. Field notes is really nice as well if you like small notebooks. Tomoe River paper is quite unique as well, but more a "fine writing" paper, not for daily use (will take time to dry especially for broader nibs).

I personally prefer spiral bound, A5 notebooks because they are easier to use on the go, they open fully and are more rigid, can be held one handed.
And if you are like me you don't love to have ruled or gridded paper, Rhodia and many other brands make notebooks in plain sheets or with less conspicuous dots instead of lines.

Lastly, inks. For Black I'll go with Aurora or the Platinum Carbon Black Ink, both are very black with great flow. The latter is pigmented which is very rare (another pigment ink is Sailor's Kiwa-Guro, that I haven't tried yet) it's nicer but it can settle in your pen if not used often and should be cleaned after depleting to avoid clogging, better use it in a cheaper pen you have no problems taking the nib apart for cleaning (which is usually fairly easy...).

For colored ink it's much, much harder, there are so many great options. I don't love plain blue ink and I usually go with either darker or lighter shades, one of my current favorites is the Private Reserve Naples Blue.

Sometimes I carry a red or more colourful ink, often in a broader nib for highlighting and so on. I find that orange/brown colors pair better with both black and blue than most reds. Noodler's Apache Sunset.

Lastly, if you want something super fancy, nothing is fancier than Herbin's Stormy Grey and Rouge Hematite limited edition inks (if you can still find them).

Incidentally, J.Herbin, Private Reserve and Noodler's together with Diamine are also the brands that make the most variety when it comes to colored inks.

Amazing (but not the smoothest ink ever).
Image source: http://www.gourmetpens.com/2014/11/review-j-herbin-stormy-grey-ink.html#.VQTK7VPF-xN

17 May, 2014

Photographic inspiration

If materials, meshes, textures and lighting were "solved", what would be all the focus of (realistic) environment visuals? 

Architecture, photography, scenography. And the technology to serve these better.

Should we emulate cinema and still photography or does photography in a virtual world mean something different? Is the interactivity a possibility to create techniques that we don't even have in CG movies?

I don't know, but it's wise to know the past while thinking of the future.


When it comes to environments, I love the American cityscapes depicted by the early adopters of color photography. It's a feeling that is hard to describe, estrangement maybe, probably an effect that is amplified on me as I grew up in the super dense Southern Italian cities, where nothing has an end and people build all in the little space available, from the sea up to the Vesuvius.

Who are your favourite photographers?

Trent Parke
Richard Misrach
Gregory Crewdson
Todd Hido
Joel Meyerowitz
William Eggleston
Stephen Shore

06 February, 2014

OT: The Sony RX1 (versus Fuji X100s)

I recently bought an used (new is way too expensive) Sony RX1, time for another photographic off-topic. I'll keep it short, follow the links if you want to know more.


Throughout this I'll share some meaningless images of my first week with the RX1
- Mhmmm, GOOD

First and foremost, the lens. Or if you prefer, lens/sensor combination, because these days lenses mean nothing if not seen on a specific sensor. Case in point, all modern mirrorless cameras from the Sony NEX to Micro 4/3 to the recent Sony A7 fullframe in theory can mount a lot of extemely expensive glass from Leica and Zeiss, in practice nothing by the Leica M seems to perform well with these, especially if you go 35mm or wider. 
Yes you can correct some of the defects (and really the Leica M does apply some correction in-camera, that's also why it works better) but honestly, if you're attaching a thousands-of-dollars lens to a body, you don't want anything less than perfection.


Sharp!
So, how does the Sonnar do? One word: wonderful. It's The reason to buy this camera. Easily the best 35mm I've personally used, film or digital, and among the best lenses I've ever seen. 
It's a "people" lens, optimized near and wide open, doesn't care about avoiding distortion (and it shouldn't, these things are easy to correct digitally and lens optimization should focus on other issues nowadays) from f2 to f4 you basically gain only less vignetting. Some people say it's somewhat worse at infinity, I didn't pixel-peep that but I can believe it, still it's an excellent performer, with a dreamy, smooth quality.


Loves people
Second, the handling and build quality. It's very, very good. Still not perfect because you know, no way a modern camera ships with all the controls done right, so you still need two presses for manual focus assist/zoom and you don't have a direct ISO wheel nor an absolute shutter speed wheel (i.e. with markings), but the aperture ring is excellent (fly-by-wire but it feels mechanical, third-stop clicks) and the manual focus one is very good as well. Also, plenty, plenty of customizable buttons. Good rear LCD quality. Well done.


Last but not least, the sensor. Nothing really to say, it's a 24 megapixels full-frame and it delivers exactly what you expect. Very low noise, lots of details, it's quite normal for such a sensor but in a "compact" camera it's not something you see often (in fact, this is the smallest full-frame camera you can buy, period).

No light? Not a problem
- Eeeew, BAD

It's a toy. A wonderful, mesmerizing toy, but not a "professional" camera. At best a second body to have around just for its lens/sensor combo. That doesn't mean you can't take amazing photos with it in any possible condition, it's just not done in a way where I would depend on it if it was critical, if a missed shot meant failure. Why?

I want a "Monochrom" version of this camera!
First, it's lacks a viewfinder! Oh buy you can buy an external one... Let's see, you have two bad options there. 
The first is to go with an EVF, which not only is an EVF (duh) but also attaches to the flash hot-shoe, leaving you without the option of attaching an external flash.
The second is to buy an OVF, but even Sony's own is just a pure optical VF, with no indicators, not even focus confirmation. Which means it's utterly useless, because there are only two scenarios, really. Either you're in a sunny day, and then you can/have to use fast shutter and the three-contact-points given by a viewfinder are not important (certainly not enough to lose all indicators!) or you're at night, then you would want to grip the camera better, but focus is critical, you're probably wide-open and can't even trust the autofocus... So yes, no indicators means no photo.


All in all the EVF is still an important accessory to buy, even with its defects, it's your best bet, and it helps if you want to be able to review images in bright light. I really hope Sony will make an OVF with some electronics in it... but I know it won't happen, maybe when they do an RX2...


Second, it's slow. Especially the autofocus. Not the slowest ever but among the slowest, the good is that even if it's slow it seems to truly not lie. If it's green, it's in focus. Autofocus systems that lie, saying it's in focus while it's not, are worse than anything else, but this especially in lowlight is problematic, it requires area with lots of contrast, more than what you are used to use, and if you're photographing a moving subject it can be frustrating. Also, very bright regions seems to be able to confuse it (I guess because the out of focus highlight still register as contrast, but it's only a guess)
Luckily it's quite easy to toggle AF/MF by assigning that to one of the buttons which makes the camera much more usable: just AF then lock and do MF adjustments as needed.


- COMPARISONS

The way I see it, there are only two alternatives in its class, or maybe even just one if we wanted to be totally fair.

The X100s is prime competition. A bit unfair because the X100s will fit in a coat pocket while the RX1 doesn't, so it's in a different size range (useful ranges are: fits in pants, fits in coat, everything else) but still it holds its own and in practice many people will wonder what to do between the X100s and the RX1.

Having used both of them I can say, the X100s hybrid viewfinder is the reason to buy that camera, the RX1 lens is the reason to buy this. Interestingly if you look on dpreview (my first stop for camera reviews) you could think that browsing the studio shots there's not much difference between the X100s lens/sensor and the RX1, or anyways it's really hard to tell while pixel-peeping. Well, it's wrong, in real-life the Sony camera is on a entirely different planet.

The RX1 also feels better built and has a less erratic AF, but the X100s AF is quite a bit faster... The RX1 has probably better peaking (due to a better LCD really) but the X100s has the excellent virtual split image aid... All in all? I prefer the RX1, because even if the X100s is almost in every way better to shoot with (and mostly because of the incredible viewfinder, really almost everything else is worse, handling-wise) when you get the image the Sony image quality shines quite a bit ahead of the Fuji.

The second, more fair competition is Sony's own A7 and A7r... but I didn't try these so I can't say much. For now, they have no lenses really, just a zoom that seems quite mediocre and a 35mm f2.8 which seems good but not as excellent as the RX1 f2, and really these differences are "worth" (or maybe I should say cost...) thousands. Yes you can buy adaptors, which are worthless, as they make the camera/lens combination bigger (and you don't want that in a camera that's supposed to be compact!) and often perform not-so-great.

Also the A7 focal plane shutter won't flash-sync as fast as the RX1 and won't be as quiet and vibration-less. In fact the A7r shutter seems to be suffering severe vibration issues and it's quite on the loud side (even without the mirror!) while the A7 seems better in that regard.
For now the A7/A7r are toys with no real advantage over the RX1, but if (and it's a big if, as that was one of the really sore points of the Nex line) Sony makes some truly great compact lenses for them, then the situation will change significantly.

P.S. It's actually good that the X100, X100s, RX1 and A7/r are "flawed gems". They come used for much cheaper than new even if they are new-ish cameras, as some people can't deal with the flaws and some others will enjoy the discount... Compare this with well-established DSLRs, I can't think of any reason for example to change my 5d-II, in fact even if it's a much older camera, and new went for around the same price, today you can find the RX1 selling for around the same price as the 5d!

13 May, 2013

I'll create a new trend...

Typography (Helvetica) on Pictures about Technical stuff. My next presentation will be all like this. Oh, shit, I should have added cats too.

In all seriousness though. This "poster" tells the truth, I didn't realize, until recently, how important this lesson is. And how important is, when you follow it, to pick the right thing to specialize upon (as you won't be able to change it much later on...).

I've seen it in the CouchDB guide, where the citation is attributed to Joe Stump. Premature generalization is the root of all evil...

Scaling is Specialization.

17 February, 2013

OT: The two compact cameras you need to know about

I know that many rendering experts also dab in photography, it's a natural attraction between the two. So, I wanted to write this (hopefully small) off-topic post on the only two compact cameras that, as of today, you should ever consider buying (well, if you're ok to spend $700, otherwise, you might want to stop reading now).

First, a definition. What I mean with "compact" has very rigorous definition: a camera is "compact" if it fits -well- inside my coat's pocket. This is important, because there are many popular "smaller" cameras that are not quite as small, and many other that strive to be even smaller than that.
The reason I think that definition is fundamental, is that I wanted to shop for a camera to -always- bring with me. Anything bigger, I don't carry, anything smaller is nice to have but not important for me (actually, too small cameras I find hard to use).

So again, I will be talking about cameras that you truly want to carry with you all the times, not some smaller "vacation" camera that still needs 2/3 lenses and a bag...

--- Update!
I sold the Fuji. Why? I'm not sure, I loved that camera. But, I sold it at the same money I bought it, and meanwhile the X100S came out (which would also mean my old one would start depreciating).

The X100S is a killer camera, they fixed almost everything... faster, better autofocus (not that I found the old one too bad anyways, but this is significantly better and AF quality on digital cameras makes ALL the difference), more resolution in the EVF, better manual focus (even if I doubt it's really smooth still) and even a better sensor (16 instead of 12 megapixels, and bit better at high-iso too).
Yes, it's still a bit quirky here and there, but really, the complaints now are truly minor, and anyhow NO digital camera out there has a perfect ergonomy in my opinion. Also, the X100 was already really fun with its hybrid viewfinder, the image quality is the best you'll even find in a compact camera (even the huge, expensive full-frame RX1 doesn't fare much better at ISO1600 and lower, and the Leica M9 has an edge at ISO200 but higher than that it plain sucks, compared) so... Must buy?

Not so fast... Turns out the X100S is such a great camera it doesn't sell cheap! The cheaper I've found so far an used (but in "new" condition) one is around 1200$, the older X100 goes for around half that price... Tough call... But there is more!

Sony didn't stand still and made a little thing called RX100-II... Simply unbelievable. Insane. There are no adjectives really. It's the same camera as before, but with even better high-iso capabilities (how much better? more than on stop!), which also brings better autofocus, a flash hotshoe (which also allows for other accessories like strapping on an optical viewfinder, many brands make these) and some crazy other things like built-in WiFi (cool for tethering via an iPad) and NFC (to configure said wifi more easily).

So. What to get? Here is my guide:

  1. Do you really need a smaller-as-possible camera? -> Go for the RX100-II
  2. Mostly night photography? -> Skip to the last step
  3. Do you hate a 35mm lens? (or really, really, really need a zoom) -> Go for the RX100-II
  4. Do you really need high flash sync speeds, flash during the day? -> Skip to the last step
  5. Would your photographic routine be much, much easier if you could tether to an iPad, or make in camera panoramas and HDR? -> Go for the RX100-II
  6. You can't afford more than 700$? -> Go for an used X100, else X100S

All other compacts are miles, miles behind, it's like they're from a completely different generation, the only reason for them to exist is because they're much cheaper.
Even most other smaller systems can't compare, I'd say among the interchangable lens, non-reflex cameras, only the Leica Monochrom, the Olympus OM-D E-M5 and the Sony Nex-7 could compare, quality-wise, to the X100S, and that's really something...
--- End Update

Nex, Micro4/3 and such...
The definition above pretty much excludes the entire Sony Nex system, all the micro-four-thirds and also the Canon M. Even less suitable are the Leica Ms or stuff like the Sony RX1.
These are all great cameras (well, the Canon M is not, from what I hear) but they are not compact enough (trust me, I have a micro-four-thirds system, it doesn't fit my definition of compact). I'd say these are "travel" cameras, based on the fact that I do bring them to my travels, where I might want to arrange a photoshoot but not bring all the studio equipment, but not every day.
If you're shopping for these, I'd probably go for a Panasonic or Olympus Micro-four-thirds. The OM-D E-M5 looks really amazing, supersharp sensor, great form factor... Even if it's not the APS-C sized sensor of the NEX, M43 are often as good IQ-wise, and quite smaller as you can't really make good, compact lenses for the APS-C (Sony has a pancake, the 16mm 2.8, but it's an horrible, horrible lens. The Panasonic G married with its 20mm or 14mm pancakes are a much more balanced fit).

Ok so, let's go on to the two contenders!

Sony RX100 - Best "mini" camera EVER.
If you want a really small camera, stop here. In its size category it's by FAR the best, there is no comparison at all, the gap between this one and for example a Panasonic LX or a Canon G is huge. It's a great, great camera.

Pros:
  • Best performance vs size by far.
  • Incredible, incredible image quality.
  • Great, rational controls. The front dial is almost useless, but I've found that mapping it to the ISO selection works really well. Everything else is really well placed/made.
  • Good optical image stabilization, even if the camera is not easy to hold, 1/15 and even lower, are possible, with a bit of luck.
Cons:
  • For me, it's even too small, the depth is ok, but its width and height measures are really compact and it's not easy to grip with both hands.
  • No viewfinder, which means you're always shooting with the arms extended. I don't mind per se looking through the rear LCD, but then again, it's a less stable grip.
  • Silly zoom lens. It's actually great, but it goes f1.8 only at 28mm (equivalent) which is understandable, but I would have preferred a 35 or 40mm fixed.
As you can see, there isn't much to say about this one. If you need/like the size, buy it. You don't have really any option there....

Sony RX100, cropped from out of camera JPEG. In daylight, it's incredibly sharp. At night, it's surprisingly good.

Fuji X100 - A great camera ruined by a BAD firmware.
There is lots of talk over the net about this camera. It's quite unique, with a big APS-C sensor in such a compact package, a 35mm f2 fixed lens, and a unique optical viewfinder with projected LCD indicators and the ability to switch to a fully electronic viewfinder with a lever.
No review on the internet will avoid talking about its many defects, I'll list the ones I've experienced too. But you should not worry. It's a fun camera, you will love shooting with it. It works well, it won't piss you off. And, it has a GREAT image quality. And that's all that really, really matters.

Pros:
  • Looks and feels great in hand. It's a proper camera, made for manual control (even if the third-stop overrides are silly... but still).
  • The hybrid viewfinder is awesome. The electronic one is weak, but you won't really need it, I use only to review the shots (you can set an auto-review period, it switches back and forth fast enough)
  • The APS-C sensor is the best you can buy in a camera that still fits in a coat's pocket well (that means, it's slightly inferior to the best Nex, but better than anything else).
  • The 35mm f.2 is great (albeit with its quirks), and does not extend or rotate during focus.
  • The flash is tasteful in its default setting.
Cons:
  • No optical image stabilization. I've hand-held it down to 1/15 easily though, due to the good grip and little vibrations.
  • The firmware looks and feels like it was made 10 years ago. Slow and ugly and stupid.
  • No flash exposure compensation button! Thanks lord by default the flash does a proper fill.
  • The lens has some quirks, a bit soft when focused near, flares are weird. The lens cover is not built-in.
  • No charge through USB. And the charger it's fairly bad too.
  • Bad exposure/dof preview, useless really.
  • Slow RAW mode. You'll need a fast SD card and some patience, not a camera to shoot action sports...
  • Not the fastest AF around. But trust me, it's fast enough and reliable enough even at dark. I've seen worse (i.e. very fast lenses on reflex cameras, my 85mm 1.2 on the 5Dmk2 is fucking annoying, the x100 won't really bother you unless you're shooting something that moves really fast). Also the manual focus mode is a joke.
  • Some design mistakes, i.e., the battery fits in the slot even if inserted wrong. The startup times can be incredibly long if you don't format the SD from the camera etc...
  • Silly expensive.
Really, the biggest issue with the X100 is its price. As a photographic tool, it works fine. But as a $1400 piece of equipment, its quirks are intolerable. Never, ever, never ever, buy this one new. Luckily, people know it's a camera way to expensive for its issues, and it goes used easily around $700, in great condition and with some accessories too. I bought mine that way, and I saw many similar offers. At that price, it's really, really compelling.

As for the one before, this from the X100, is an out of camera JPEG. And useless.

26 August, 2012

OT: My photoretouch routine

Another "offtopic" post. I'm writing this really as a reminder for my spouse, as she wants to learn Photoshop a bit better, but I think it could be useful as many renderers do seem to dabble with photography (and it's surely a good thing to do so).


Now, two disclaimers
  1. This photo was taken for fun after a fashion show, it wasn't a photoshoot nor anything that was intended to be published. I've chosen this one to serve as an example of retouching, it's not the best one I've ever done and more importantly, it's not the most pleasing shot of the model as well. Also, the retouching work is partial at best, much more time could have been spent with it, I stopped when I reached a point that illustrates well enough what I do, not a "final" point for the photo itself.
  2. I'm not a professional retoucher and I certainly didn't spend much time researching this, so I'm not as confident about my practice as I am when I talk about rendering. Most of this is purely out of experience and does not even derive from reading books and tutorials from experienced photographers, which is strange when I think about it, as I tend to be uncomfortable if I don't know "everything" before starting doing a given thing. I was very surprised to see that this routine I "evolved" is not too far of from what pro retoucher Pratik Naik sketches here, even if my results are not in the same league, the theory should not be too far off :)
Prerequisites
  1. Photoshop of course. Unfortunately you'll need CS, even if day to day you'll probably use 5% of CS capabilities, the ones that are really useful are not the same that you'll find in Elements, which is aimed at people who don't want to spend a lot of time with their photos. I also use Lightroom, now all the raw global adjustments that you can do in Lightroom are the same as the ones you get from the Camera Raw when you open a photo in Photoshop. The benefit of Lightroom is not in the adjustments, but in the workflow. With digital cameras, shooting hundreds of photos at each shoot, the basic adjustments and selection of good candidates is really time consuming. That's also why I have Photosmith on the iPad which can import Lightroom collections.
  2. I tend to work in layers and all the work is non-destructive (because of my computer science background I guess, I still have a way of thinking about technical things which do not really matter I guess), this creates quite big photoshop files (I also always use 16bpp ProPhotoRGB colour space) so you'll need a computer with lots of RAM, mine is a iMac 27' that I bought for "cheap" refurbished with 4gb of ram and then immediately upgraded to 16.
  3. A tablet is a must. It took me a while to get used to one, I started years ago (my first tablet connected over a serial cable... my first Photoshop was 2.5) and cheap tablets might dissuade you (i.e. I find too soft nibs to be really frustrating) but trust me, get a Wacom and live happily. You don't have to spend lots of money, I have an old Intuos 3 A5 and an even older Graphire 3 A5.
  4. A calibrated monitor. I don't use the shiny iMac monitor as shiny monitors are useless :| so I have next to it another 27', from the "high-end" Dell series. It's very decent and great quality for the money.
Tablet setup

 

The fundamental keys I always use are the modifiers (shift, control, command, alt) which access different options for any given tool. The right mouse button is mapped as the main button on the pen, that accesses the brush options while drawing and you'll change these every second. The other frequently accessed key is the 'x' button. This switches between background and foreground color when painting. While retouching we will always painting layer masks, so having these colors set to black and white and alternating between them with the x key makes this task very effective.

As I have two monitors and as you have to map only one to your tablet (be sure to avoid any stretching in the mapping setup), I reserve the second button to the "switch monitor" operation for the tablet. That's because I keep all the photoshop dialogs on the second monitor, so this button helps to avoid having to reach for the mouse every time I want to go on the second monitor (which I still do time to time).

Photoshop setup and learning prerequisites


As I have lots of space, especially on the iMac monitor which is higher resolution than my second "main" one I tend to have all the windows open. If you have less space, what you want to have always visible are the layers, the history and maybe the navigator, other than the main tool bar.

The things you absolutely need to know for this kind of retouch work are the following, you can use the Photoshop manual, experiement a bit or go on youtube and follow some basic tutorials for these but they are fundamental.
  1. Layers: layer masks and adjustment layers. Blending options are useful to know too.
  2. Adjustment curves at least. Levels are important too but out of lightroom I already export an image with the right levels and white balance. All the other image adjustments are also important but curves are the king.
  3. Selection tools: at least the rectangle and the polygon lasso. I don't need too precise selections because I copy and paste rough patches and then precisely mask them out using layer masks.
  4. Image and selection transforms (edit - free transform)
  5. How to copy and paste from a layer and how to copy and paste from all layers (copy merged)
  6. Drawing tools: the brush and its options (especially opacity and how it can be controlled with the numeric row of keys), clone tool (how to use, and the sample - current and below option), the healing brush (how it works and the sample all layers option, note that you don't get "current and below" option here, for some reason)
  7. Brush options (right mouse button)
  8. Zoom tool, navigator and shortcuts for image zoom and move.
  9. The liquify image filter.
I don't customize Photoshop much, which probably I should. I don't even use all the shortcuts I could, this is similar to what I do when programming, I don't focus too much on the speed of doing the actions, I will (probably) never learn VI. What does that mean is that you don't need to do much to replicate my setup :) 

The most important thing is how I set the tablet to work with the various tools, and what I do is extremely simple: I let the tablet pressure drive the paint opacity only. You do this by going in the brush window and selecting "transfer" and under "opacity jitter" select "control: pen pressure". You also might want to disable any other pen controls you might have in the brush (i.e. no "shape dynamics") and save this as a custom brush preset (the brush options are different for each tool so you might need to do this a few times or select the same preset for all the drawing tools you use).

The reason for this is simple, I want to always precisely control the size of the painting area, so I enter that using the brush options on the right mouse button (size and hardness), while for the intensity of the paint the tablet works great, together with the master opacity setting you can change via the keyboard numeric row (which sets the maximum opacity you will get at full pressure)

First step: General image composition

As a general rule, I will layer the various corrections from the most fundamental up to the most "artistic", this is so you build your work upon a reasonable base image. The corrections at the bottom of the stack, done first, are the ones that won't change regardless of the final image style, the ones at the top are the most "flexible" and due to changes.

This rule, I immediately break it with the very first layer, the background image. Now, if you're working for a client, you might not want to do this, but as I work for myself and I find reasonable to have all the general qualities roughly in place before retouching, as this will provide a better reference of what to retouch and what is most important.

That's why my base image out of Lightroom is already "close to final" interpretation, what I do is often adjust it to what I like in Lr and select the shot using "final" settings and crops, then back out a bit if they are too extreme (burn blacks or whites too much, or have weird coloring and so on) so I have a more flexible image in photoshop (one that still has all the detail and tones so I can push them locally later in Photoshop in a more controlled way). You could start with a very neutral image instead and decide your final art direction last, after all the skin work, and probably it is a good idea. I don't do that.

Similarly, I do first all the major liquify changes and if I'm compositing multiple images, replacing the face or the hair from one into another and so on, I do it here. You might want to liquify last if you're working for a client as they tend to change idea often, or just do a base liquify here and more extreme "artistic" changes later. Liquify is always a destructive operation so if you do it last, copy merged and paste the entire picture in another top level layer and liquify that copy, if you need to change you can delete said layer and do it again.

Second step: Major skin defects

After this step
Now here is where I "cheat" a bit by taking some shortcuts. Retouching skin can be done in a hundred of ways, and it goes from quick and plastic to lots of pain and incredibly natural results. I'm sure most professional retouchers do their skin work all by painting adjustment layers at the skin pore detail level.

This might or might not be practical if you have a more limited time there are more "automated" tools which save time but at the expense of quality. You might find many tutorials on the net on how to use things like "smart blur" or "frequency separation" via the highpass filter and stuff like that. I don't generally do these (even if you should know at least the latter) filter-based things but I still don't paint everything as well as it could.

So what I do as a first skin step is to create a layer or two which will see the use of three techniques:
  1. The healing brush.
  2. The cloning brush.
  3. Copy and paste pieces and then mask them out.
Step one is the easiest. Just try to keep the size as small as possible, locally removing defects without destroying the texture detail or creating weird textures.

The cloning brush comes into play when the healing brush is not able to do its job, and for bigger areas. This is tricky to use because you have to clone a source that has a similar overall skin tone and skin transitions, but doing so you're most surely cloning a source with a texture pattern that is different from the area you're working on, so I don't do this much at all on the skin.
In this photo it was used a bit on the hair for some spots where the skin was showing through and I use it a lot on the background and to remove stray hairs. That's because the cloning tool there will do a better job than a straight airbrush with no texture (there is still some texture in most backgrounds, even if plain color, and the difference will often show in print).

Instead of cloning, most often I prefer to use the third technique, the copy and paste, if I have to patch bigger skin regions. You get better control this way because you can rotate, align (free transform) and liquify (scale a bit even, not too much as that will mess with the texture) the skin patch to match where it needs, also you can apply other corrections on the layer (curves, local dodge and burn using the tools...) also to find the best match, then with the layer mask control were the skin is applied and how it fades. 
It can take a few such patches to cover a region with colors that make sense, in this picture you can see an example of this technique at work on the neck and again in the hair (the hair is probably the worst part of this particular retouch though) and to cover a nipple that was showing next to the arm. In this latter case I pasted some hair, and the mask for the arm was done quickly via the polygonal lasso whose edges where then smoothed using select/modify/smooth and a tiny bit of feather.

Third: Dodge and burn for skin!


This is where you will spend a chunk of your time and it's the actual skin detail fixing. The idea is that in order to remove skin wrinkles and other subtle defects, we can lighten the shadows caused by such wrinkles or darken the bad specular highlights that these surfaces create.

In order to do that, we set two adjustment layers, one that should lighten the image (dodge) and the other that darkens it (burn). They are both made with curves and a layer mask which is then immediately inverted (so the by "default" the layers will do nothing, then we'll paint when we need them).
There are various youtube videos which can help understanding this, i.e. this one or this. It might seem really hard to pull off and incredibly tedious, but it works really well and most importantly, it fills only as needed and following the natural skin detail, so in the end the skin does not look like "fake" but just "better" which is what we want.

This work takes time, patience, and a good eye. Skin defects appear at different scales, you have very fine wrinkles and you have discoloration and other marks.
I often change from a very zoomed in view and a 2/3 pixel hardness zero brush to a more zoomed out view to and a 5/7 pixels broader brush (you can even keep these two different scales organized in separate layers), and I even keep a "notes" layer sometimes where I can mark where I need to work still, when you zoom in it's easy to lose the "whole picture" perspective and spend much time in some areas that are not too bad, so zooming out, squinting or even temporary creating a copy of the image and blurring it helps.
Also, before starting such work I create an "exaggeration" layer, a curve that pushes the contrast of the skin (it depends on the picture) and converts to black and white, to make defects easier to see during this process.


So. Why curves? How exactly to do the two curves? Not everybody uses the same technique, I've seen people using a single 50% gray layer set to "overlay" blending to do both dodge and burn (I think that's harder), and the people who do use curves, how exactly do they make them?
Well, I use my eye. I would like to be more scientific and I did made some javascript things to help me, but I didn't find the perfect recipe yet. The idea to me is that you want the two curves to be "gentle" and never rise or fall too "fast", and you want to push them far enough to give you range for changes but not too much that they will start clipping the whites or blacks into a single, non textured shade.

Unfortunately, whatever nonlinear change you apply in the curves, it will change the hue and saturation of the areas you paint. This is a problem, and it's why you'd better care about colors after dodge and burning. 
Wait a minute! Can't we set the layer blending mode on the burn and dodge to "luminosity" only? Yes we can and you can, but it won't terribly help as the skin itself changes hue based on its luminosity so if you keep the original hue and you lighten an area, it won't be the "right" light-hue-skin tone it should have been. Are there ways around this? I think so, but I have to experiment more. In practice it often does not matter too much as the changes you're making here are not huge.

This coloring problem is also why it's wise not to export out of lightroom a photo with split toning and other wild coloring, as these will be incorrect while dodging and hard to fix.

Fourth: Color corrections

Honestly I'm not great at this. I use a few different things but this is probably the weakest part of my entire process. Still, corrective layers. A saturation one (hue/saturation) for areas where you dodged too much and lost some color. Then for large areas of wrongness (i.e. a patch that is too red and so on) I do rough selections with the polygonal lasso, then feather the selection out and use ad hoc corrections.

Recently I started using a gradient map set to hue blending with colors sampled from the skin to apply a quick fix over some areas which go wrong. The idea is that you could create a layer or set of layers which from the black and white (luminosity) they reconstruct the right colors (colorization). A first step for this is to use a gradient map which associates colors with different luminosities. This alone creates a very uniform and weird skin but used with a mask only here and there, it's decent.
I even wrote a script that samples all the colors from a selection of the skin and creates some "buckets" of color based on the various luminosities. If you're curios this is a description of the technique, I'm not great at it so I won't write more.

Fifth: Wilder adjustments


After your skin is good enough you can start having fun and caring about shine, volume, altering the makeup and so on. In this picture I did very little, there are two extra dodge and burn curve layers, and I used them a tiny bit in the hair, eyes, eyebrows and shoulders. I also used a hue/saturation adjustment to bump a little the makeup around the eyes.

Forums like RetouchPro and ModelMayhem often have some interesting inspiration.

The crazy coloring is done with two layers set to screen, filled with a gradient (linear one for the blue, and a round one for the red, then with some wide brushing and wide gaussian blur). Then the gray ramp was moved to something more interesting using separate r/g/b curves in the curve adjustment and some hue and saturation.


I have an action I recorded for printing/exporting, so if I have to share this I flatten layers, apply a curve that moves blacks to around 5 and whites to around 250, then do a detail unsharp mask a tiny bit of a wider unsharp mask, convert everything to sRGB and 8bits.