Announcement – Gridlet V0.1

I’ve been using grids in my CSS designs for quite a while now, inspired by frameworks like Blueprint CSS.  Although I don’t use Blueprint for production work (using a CSS framework starts to get a bit restrictive, and I prefer to build from scratch, rather than trying to override someone else’s default), I do use the methodology in my own CSS to create structured, grid-based layouts, and consistent typography.

One of the clever things that Blueprint introduced was the idea of displaying the grid while you’re working – this proves to be an invaluable aid as you try to refine CSS rules.  But I’ve found that – as good as the theory is – it has a few drawbacks:

  1. Because it uses a background-image CSS property, it overrides any beautiful background design you might have implemented.
  2. Because it uses images, if you change your grid size, you have to generate a new custom image – a bit of a faff.
  3. You have to tweak your CSS every time you want to turn the grid on or off.

Since I work with grids more and more often, I decided to have a stab at coming up with a solution which refines the Blueprint idea, adds a dash of jQuery to produce something which is a little more flexible and user-friendly.

What I’ve come up with is a jQuery plugin called Gridlet.  Instead of using pure CSS, the plugin generates a grid on-the-fly, and it’s an improvement in the following ways:

  1. It doesn’t use images – instead it dynamically generates a grid on top of your page, so your design remains intact.
  2. Changing your grid size is as simple as changing a setting – no need to generate images.
  3. You, er, have to tweak your JS to turn it on or off (this is something I’m going to work on improving – it’s early days).

It’s also worth noting that this first version only produces horizontal grids – that’s all I need at the moment  No doubt I’lla dd vertical grid spacing as and when it’s needed.  Any comments or suggestions are appreciated.

You can download version 0.1 of Gridlet here.  I’ve only tested in Safari 3 and Firefox 3 so far.

Implementing it is really easy – you just do something like this:

$(document).ready(function() {
  $("body").gridlet();
});

If you want to override the default grid height or colour, just pass in the settings like this:

$(document).ready(function() {
  $("body").gridlet({
    height: 18,
    background: "#fcc"
  });
});

And finally, for your curiosity, here’s the source code:

(function($) {
  jQuery.fn.gridlet = function(options) {

    var opts = $.extend({}, $.fn.gridlet.defaults, options);
    var line_position = 0;
    $("<div/>").attr("id", "grid_container").appendTo("body").css({
      position: "absolute",
      top: 0,
      left: 0,
      height: "100px",
      width: "100%",
    })

    while(line_position < $("body").height())
    {
      line_position += opts.height;
      $("<div/>").css({
        position: "absolute",
        top: line_position,
        left: 0,
        height: 1,
        width: "100%",
        background: opts.background
      }).appendTo("div#grid_container")
    }

    return this;

  };

  jQuery.fn.gridlet.defaults = {
    height: 24,
    width: 24,
    background: "#ddf"
  };

})(jQuery);

Fontcase

Isn’t it weird how sometimes you’re thinking about how you’re missing something in your work life – I’m talking specifically about a tool, a piece of software, maybe even a workflow? You’re sat there thinking about how much easier life would be, trying to imagine how you would go about filling the void to make life easier? And then, moments later, the exact thing you’ve been dreaming of appears before your eyes?

That happened this morning when I was thinking about organising fonts (I know – my lifestyle is sooo rock and roll).  I use fonts a lot – more so in recent years as I’ve develop a deeper appreciation of good typographical design.  So I’m always toying with new fonts, and working with lots of variations for different projects.

The built-in OS X Font Book is a very lame beast which doesn’t really do much for me – not enough intuitive font management in there.  At the other end of the scale Suitcase never really got me hooked because it just felt too over-powering and feature-driven – font management should be really simple, particularly since these programs are fiddling with system-level stuff (I remember a case a few years ago where a colleague accidentally deactivated one of his system fonts using Suitcase, which rendered his notebook useless since OS X wouldn’t boot – luckily that can’t happen in more recent versions of the OS).

For the past six months or so, I’ve been using FontExplorer X.  Although it’s not perfect, it has proven to be the best fit for me, with a good balance between simplicity and functionality.  But it’s still painful to use when you want to browse and select a set of fonts to experiment with for a particular project – the endless list of font families doesn’t tell me anything about the visual appearance of the fonts themselves – I have to sift through and endlessly click around to find something suitable.

