April 10th, 2014

Avatars, avatars everywhere

With a bit more emphasis on content recommended by your friends, we wanted to make people avatars in Play Store more visually pleasing. In our previous release the avatars were round with a thin translucent grey outline, and in our latest release the visuals are a bit more polished. There’s a white ring surrounding the avatar, and an offset drop shadow, with both of these scaling to match the overall size of the avatar. Let’s talk more about the specifics.

The avatars themselves are fetched from the network, which gives us a square – and sometimes rectangular – source image. Our first step is to create a normalized square image based on the target dimensions on the screen. That normalized image preserves the source aspect ratio, upscaling the source if necessary to fill at least one dimension edge-to-edge and filling the second dimension with white pixels (taking care of non-square sources). This is done with Canvas.drawBitmap that takes a source and destination rectangles as the parameters.

The next step is to compute the pixel size of the ring outline and the drop shadow. The ring outline starts at 1dip and is capped at 4dips, while the drop shadow starts at 2dips and is capped at 3dips. The actual size is determined based on the avatar size, setting the cap at 96x96dips (based on our current design metrics). This results in visuals that scale with the avatar size (seen below), while still capping the ring and drop shadow to not be too big for larger avatars.

Now it’s time to take a look at the avatar layers. We have the avatar itself cropped to a circular shape, the ring outline and the drop shadow. In our first implementation pass we used Paint.setShadowLayer to combine the last two together into a single Canvas operation. We first painted the white ring, and then the avatar itself (since the drop shadow extends to both sides of the path, and we didn’t want the shadow to be visible on top of the “inner” image). However, the runtime performance of shadow layer was not very satisfactory. It took about 2.5ms to draw a single outline, and when we had a few avatars on the screen, the numbers started adding up.

Instead, we’re doing three separate layers.

First, we draw the drop shadow as Canvas.drawOval with a single translucent grey color. We use Paint.setStrokeWidth to set the interpolated drop shadow size, and Paint.setColor to set the interpolated drop shadow color (for larger shadows we use more translucency to keep the same overall shadow “weight” across different avatar sizes).

Second, we draw the avatar itself. We create a BitmapShader with the normalized square avatar source and TileMode.CLAMP and set it with Paint.setShader. Using that Paint object on a Canvas.drawRoundRect call results in the circular crop of the source image. There’s some extra bookkeeping to make sure that we’re scaling down the normalized source to make the white ring outline external to the image, not losing the few top/bottom/left/right pixels. This can be done with a combination Canvas.scale and Canvas.translate operations to keep the scaled-down avatar centered on canvas.

Third, we draw the ring outline as Canvas.drawOval with opaque white color. We use Paint.setStrokeWidth to set the interpolated ring outline size.

There’s a bunch of small objects used for the custom drawing operations, usually involving a mix of Paint and Rect ones. It’s recommended to create them once at the class level, initializing as much of the state as you can in your constructor. Then, during the actual transformation / draw operations that can happen multiple times during the layout / render passes, only set those fields that are dynamic (size / color). This way you won’t be creating transient objects which are discarded after they’re used – saving yourself from unexpected GC pauses in the middle of your rendering. Also try to use Canvas operations (transforms, scaling) instead of creating intermediate Bitmap objects. And measure every step to make sure that you’re not using operations that are too expensive.

April 4th, 2014

The craft of screen graphics and movie user interfaces – interview with Jorge Almeida

Continuing the series of interviews with designers and artists that bring user interfaces and graphics to the big screens, today’s I’m honored to welcome Jorge Almeida. You have seen Jorge’s work on the seminal “Minority Report”, “Iron Man 2″, “Eagle Eye”, “The Dark Knight Rises”, “Mission Impossible: Ghost Protocol” and “Star Trek Into Darkness”. His latest production, “Tomorrowland”, is scheduled for release in May 2015. In this interview he talks about the evolution of digital tools in the last decade, designing interfaces that fit the story, striking the balance between visuals that compel the viewer and yet do not attract attention to themselves, the relentless pace of working on motion pictures, the lasting impact that “Minority Report” has had on the tech industry, his thoughts on screens in future offices and homes, and his recent transition away from the world of film UI.


Eye scan interface from “Minority Report“. Courtesy of Jorge Almeida.

Kirill: Please tell us about yourself and your path so far.

Jorge: My name is Jorge Almeida, and I’ve worked as a user interfaces designer for the film industry for over 10 years. I’ve designed and/or animated UI for a number of feature films including “Minority Report,” “Iron Man 2,” and “Star Trek Into Darkness.” I recently finished work on the upcoming “Tomorrowland” and have since taken a UI Design position with Microsoft.

I originally started in Florida working in print. I spent years doing page layout and design for advertising, newspapers, and catalogues. I was also a computer colorist for a comic book company and wrote and illustrated my own comic book “Captain Cosmo and Phil, the bionic dwarf.” I later moved to Los Angeles and took a job with Black Box Digital, a small design and VFX house that used to operate in Santa Monica. Black Box worked on a variety of projects, but their bread and butter was film UI. They worked on films like “Armageddon” and “Enemy of the State.” They originally hired me to work on an online comic book project, but over time I started taking on more of the UI work. I loved movies, so I was happy to be involved in the industry.

