Wednesday, September 23, 2015

Eighteen years later

My very first trip overseas by myself was a student exchange program, in a cute town on the English Channel, called Bournemouth. 

I have fond memories of that place. Many first times. Other than the obvious first exposure to real spoken English language, I got to learn a lot about the world just by seeing something different than what I was used to. It was my first time clubbing, my first time experiencing a cold beach, a sunrise at 5am, and my first time trying several interesting (for an Italian kid) foods and beverages. 

Novel delicacies that were frankly hits and misses with me included fruit-flavored chocolate, pasta with ketchup, lemon curd, vinegar fries, honey glazed salted popcorns on the pier, but also hard cider, and British ales. It was most of all my first time making international, longtime friends. I would bet the experience had a lot of repercussions in my life although, not having a time machine handy, I will never know.

So here I am, eighteen years later, on my way back to that cute English town. And for work, none the less. My old friend and ex colleague Sofronis invited me to join, so I'll be talking about what's new at Pixar. I'll be part of a panel and introduce our Universal Scene Description at BFXPro, and talk about our experience changing from a Reyes Renderman to a Path Tracer Renderman, at BFXCore next week.

For those who may not be familiar with it, BFX is a fairly new conference and festival. It takes place in Bournemouth, UK and, while hosted by the Arts University of Bournemouth, it has many industry partners such as Dneg, Framestore, MPC, The Mill, Cinesite, Creative Skillset and BAFTA. 

I will also be hanging out in London a day or two. If you're around, come say hi!

Monday, August 31, 2015

A Scene Description for All

I can't say I went to Siggraph this year, although I was physically there for one evening. 

I went to the Renderman event, which this year was extra exciting, not just for the crowd-drawing yearly teapot giveaway, but because we turned it into a full on science fair. Besides the presentations, which this year were including production updates on Finding Dory, we had booths showing some of the cool work we have done in the last year.

I got to help man one of the booths, mainly to show off some of the integration work we did on Katana and Rfk (Renderman for Katana), so shading would be possible on the - mostly - lighting platform. Other booths included our Real Time Preview, an Optix based renderer that can be used for high quality previews of your shading and lighting. We had Presto, our in house Rigging-Animation-Layout-Sim-You Name It tool. We also showed Hydra, our GL renderer used across multiple platforms.

Among the other things however, we announced the open sourcing of our new scene description format: USD - or Universal Scene Description. I am very proud of it and I hope it becomes a new standard in the data exchange for Visual Effects and Animation. 

So besides it rather grandiose name, what does it offer that is not already out there? 
First off, Usd is not just an optimized pose cache format: if that's all you need, Alembic is plenty good enough - by the way, Usd can load Alembic files. Usd attempts rather to solve more complex pipeline issues. At Pixar at one point we had a dozen files and respective converters we had to keep up to date. That made us reconsider whether we should simplify the pipeline and adopt one exchange format instead.

Our pipeline is rather complex, many departments work on the same data at the same time, so we had a system of hooks and cues, and in general files that expressed opinions on the same objects, even the same properties, and those opinions had to be layered correctly so that the strongest one would be available to use for rendering. 

Hence the first main feature of USD: Composition. Take a character. Then add some rigging information, then load it into a group, where you can add garments and hair. Add some shading. Then load that group into another context, like a shot. On the shot you have layout, then animation, then lighting and FX. But the shot also loads another version of the same character as well as hundreds of thousands of props and architecture parts. Each one of those elements are Usd files, that reference each other and override or enrich the previous layer's results. Better yet, you can load the Usd of the whole shot, and express overrides that will be saved directly onto a low level, like the model itself.

But what if the character is a template for, say 10 different characters, each of them with 15 different sets of characteristics? Usd can address that with a built in mechanism, called Variant Sets. We use them for many things, starting from modeling variants (which can be switched as late as shot lighting), shading variants, dressing variants, etc... Any set of overrides can be encapsulated into a Variant Set, and given a name. Those can be switched at any time, which made our shading workflows a lot more flexible than, say straight Katana Look Files.