What I want is an application which does three things.  Firstly, it should allow me to easily install and uninstall fonts – that’s a given.  Secondly, activation and deactivation should be a cinch – something FontExplorer does very well.  And thirdly, I want to be able to browse my fonts the way I want – I want to see the fonts themselves, not just a dry and meaningless list of font names.  Is that too much to ask?

Well, apparently not, because sitting in my RSS feed this morning came news of Fontcase, which is currently in beta.  And it looks like just the application I was imagining!  The UI design looks gorgeous – simple but functional – and the visual representation of each font is an absolute godsend.

I can’t wait to see the final, finished product.  And if it lives up to my (very demanding) expectations, then I’ll be eagerly adding this to my arsenal of design tools.

As a sidenote, the homepage for this app is a brilliant example of clean and intelligent design.  There’s no need for superfluous words to sell it – a picture of the interface tells you all you need to know.

Cadence

Rands has written a really interesting post all about cadence, and more specifically how the tone of language used on the Web has a direct impact on our trust.

What does a lie sound like? How do we decide to trust? There’s a reason why you can figure out in an instant whether a mail is spam or not. It’s not a single, measurable thing, but a whole set of small, invisible variables with which you can instantly make a judgment — I do not trust this mail.

You have a complex set of analytical mental muscles that help you make critical snap emotional judgments. Whether it’s a mail, a website, or a person, your brain can instantly look at 12 imperceptible aspects of a thing to determine how you should feel.

Truth, love, or lies, human has a signature cadence.

I always place a lot of emphasis on spending time developing the language of a website – the words used aren’t incidental: the language and tone should be an integral part of the design.

A rare foray into film theory, semiotics, exposition and why I wish I could love Clint Eastwood

Semiotics.  I’d forgotten all about it.  I remember it being part of my studies when I was at university, and no doubt I’ve been applying the theory throughout my work over the years, but I hadn’t ever given it a passing thought until recently.  The subject had stayed dormant in my mind until it came up during a gathering of friends on Halloween.  We’d had a trio of classic thriller movies playing silently in the background – Scream, American Werewolf in London and The Cat & The Canary – the kind of films which lend themselves well to the discussion of semiotics, since they’re loaded with clichés and visual signs.

semiotics
plural noun [treated as sing. ]
the study of signs and symbols and their use or interpretation.

Then, a few weeks ago, it sprang to mind again, while I was watching an episode of Screenwipe.  Charlie Brooker took a serious angle for a change, and the entire episode consisted of sit-down interviews with a range of TV writers, including Russell T Davies and Graham Linehan, who is responsible for writing two of my all-time favourite comedies: Father Ted and Black Books.

(Some kind soul has diligently put that entire 50 minute episode onto YouTube for your viewing pleasure.)

Late on in the episode, Davies went on a rant about the perils of writing bad dialogue, and overloading it with too much exposition – trying to explain everything through the words of the characters.  It took me aback for a moment or two, because I suddenly realised that’s how I’ve been writing for years!  It made me cringe to think of some of the scripts I’ve written in the past, which I’ve stuffed full of bland exposition and lame dialogue.  Some of the early drafts of Gan Yam were full of crap lines like “Alright, sis” and “I’m off to see my folks”.  Ugh – it makes me want to curl up under my desk just writing them now.  The final draft wasn’t a whole heap better.  Even the opening gambit between the two lead characters include this horror: “blimey, we haven’t seen you in ages”.  What was I thinking!?

There are other bits of that script which I’m proud of though, and they are generally the bits where there is no dialogue at all, and the story is told with pictures.  There are a couple of sequences which are jam-packed with all sorts of speedy story-telling, character connections and hints of back-story.  A picture can indeed paint a thousand words, and that’s where semiotics comes in.  By using recognisable signs and visual indicators, infintely more can be conveyed within the frame of a picture than by trying to explain through words alone.  Sure: emotion can be conveyed through the skilled dialogue of a writer, and the expression of that dialogue by a skilled actor.  But you can create many more nuances of emotion by keeping schtum and instead stimulating the audience to create their own, more personal, subtle and intense emotions.