I ended up spending 5 years with Black Box. I’ve since done UI work on other films including “Eagle Eye” (at Pacific Title), and “Iron Man 2″ (at Prologue), before taking a lead designer position at OOOii. There, I served as lead UI designer and animator on “Mission Impossible: Ghost Protocol,” “The Dark Knight Rises,” and “Star Trek Into Darkness.” I’ve also gotten a few illustration jobs, one of which was doing the drawings for the end title sequence of “Sherlock Holmes.”


Kremlin hallway scan from “Mission Impossible: Ghost Protocol“. Courtesy of Jorge Almeida.

Kirill: As you transitioned from print design to doing movie interfaces, did it help that both operate on a single fixed canvas where you don’t need to worry how elements reflow and adapt to different screen sizes?

Jorge: I’d never really thought about that, but yes. You’re also pretty spoiled because it’s make-believe. We aren’t as restricted by specific style and font size requirements because our ultimate goal is to help tell the story. Unless required, I try not to get too caught up in minute details of accuracy and functionality. My goal is to make an interface that feels right. If the viewer understands what the UI is trying to communicate, without being distracted by the design, then I did my job.

To me, film UI is more about illustration. There’s a lot of design involved and a lot of thinking about how the UI works, but ultimately it’s about illustrating a story point and trying to do it in a way that the audience finds interesting. Also, I find that many of my design ideas are born out of an abstract concept that I am trying to illustrate.

For instance, one of our tasks with “Minority Report” was to digitally represent the raw stream of data that was pouring directly from the precogs’ minds. I focused on trying to make the date stream appear almost organic and alive. The data itself was essentially frame sequences and snapshots from the various precog visions, often repeated and overlapping, that are spread out horizontally along a timeline. However, with enough of these elements treated a certain way, the data did start to give the impression of something slightly fluid- especially when animated. This seemed especially fitting considering that the data was representing a murder. Numbers and bar graphs and digital readouts seemed too impersonal for such an event. For this reason, when designing the giant Precog screen, I thought of it as a sort of futuristic autopsy table.

Another example would be “Eagle Eye,” there are a few shots where I was trying to make the UI feel sort of like Frankenstein’s monster- with elements looking like they were ripped from other interfaces and cobbled together. For “Mission Impossible: Ghost Protocol” I was trying to give the UI an element of intimacy, like a doctor looking at X-rays. For the starship Vengeance in “Star Trek Into Darkness” I was trying to make it feel like the inside of a submarine. I’m often going for a feel, a sort of visual metaphor that fits the spirit of the movie. I didn’t get to think that way when I was working in print. Not that all print is like that, just that the type of work I was doing was more structured. I use my page layout experience more when I work on real-world films.


Body scan user interface, “Mr and Mrs Smith”. Courtesy of Jorge Almeida.

Read the rest of this entry »

April 2nd, 2014

Cinematography of “The Truth About Emanuel” – interview with Polly Morgan

Continuing the ongoing series of interviews with creative artists working on various aspects of movie and TV productions, today I’m honored to welcome the cinematographer Polly Morgan. In this interview Polly talks about the evolving craft of cinematography as the technology is shifting the productions towards the purely digital end of the spectrum, the intimate collaboration process between the director and the cinematographer, the upsides of working on smaller independent productions, what happens on a movie during pre-production, shooting and post-production phases, her work on the recently released “The Truth About Emanuel“, and the future of film as a medium.


On the set of “The Truth About Emanuel” with the director Francesca Gregorini. Courtesy of Polly Morgan.

Kirill: Tell us about yourself and your path to become a cinematographer.

Polly: My name is Polly Morgan, and I am a cinematographer from UK. I spent many years working as a camera assistant, but I always knew that my ultimate goal was to shoot photography on movies. I tried to establish myself in the camera department and work my way up.

I was always captivated by film since I was a child. When I was younger I didn’t even know what a cinematographer was. It was a process. I studied art history, fell into photography and became aware of the world of a cinematographer when I was a teenager. I happened upon a movie set and I decided at that point that it was what I wanted to do.

Kirill: Jumping a little bit forward, if you look at the variety of digital cameras available on the market, do you think it’s easier for people to get into the field nowadays than it was for you back then?

Polly: Definitely. I feel there’s been a certain decentralization, an opening-up in the technology. When I started doing my own short films, I had to save up money to buy 16mm negatives and pay for processing. Everything that I wanted to shoot had to be carefully planned and organized in advance. It was such a big cost to do it on your own. At that point I wasn’t in a circle of young people who wanted to make film. I was a bit of an anomaly within my group of friends.

These days the ability to have a camera to shoot video, go out with your friends, edit it yourself, upload it yourself – it really means that you can just shoot and practice and develop and not have to worry about being constrained by money or availability of resources.