There is a lot more to it, such as schema API's and viewers and editing tools, but hopefully, you get the idea. This has been a game changer for us, and we hope it will be for you too. Stay tuned for updates!

Tuesday, July 21, 2015

The last Reyes project

In my engineering position in Tools at Pixar, I am fortunate to get to work on pretty much all of Pixar theatrical projects. My department tends to start as early as four years from delivery, and we help along the way until one year or so to the release date. I was actually done with my work on The Good Dinosaur a long time ago and seeing the trailer almost caught me by surprise, a great one, as I hadn't seen recent imagery in months.

This show marks a special milestone at Pixar, though, for us who work on the technical aspects of our films. It is the last show we will release with our Reyes implementation of Renderman. It still uses a lot of the work we did on Monsters University, where we implemented a physically based engine using a hybrid raytracer on top of Renderman's Reyes. The quality of the environments in the huge world portrayed in The Good Dinosaur, however, raised the bar again and is a true achievement in itself.

Here is the latest trailer. I think it is a true beauty, and shows how far were able to push photorealism before taking a leap into the new renderer: RIS, Renderman's path tracer.

In the last couple of years, I had a chance to give some talks around the world about the differences between Reyes, Raytracing and Path Tracing, and how we use them, and have learned to appreciate their strengths and weaknesses. Now we are still hard at work with making the new renderer work well for our artists on a platform like Katana.

So why did we change? I mean, other than the fact that most of the VFX world is working with path tracers by now - be it Manuka, Glimpse, Arnold or you name it.

While the selling point for us was the quality of water renders - they tend to matter when making a sequel to Finding Nemo - the main appeal to many of us was the speed we can get feedback of complex illumination phenomenons. It was a bit later though that I started seeing the real difference in the quality of the renders: in the same render times we got so much more detail that my eyes hurt. While in Reyes we were shading 4 to 10 shading samples per pixels, we are now doing thousands. All the pain we went through in the transition was quite frankly worth it.

The challenges I have seen in the new architecture is that we have lost our classic bag of tricks, and had to dive in with a fresh mind, but not so much time to do so. Things were weird and unintuitive. Bump (at least the way we formulate it) is now much more expensive than displacement. The cost of primvar is, comparatively, much higher. We lost a whole shading language: RSL, as well as some good old tools we were used to. More importantly, we lost the flexibility that dynamic networks of coshaders and lights provided us, and have to make up for it with a whole new toolset to connect bxdf's and patterns in complex ways.

We are now ramping up the following two shows to use the new toolset, and it is just now starting to look more appealing than daunting. We're over the hump.

Tuesday, June 2, 2015

Two in a year

For the first time in Pixar history, 2015 is the year we have two movies released. The next one is The Good Dinosaur. The exciting news is, we have the first official trailer out there. It's pretty darn exciting, so enjoy!

The film has been anticipated by many posters, such as this one. If you pay attention though, the main characters and the environments actually appear quite a bit different than the look Pixar decided to land with. On the technological side, I tested a lot of my work on on the older assets, and I feel a bit nostalgic, but the new characters are much more appealing.

The Good Dinosaur is slated for later this year, and we are in the final laps of this race. Cross fingers for us!

Wednesday, May 20, 2015

Still one hundred percent

Inside Out is, well, out. The first thing me and my friends do at Pixar when our creation is out there in the world is check obsessively Rotten Tomatoes. Sometimes we even make bets on how long we can stay at 100% - the best run I remember was Toy Story 3, but of course different movies we've made have fared different results.

So far it's going pretty well, although by the time you see this link it might have changed.
I am so proud of this film, I really hope you get to see it and enjoy it.

On a related note, a first glimpse of our next film was shown at Cannes this spring. It's the first time ever Pixar releases two pictures in one year and the impact, both in excitement and sheer work, was definitely felt here in the trenches. More on this one soon... so stay tuned!

Monday, April 6, 2015

A flock of manta rays