That’s where my writing generally fails: when I try to load too much into the dialogue, hammering the plot home with a sledgehammer, rather than taking a more subtle, intelligent approach, leaving clues which enable an audience to put the pieces together themselves.

But, you can go too far the other way.  And that’s where Clint Eastwood comes in.

I want to like Clint Eastwood.  I’m not a huge fan of his acting roles – I’m sure he’s one of the all-time greats of cinema, but it’s just not really my cup of tea.  But I do want to be able to enjoy his directorial work.  I’ve heard and read great things about his directing skills, and the subject matter he approaches in his films should appeal to me – what with it being heavily focused on character stories.  But it doesn’t appeal.  And I couldn’t figure out why for years.  The last film of hisI’d watched was Mystic River in 2003, which won 2 Oscars, was nominated for 6 and received all sorts of plaudits.  But I just couldn’t get into it.  I don’t think it helped that it starred Tim Robbins, who (in my opinion) adds as much depth to his characters as magnolia-coloured wallpaper.

So, last night I tried again.  I sat down with good intentions to try to make my peace with Mr Eastwood, determined to enjoy his work.  The chosen film was A Perfect World.  OK, not one of his better films, but I thought perhaps it might be good to watch something middle-of-the-road, so that my expectations weren’t raised too high.

And it was kind of OK.  But, just like Mystic River, I couldn’t get into it.  It didn’t grab my concentration, and threw up very few surprises.  And that’s when it hit me.  Semiotics: Eastwood just uses them way too much.  He’s painting so much with the pictures he puts on the screen, that you you can’t fail to miss the direction of the plot and the story arcs of the characters.  It’s all there, with no subtlety and no restraint, and it ruins any notion of suspense or intrigue.  It’s not helped by the myriad of clichés and stereotypes which make up the cast of characters: the redneck cop who’s a good guy deep down, the ambitious, intelligent woman who battles against the oppression of her male peers, the slimeball Federal agent, the crackpot felon who moves and talks like a lizard and shows no remorse.  Within 10 minutes of viewing, you know all you’re going to know about all of these characters, and there’s not a lot to keep your interest in them.

Maybe I’m being a bit harsh – maybe these characters were never intended to have too much depth.  Maybe their exposition was off-loaded early on so that more attention could be given to the relationship between the two central characters, and their story.  But, oh – those poor old semiotics reared their head again.  It was most obvious (and ruinous) when the character Mack appears – a friendly, black farmer who pops up out of nowhere in the middle of the night and offers shelter and food in times of trouble.  Like a Siren out of the night, I just knew it would turn bad, so I waited for 10 minutes or so, and a couple of withering looks later, sure enough: it did.

So what am I trying to say.  Well, first that I now know why Clint isn’t the director for me.  His storytelling doesn’t leave me with anything to work with; nothing to get my brain cells firing and engaging me with his characters or story.  I’m sure he’s a good director, but he doesn’t scratch my itch.

Secondly: this has made me realise the importance of semiotics: how it can work more effectively than the spoken word, but also – and perhaps more importantly – needs to be used intelligently and subtley if you’re going to avoid hammering your audience over the head with too much information.  In that case, you might as well forget the pictures and just write shitty dialogue.

So this is something I’m going to keep on my radar and read a little more about – not just with regard to moving image, but in a wider context.

SmoothCam

I’ve had the chance to play with a new filter in FCP called SmoothCam. It’s great, and creates delicious results.

It’s basically a camera stabilisation filter which has been ported from Shake. It processes your footage to create a vector map of all of the objects and movements, then using that data to manipulate the original footage to create smooth camera motion.

The processing of your footage can take some time, but it’s a one-off task, and once it’s done, you can make changes to the filter settings without the need to re-process. You can make adjustments to the amount of each transformation the filter applies. One of the other things it does is to automatically zoom the image to mask any black areas which appear, due to the compensation of the transformations – and you can also set the level at which this is applied.