onset01
On the sets of “The Truth About Emanuel”. Courtesy of Polly Morgan.

Kirill: Do you think it’s good for your field to have a lower barrier of entry, to have much more material being shot but not always at the highest professional level necessarily?

Polly: I think it’s a great thing. At the end of the day a camera is just a tool for creating art and telling stories. It’s an exciting thing that you can be of any age and of any background if you want to express yourself and tell your story – and have the capacity to do so. But being a cinematographer is still a challenging craft to learn.

There’s still a lot of facets that are involved going beyond just getting your hands on a camera. It’s about the art of telling a story, not only how to use the camera, but how to paint emotion through lighting, to choose the right palette of cameras, lenses, movements, lighting, color. These are the things you use to tell a story, and just because it’s more accessible to shoot digital capture, it doesn’t necessarily mean that there’s more inspirational storytellers out there. It just means that just more people get to have the opportunity, to democratize the film-making process.

In the old days you almost had to be born into it, to be exposed to it, to work really hard for years to finally be given that opportunity to shoot film and get your hands on a 35mm camera. These days more people have the opportunity, and it’s exciting. It means there are fresh voices out there. It means independent movies can be made.

We’re all story tellers. We’re all sharing the experience of humanity that we’re involved with. The more stories there are, the better.


On the sets of “The Truth About Emanuel”. Courtesy of Polly Morgan.

Read the rest of this entry »

March 20th, 2014

Cinematography of “House of Cards” – interview with Igor Martinovic

With two stellar seasons under its belt, “House of Cards” is one of the best things that happened to the world of episodic TV productions in the last few years. After speaking to the production designer of the show a few months ago, it’s time to turn the attention to the show’s cinematography. Igor Martinovic has joined the second season, collaborating with different directors and shooting all thirteen episodes. In this interview Igor talks about advances in accessible digital cameras and how it affects his field of work, intertwining technical and artistic aspects of cinematography, switching from the feature world to join an existing TV show and defining the visual approach for the second half of the original story arc, the pace of working on multi-episode production and the changes his craft is undergoing in the transition from film to digital.


Kirill: Please tell us about yourself and your path so far.

Igor: I am originally from Croatia where I graduated from film school. During my college years the war broke out so I ended up shooting lots of documentaries during that time. In 1993 when the war ended I moved to New York and have been living here ever since.

Kirill: Were you interested in shooting movies growing up?

Igor: Not really. I started taking photographs when I was 9-10 yrs old. My brother had a black-and-white lab at our home, and I joined him in taking photos, developing them and making black and white prints. It was a nice little hobby of ours. I had no clue that I would end up working as a cameraman one day.

At the end of the sophomore year at high school we were supposed to decide a direction in which to continue our education. I ended up in a high school class specializing in TV and film production. We watched a lot of movies, and instead of chemistry we studied photochemistry as well as optics and other related things. It was an experimental class but it gave me a direction. I realized that this could be an interesting profession.

Kirill: What did you work on when you moved to US?

Igor: I started on documentaries back in Croatia, and continued working on those after I moved to the States. My desire was always to shoot narrative and fiction. I slowly started to shoot short films and features, and it all went from there.

Kirill: In the last decade or so we’re witnessing a transition from shooting on film to shooting digital. Do you see that it’s opening doors to a wider group of people, providing a wider access to the shooting equipment and removing certain technical hurdles like buying film reels or doing lab processing?

Igor: I agree. There’s definitely democratization of the process happening right now. It is a progressive process because it brings so many new people into the field. It opens up possibilities for young and talented kids to come out and present their own vision, their own way of thinking. It is an infusion of a fresh energy.

It feeds on itself. The industry that is producing camera devices is broadening, and the base is broadening as well. They’re helping each other to develop the new visual language. In the last ten years we’ve seen an amazing change in the way people capture images. It’s been a small revolution.

It’s happening on both sides. It’s technical, but at the same time it’s a creative evolution as well. People are using these cameras in many different ways that were not even possible or technically achievable before. And it also opens up ways of seeing things, of presenting things in new perspectives.

Kirill: On the one hand some of the newcomers don’t go through the “official” academic channel of learning the history and the theory, but on the other hand they are not artificially, if you will, bound by those limitations.

Igor: There’s nothing wrong with learning your craft academically. I think that one would want to learn how things were done in the past – in the 20s, 30s, 70s… And the same applies to the theory of filmmaking – you can only benefit from it. But at the same time, if you’re talented, if you know what you want to do and how you want to do it, you absolutely should not limit yourself by having to go through those stages. If one is curious he or she can learn these things outside of the institutional framework.

There are few ways people can come to the point where they have a successful career. One is to work in the industry in supporting positions – camera assistants, gaffers – slowly developing and going up the ladder to become director of photography. The other is to finish a school and go straight to doing things as director of photography. Everyone has their own way to find themselves, their voice and their visual language that represents who they are, that shows how they see the world.

Read the rest of this entry »