I could say I started my career in graphics writing shaders, with Rebelthink.

However it has been a long time since I played with actual shaders. Production shaders at Pixar can be complex, and interesting, but most of my time has been focused on supporting the pipeline that lets our artists do what they do.

So, there has been a pet project I have been delaying for months now. My good friends Inigo and Pol put together a website that lets you write any custom single pass fragment shader, and make it do whatever you want. There are many of great examples right on

While the initial learning curve can seem daunting, the reward is almost immediate, and it's almost magic. There is a ton you can do with a single crazy fragment shader. 
Disclaimer: you wouldn't want to put any of those shaders on a real game, they tend to be slow and there are so many better ways to do impressive effects. That's why it's called Shader Toy. It is great though, for testing new ideas.

Anyways, here I was, writing a shader.

Why not write a simple ray marcher in it? Why not make my ray marcher calculate the distance from procedural primitives, such as spheres?
Well, I kept fancifying my spheres, until they started looking like Manta Rays. 

Why manta rays, you ask?
Because they are beautiful creatures, and because I remember how jealous I felt when my friend Philip posted a picture of a Manta Ray, from his very first trip diving in Hawaii.

If you know any shading or glsl, or even any programming at all, give it a try! It will be worth your while.

Sunday, March 15, 2015

Another Fuzzy Border

Perhaps because of my feelings about visiting a country at war, and also to ease the worries that my family back in Italy had, I decided use some of my time in the Middle East to go and experience an island right across the water from Tel Aviv: Cyprus.

Planted in the middle of many civilisations, the island looked incredibly enticing. So we flew there for a  week-long diversion. Right on the plane we met a nice Portuguese man who gave us some suggestions about what to eat and where, so we ended up dining out with him. We had a meal that I thought I knew from the many middle eastern restaurants in the Bay Area but nothing really can prepare you for an authentic seafood Mezze in the old port, Larnaca.

That was only the first of a series of fantastic meals that made me completely reconsider my appreciation for Greek food. Fresh seafood, cooked simply but with great flavours, such as olive oil and lemon. Refreshing salads with a remarkable amount of fresh, sweet onions, something that I tried replicating with disastrous results on my taste buds here in San Francisco.

Since we were on an island, seaside is a great place to explore on all sides. We got to indulge on known resorts, and we were able to hike, off road drive, relax and bask in the sun on very remote beaches.

A dancing Venus and a bathing one. Cyprus is considered to be the birthplace of the goddess of beauty and love.

But Cyprus also has vineyard-dotted hills, where agriculture and livestock complete the picture of a tourism driven economy. Cyprus is quite a destination for foodies, thanks to the variety of landscapes you can find in its confined space. Their wine is not bad, but their own version of Grappa, a liqueur based on distilled grapes, is extraordinary, and it is called Zavania. Food up there is more hearthy and Mezze tend to excel in the meat department.

Up in the mountains, there are lots of charming small medieval villages that bring you back hundreds of years. The slow pace of life there felt really regenerating to me.

As I mentioned, Cyprus is in the middle of many civilisations, and its history has been haunting the place until very recently. We landed on the Greek side, but leaving Jerusalem only a few days earlier made us more sensitive to fuzzy borders across uneasy neighbours. We were unable to cross to the Turkish side, both because of time constraints, and because it is more involved than we wanted. It is not simple to cross on a car, but it is possible to walk across the border in the capital, Nicosia (Lefkosia). I definitely want to see the other side next time I go.

It is interesting to see the many different religions here too. Orthodox, Catholic, and Muslim buildings are easily found all over the island, with a very mediterranean architectural flavour to them. Most Mosques were actually built by the Turks, but since the invasion in 1974, you won't find many Turkish Cypriots in Greek Cyprus. Algerians, Tunisians and Moroccans are the main frequenters of such Mosques. 

Despite their rampant patriotism, Cypriots are very warm and welcoming people, and that has attracted an increasing number of expats. I can see the appeal. A warm, affordable semi-independent country right in the Eurozone, with a great mix of historical and natural beauty. And food, don't forget about the food.