I’ve been working with some footage which was shot in a hurry, with a Z7 mounted on a tripod strapped around my neck and braced with both arms. A lot of it was fast-paced and there were a few bumps, which is why I wanted to run SmoothCam through its paces, to see whether I could get an authentic syeadycam look with my shoddy, rushed footage. I shot in HDV, but the end result is going onto a SD DVD, so I had plenty of flexibility in how much I could zoom the image, which in turn, allowed me to ratchet up the SmoothCam settings quite high.

And it looks fantastic! It’s not perfect, but it goes a long way to tidying up the material. And with filmic grading, and 1.35 letterboxing, it looks quite authentic.

It’s certainly not a cure-all, and is best suited to tracking shots, or slow pans. It can have trouble with irregular movement, or fast pans, at which point you have to chop your footage and carefully splice filtered and unfiltered clips together – it can be time-consuming, but then you can’t have everything for free.

I just wish I could show off the final footage, but sadly it’s a private commission which can’t be broadcast publicly.

Stick “SmoothCam” into Google though, and you’ll get a heap of articles on the subject – some with examples of test footage.

Compressor Droplets for Vimeo

Since I recently posted on a great method for encoding for Vimeo using Compressor resets, I’m currently adopting that workflow for all of the work I’ve been doing this past month or so. It may well be that I’m losing a certain amount of quality by using this technique, but I’m happy that it’s good enough for online distribution.

What I’ve done, is created a set of Compressor Droplets, which live on my desktop and allow me to just drag-and-drop files for encoding. The one-click dialog box which appears feels a lot cleaner and more efficient than having to launch compressor and fiddle with settings and sources etc.

I’m providing the droplet files I’ve created here for download. They’re provided as-is, and with absolutely no warranty – they work for me, and they should work for you. There are three droplets: standard definition, anamorphic standard definition and high definition.

Vimeo SD Droplet

Vimeo SD Anamorphic Droplet

Vimeo HD Droplet

All you need to do to use them, is drag-and-drop the file you want to encode onto a droplet, and a simple dialog will appear asking for confirmation. Hit “Submit”, and Batch Monitor will launch and process the job. The output files are set to be created in the same directory as your source file.

Encoding HD video for Vimeo using Compressor

I stumbled across this great video tutorial which explains how to easily set up a preset for compressing HD video for Vimeo. It’s clear, concise, and straight to the point.

Until now, I’ve been using VisualHub presets to encode video for online distribution, but this looks like it could be an alternative solution (particularly since the developer of VisualHub has pulled the plug on the software).

De-interlacing for fun and profit (or: how to create a film-look with video)

Oops.

After I finished writing my last post on interlacing, I realised that I missed out one important aspect of the whole de-interlacing discussion, and more specifically, another very good reason why you would want to use de-interlacing: creating a film-look for your video.

When you watch most soap opera or current affairs programmes on TV, you’ll notice that they have a much sharper and crisper look than the picture of a drama or film you watch on the same TV. It has a distinctly “video” look to it, which creates a very immediate and “real” image.

Part of that is down to the way images are captured on most video cameras, and the way in which the signal is processed. There are video formats which create a softer, richer image, such as digi-beta. But for those of us who work with cheaper, less-cumbersome formats (such as DV, HDV, XDCAM etc) there remains the issue of how to change that “video” look to one which looks more like film.

Well, there are three basic things I do which create that magical film-look.

The first is to desaturate the image a little – using a more less vivid colour palette instantly gives your image more subtlety. The hyper-reality of video is dampened.

The second thing to do, is to recoup some of the richness you lost when desaturating, but increasing the contrast of the image. This will tend to “bleach” the image, and you’ll lose some detail, but the detail which remains will be sharper and add more depth.

And then the third, and final thing: de-interlacing. There’s a very good reason for this, and even if you don’t want to apply desaturation and increased contrast, if you don’t apply a de-interlace, you just aren’t going to get anywhere near a film-look. Here’s the reason why:

Film consists of 24 unique frames per second. Even if those frames are being displayed several times in a row (for instance, due to a faster shutter speed when projecting at say 50fps) the fact remains that there are only ever 24 unique images being shown every second.

TV has a similar “shutter speed”, showing 50 frames per second. But those frames are split into two sets of fields (see my previous post for a fuller explanation of this), and a video signal records one field every 1/50th of a second. So, rather than there being 25 full frames being displayed every 1/25th of a second, there are 50 half-resolution frames being displayed every 1/50th of a second. When your eye sees this and feed the signal to your brain, everything gets merged to fill in the gaps between the missing fields, and that’s what creates that super-crisp, video look.

So to get rid of that video look, and to simulate more closely the mechanism of film, you de-interlace the video image, combining each set of fields, which creates 25 full frames, instead of the 50 “half” frames. Even if the video ends up being interlaced again (for DVD for example), then it will still retain the filmic look, because the interlacing will still only be showing one full frame every 1/25th of a second.

The Great Swim

Last weekend, my Mum took part in the first Great North Swim in Windermere. It was the first mass participation swim event of its kind in Great Britain, and it was the first time she’d trained for any kind of swimming event.

A group of us went along to support her, and we filmed a few bits throughout the day – nothing serious, but then I edited the footage together to make this little diary of our outing.

This gave me a chance to try out the 25p mode properly on our Sony Z7 for the first time. When it came to editing, I didn’t really notice much of a difference to just de-interlacing the final render, and since I was applying a Nattress filter to the finished edit, it actually meant i had to tweak a few more settings to make sure I wasn’t re-de-interlacing! I think what I need to do is do a test of two different workflows, side-by-side: one using 24p mode, the other with 50i and a de-interlace applied.

This wasn’t a very serious shoot, so it’s not brilliant footage, and with it being a changeable overcast day, the lighting don’t help much. One thing I am learning more and more about the Z7 though is that it is so easy to over-expose – the LCD screen can be very misleading and you almost have to force yourself to drop an f-stop just to make sure you’re not washing out.

I also played around with a vignette for the first time, just to add a little more of a home movie feel.

Interlacing

Having done a fair amount of video editing which involves working with, or converting to different resolutions, I’ve stumbled across a lot of problems in the past which are caused by interlacing.

In a recent post, I wrote about my workflow for down-converting from HDV to SD, which included a step for de-interlacing footage to avoid artefacts appearing when publishing to DVD. Although that post explained the “whats” to get around problems, it didn’t really go into the “whys”. And since interlacing seems to be an area which causes a lot of people to stumble when it comes to editing and rendering video (particularly in this world of multi-formats) I thought it worthwhile to look at the subject in a little more detail.

People tend to sit either side of the fence when it comes to their views on interlacing: some view it as a bucket of putrid evil which should be banished into the bowels of purgatory; others view it as a clever tool which is misunderstood. My view? I consider it an outdated idea, which we’re sadly stuck with for the time-being, and life is a lot easier if you learn to live with it, rather than fight against it.

So what is interlacing? And why does it exist? Let me try to explain in simple terms.

(Please note: the numbers I’m using here are probably not accurate, and are muddled by the fact that PAL and NTSC frame rates vary. I’m using PAL as my benchmark, and if I had more time to research I’d hunt out more accurate numbers.)

Moving pictures are made up of a series of static pictures, displayed in quick succession, creating the illusion of a moving image. People generally cite 24 frames per second as the “magic” number, at which our eyes and our brains are tricked into believing that what we see on the screen is “real” – i.e. the point at which we no longer think “this is a series of pictures”. Traditional film runs at this magical rate of 24 frames, and that number (or thereabouts) has remained as a benchmark ever since.

But there’s a problem with viewing film at 24 frames per second (fps): you get a noticeable flicker between each frame. So, to mask that, cinemas run film with a faster shutter speed, creating the illusion of about 50 frames per second – because the shutter effectively creates a faster flicker which makes it less noticeable. But now it’s starting to get confusing, so I won’t go into that too much – all you need to know is that moving images work best at 24fps, but to avoid any kind of flickering, you ideally need to be viewing at around 50fps.

Then, along came television. The boffins who were behind the technology noted that TV pictures would suffer from the same flicker as film, so they needed to crank up their technology to run at 50fps. But there was a problem: there wasn’t enough bandwidth to send 50 frames of pictures every second – 25 was about all they could squeeze into the analogue signal.