Monday, March 9, 2015

The Cradle of Religions

It took me a while to decide. In fact I went back and forth on this for several months. My emotions were strong in both directions... I really should go. No, really, I cannot, it's not right.

My girlfriend has a mixed background, half Chinese, half Middle Eastern. Part of her family is from Jerusalem and she even spent several years in Israel.

The time had come for her family to go visit, and they expectantly invited me to join them. On one hand, it should have been a no brainer. Uncles, aunts, grandparents, and cousins were looking forward to meet me. Mayah felt strongly about it and I, as you probably figured by now, love traveling. Oh and I love culinary traveling even more. 

I hope you remember though, this was Summer 2014. Israel was leading a very polarising campaign against Hamas, in Gaza. I won't pretend I took no position. I see why Israeli civilians felt unsafe with rockets falling periodically on their current territories. They wanted to put an end to it. But what the Israel government, and parts of the military, ended up doing in Gaza, as well as what it does every day, is wrong, and I could not condone it. Also, I am Italian. Europe doesn't feel the need to almost unconditionally support Israel as much as the US does. Really there are whole books written about this. I won't get into it too much. My only point is, it took me a while to decide.

What follows is a snapshot of the little Israel I was fortunate to see, as well as a few places across the border. 

The first place we visited was Jerusalem. One of the most beautiful cities I have ever visited.

I guess I identify as freely spiritual at best, but I was born into a moderately Catholic family, and grew up with the classic movies about Jesus, set in Rome occupied Jerusalem. All the way from colossals like Ben-Hur, to Monty Python's Brian's Life. Seeing it in person tickled that part of my child mind that had all those images memorized, and it weirdly felt like coming home.

Jerusalem is an intensely spiritual place. It is a pivotal place for three of the major religions (with all their variations and flavours) in the world, and the result is that the old city is split into quarters. The Jewish one, the Christian, the Muslim, and one that is more historical and cultural than religious: the Armenian.

Millions of tourists and pilgrims flock into the City and the Holy Sepulchre every year. We had to squeeze through dense crowds to be able to catch a glimpse of this holy place.

Even as a culturally detached person as I am, it made a certain impression to see the Via Crucis, the places I was taught about so much, where the passion of Christ took place. It is now a bustling market in the Old City, where people of diverse backgrounds sell their specialties. 

The smell of spices, bread and turkish coffee impregnate the air, and the foodie in me could not help stopping and marvelling at all the delicacies.

Oh... the bread...

Turkish coffee... I could get used to it

A mountain of spices

As I said, this was a family vacation, and Mayah's family really made me feel welcome and put efforts in trying to show us as much as they could in the short time we had.

Family feast in Bet Shemesh 

We were able to visit Bet Shemesh and Tel Aviv as well as Yafo, the medieval coastal town. Bathing in the warm waters of the Mediterranean sea at sunset is something I hadn't done in many years, and it will always be in my heart.

performers in Tel Aviv old train station
We swam in the Dead sea. It is amazing to float so high in the water. Pro hint: don't shave. The salt will not be kind to your micro cuts. Also, pay attention to the currents, the water seems calm but but it can drag you far away from the shore, and it is impossible to swim fast with most of the body floating up. 

We also climbed the Masada mountain, an impressive fortress on the cliffs, where a whole mass suicide took place. Read: a relative majority voted to have everyone (men, women and children) murdered except for a couple of survivors who managed to hide. The event made an impression on the sieging Romans, and for some twisted reason it has been hailed as heroic through the generations, all the way to today.

the Dead Sea Scrolls

Almost a year later, I haven't changed my mind on the constant conflict in the area. But in the end, I am glad I went. Not just because I had a great time, and it was way more peaceful and safe than the US media made it appear. But rather because I got to see how gritty, weird, complex and diverse Israel is, with all of its idiosyncrasies. In many ways, it is more real. And to me, that is more relatable and endearing.