So here was the problem: there needed to be 25 frames of images displayed every second, but to avoid flicker, those 25 images somehow needed to be sent down the signal 50 times a second, but using half the bandwidth. And that’s where the idea of interlacing came from.

Video images are split into individual lines – around 576 lines for standard PAL video. You need to see all 576 of those lines every 1/25th of a second for the moving image to display correctly. It doesn’t particularly matter when those lines reach your eye within that 1/25th of a second – your brain won’t work that fast – as long as they are not all arriving at once.

So interlacing is essentially this: send half the lines during one 1/50th of a second, and the remaining liens during the next 1/50th of a second. Result: the picture is being viewed as 25fps (the optimal viewing rate), being sent through a signal at 50fps (eliminating flicker), using half the bandwidth.

These “sets” of lines are commonly referred to as “fields”, and you’ll find them called “Upper/Lower” fields or “Odd/Even” fields.

So what implications does this have on our modern-day digital world of HD and internet video? Well, we still use PAL and NTSC video standards, and they are standards which use interlacing. Modern HD video even uses it to get around the same initial problem as those early TV pioneers: to squeeze more data into a smaller bandwidth. So, for the foreseeable future at least, we’re kind of stuck with it. Which is why I advocate learning to live with it, to save a world of pain for yourself.

And where does that pain come from? Why is interlacing such a swine to handle when it comes to editing? The most common problem people experience are interlace artefacts – you’ll edit some beautiful footage, which seems fine when you edit, and when you view it on a TV, the picture will strobe and display all sorts of weird lines. That kind of thing can really cause serious headaches and frustration beyond the limits of humankind – I’ve learned the hard way, through trial and error, with late nights trying to prepare masters, sat in front of a rendering process praying to whatever silicone god might be listening.

Most problems though, are down to one very simple thing: field order. Remember those fields: odd/even, upper/lower? Well, get those mixed up at any stage, and that’s when artefacts appear. Field order dictates which field is displayed first: line 1 or line 2 (odd or even) If you’ve edited video which has it’s field order set to “odd”, and then you render out to a video file which has it’s field order set to “even”, that’s when everything goes wrong.

If there was one simple bit of advice I’d give to people to deal with interlacing problems it’s this: Keep track of field order. Simple as that. Here are things to watch out for:

* Make sure you’re editing timeline has the same field order as the footage your editing.
* Make sure you’re final rendered file uses the same field order as your editing timeline.
* If you’re converting files for building a DVD, be especially careful that your field order is the same (DVD Studio Pro is a flagrant culprit when it comes to setting default field order differently to the rest of Final Cut Studio)
* If you’ve got mixed formats in your editing timeline, be really, really careful to make sure that field orders are consistent, and where appropriate de-interlacing is applied, and applied correctly (that’s a whole other topic though).

Another area where field order is important is when you’re converting from one resolution to another. I edit, as standard, using HDV footage, but regularly have to down-convert to standard defintion (PAL) for DVD authoring. Interlaced HDV and DV footage – although they use exactly the same interlacing technique – have a different number of lines, and generally tend to have different field orders. To make life easier, it is always safest to make sure your HD resolution footage gets de-interlaced before it’s converted.

I’ve mentioned de-inerlacing a few times, but what does de-interlacing actually do, and when should you use it?

De-interlacing is very simply taking the two fields of lines (two separate frames) and combining them into one single frame. There are different techniques and algorithms which can be used for achieving that, and the best is generally interpolation, where an average of the two fields is calculated to give you the best estimate of how the single frame should look. If you’re down-converting to a lower resolution though, you can usually get away with just using field duplication – this technique just trashes one of the sets of fields, and doubles up the other, which you don’t notice once you’ve scaled down. Interpolation is best for retaining detail, duplication is quicker.

It’s also worth noting that if you’re producing video for distribution on the internet, it’s a good idea to de-interlace. Computer video (and most modern LCD and Plasma screens) display a “progressive” image. Whereas traditional television display a picture by “scanning” each set of lines every 1/25th of a second, a progressive display only changes those parts of the image which need to change. Because of this progression, there are absolutely no benefits to interlacing.

I hope that demystifies some of the black magic of interlacing, and helps to soften the pain should you run into problems with it. I welcome any other tips or advice which I might have missed.