Latest / Talk Python To Me / #46: Python in Movies and Entertainment
Transcript
- 0:00What did you experience the last time you watched a movie in a theater?
- 0:03Were you captivated by the fast-paced action and special effects?
- 0:06Deeply moved by the characters that came to life during those two hours when the outside world just melted away?
- 0:12Yeah, movies are still magical.
- 0:14What was likely not top of mind was all the work that went into that movie,
- 0:18from the editing of the audio and video, to the special effects, the rendering, the coordination,
- 0:23and maybe hundreds of creative professionals.
- 0:25It turns out that Python plays a key role in coordinating all of that production work,
- 0:29and that's what this episode is all about.
- 0:31Join me as I talk with Rob Blau from Autodesk about Python in the movies and entertainment business.
- 0:37This is Talk Python To Me, episode number 46, recorded January 28, 2016.
- 0:43I'm a developer in many senses of the word,
- 0:49because I make these applications, but I also use these verbs to make this music.
- 0:54I construct it line by line, just like when I'm coding another software design.
- 0:58In both cases, it's about design patterns.
- 1:02Anyone can get the job done, it's the execution that matters.
- 1:05I have many interests, sometimes...
- 1:07Welcome to Talk Python To Me, a weekly podcast on Python,
- 1:10the language, the libraries, the ecosystem, and the personalities.
- 1:13This is your host, Michael Kennedy.
- 1:16Follow me on Twitter, where I'm @mkennedy.
- 1:18Keep up with the show and listen to past episodes at talkpython.fm,
- 1:21and follow the show on Twitter via at talkpython.
- 1:24This episode is brought to you by SnapCI and OpBeat.
- 1:28Thank them for supporting the show on Twitter via snap underscore CI and OpBeat.
- 1:33Hey, everyone.
- 1:35Two weeks ago, I told you I had a huge announcement that I was really excited to share with you,
- 1:39but couldn't.
- 1:40Now that everything is in place, it's time to share my big plan with you.
- 1:44When I started this podcast almost a year ago, I had modest expectations and more than a little
- 1:50uncertainty about how it would be received by the community.
- 1:52And honestly, every day I'm blown away by how many people's lives I touch and help educate
- 1:57in some part of Python that was less well known to them.
- 2:00I get a huge amount of satisfaction spending time making Python more relevant to you through
- 2:04this podcast.
- 2:05I've been thinking about how I do more of that.
- 2:07I believe the natural counterpart to this podcast, which exposes people to new ideas and inspires
- 2:14them to learn more about Python, is a comprehensive set of online courses to help you go from inspired
- 2:19to empowered, from new developer to highly effective developer, from specialized developer to a
- 2:24well-rounded one.
- 2:25So today, I'm announcing the first course and taking the first step on a journey to build
- 2:30this resource for you and the whole Python community.
- 2:33Over the next two years, I plan to release 20 high-quality online courses that will be between
- 2:39three to ten hours each.
- 2:41These no-fluff courses will strive to make you effective with some corner of the Python ecosystem,
- 2:46including the Python language, web apps, databases, GUIs, parallelism, and more.
- 2:51The first course will be about the Python programming language, and will take a fun and playful approach
- 2:56to teaching you the language details such as classes, loops, variables, and more.
- 3:01It's called Python Jumpstart by Building 10 Applications.
- 3:03It'll be about six hours long, and it will be a comprehensive introduction to the Python
- 3:07language.
- 3:08If this project resonates with you, I need your help.
- 3:11As of today, I'm launching a Kickstarter to make the first course, this first step on
- 3:16my journey, a reality.
- 3:17Take a moment to visit the Kickstarter to see what it's all about.
- 3:20Just go to talkpython.fm/course, and you'll be redirected to the Kickstarter page.
- 3:26There are many reward levels, but the main one is the $29 student reward, which gives you
- 3:31lifetime access to the course at a significant discount.
- 3:33If you believe in this project and want to help, please tweet about the Kickstarter, share
- 3:38it with your coworkers, or even back it yourself.
- 3:41I'm really excited to start down this path to build something amazing for the community,
- 3:45and I can't do it without you.
- 3:46So any support or word-of-mouth endorsements you can give me will be deeply appreciated.
- 3:50Please let me know what you think.
- 3:52Send me a message over email, contact at talkpython.fm, or on Twitter via at Talk Python.
- 3:58I'm also doubling my efforts on this podcast as well, so keep listening and sending in suggestions
- 4:03and feedback, and I'll do my best to bring you interesting and relevant episodes.
- 4:07Now, let's hear from Rob Blau about making movies and video games with Python.
- 4:11Rob, welcome to the show.
- 4:13It's great to be here.
- 4:14Thanks for having me.
- 4:15Oh, you're welcome.
- 4:16Thanks for coming.
- 4:17I'm super excited to talk about Autodesk.
- 4:19You guys kind of make a little bit of everything.
- 4:22There's so many different pieces of software that you write.
- 4:25And it sounds like Python plays some pretty cool part in that.
- 4:29Yeah, definitely.
- 4:30So Autodesk is a great company.
- 4:33The company mission is to help people build cool things.
- 4:37So pretty much software that helps people realize their creative vision.
- 4:43The largest piece is kind of on the AutoCAD, like production architecture side.
- 4:49And the piece of Autodesk that I work in is the media and entertainment division.
- 4:56So we get to work with animation houses, visual effects houses, and help build the software
- 5:03that they use to do the cool things they do to put pixels and games together.
- 5:08That's really cool.
- 5:09So if I jump on a train and I go over to the airport and I get on a plane, fly somewhere,
- 5:18and find my way to a movie theater, how many of those different experiences are modeled or
- 5:26somehow created with Autodesk things?
- 5:29Chances are every single step of the way from the car that you jumped into, somewhere along
- 5:35the way from the factory that it was created in and the robots that made it, they were designed
- 5:39using some of the Autodesk software, the actual car itself, the models, all of the pre-visualization
- 5:46that people do in order to figure out what it's going to be.
- 5:49And then the actual instructions for building it.
- 5:51Autodesk makes products that do that.
- 5:54I mean, the city streets and the planning, it's incredible, the places that the software
- 6:00is used, and then the airplane, the exact same thing.
- 6:02And then you're going to the movie theater.
- 6:04The movie theater itself was probably done by an architect who was using AutoCAD in some
- 6:07way, shape, or form, or Revit, which is used to build bigger projects and make sure that
- 6:13all of the various components in the building, like the HVAC and the design and the wiring,
- 6:19all talk to each other and will work once you actually build it.
- 6:23And then you finally get the movie showing and you start seeing, nowadays, almost every
- 6:30single shot has some kind of visual effect on it, whether it's just a little bit of 2D
- 6:35cleanup that happens up to the full 3D.
- 6:40The actual environment is completely created from scratch inside of some software.
- 6:46Autodesk makes some of the most widely used pieces of software for that, like Maya 3 Studio
- 6:53Max.
- 6:54All of those are used to model and render what you're seeing up on screen.
- 6:59That actually kind of blows my mind.
- 7:02That's even more intense than my original thought.
- 7:04That's awesome, though.
- 7:05It's really cool.
- 7:06Fun mission to have to just make it easier for people to realize their creative vision.
- 7:12It's a nice one.
- 7:14Yeah, I bet it is.
- 7:15So let's totally dig into that.
- 7:17But before we do, maybe sort of give me your background story.
- 7:20Like, how do you get into this place where you're working on basically building everything
- 7:24that makes up the synthetic world?
- 7:26I had kind of a roundabout way there.
- 7:29I went to school for computer science.
- 7:33So from Boston, went to MIT and graduated around the first tech boom, did a couple of dot coms
- 7:42at that point and built up kind of just a varied background.
- 7:47I did a lot of scripting, a lot of database work, a lot of just systems admin kind of stuff.
- 7:53Just there was a startup culture and you did whatever you had to do to get going.
- 7:57And from that, I went to actually a Linux conference and saw a presentation from DreamWorks,
- 8:04DreamWorks Animation, where they were presenting how they're using Linux because they were one
- 8:08of the first companies to switch over to kind of big open source software as the foundation
- 8:14of the technology that they're using.
- 8:16Interesting.
- 8:17What were they switching from?
- 8:18Do you know?
- 8:18Silicon Graphics?
- 8:20Yeah.
- 8:20Back in the day, it was kind of Silicon Graphics.
- 8:22Yeah.
- 8:23So they kind of had deals with Red Hat going and figuring out kind of the enterprise Linux
- 8:29distro.
- 8:29They were early in adopting all of that stuff.
- 8:32So you intersected there when they were talking about how they were using Linux.
- 8:35Okay.
- 8:36Exactly.
- 8:36And I got to talking with them and it turns out that they had an interesting job that was
- 8:44doing, it's called pipeline work in the visual effects industry, which is the software that
- 8:49helps tie together what all of the different departments do.
- 8:53So you've got an artist sitting there, they've got a very specific job to do.
- 8:57It's almost like in an assembly line in a factory, you've got your station where you're doing your
- 9:02very specific thing, except with an artist, it's a very creative process, but they still have to
- 9:07take work done by somebody else, get it working for them, do what they're supposed to do to it,
- 9:12package it up for somebody else and then hand it to somebody else.
- 9:15And all of those pieces other than that creative work is kind of overhead that it's
- 9:19nice to artists to not have to do.
- 9:21And that's where this idea of pipeline comes in.
- 9:24So I was kind of fascinated by that right from this original conversation.
- 9:29Plus I had about 10 Boston winters and the idea of California sounded pretty good.
- 9:35So I went to work for DreamWorks where I was for five years and was a member of their pipeline
- 9:43department, ended up being a supervisor in that department.
- 9:47And that actually is where I first started using Python extensively.
- 9:53The pipeline at DreamWorks was Pro-based because back originally when you were doing text processing
- 10:00and having to glue together different software, Pro made a lot of sense.
- 10:06Right.
- 10:07What year was that?
- 10:09That was about 2003, 2004.
- 10:12Yeah.
- 10:12I'm talking about right now.
- 10:13Yeah.
- 10:14Pearl was still in a pretty strong position back then.
- 10:17Exactly.
- 10:17And the pipeline that I'm talking about had been in place for like a good probably five, six,
- 10:26seven years before that even.
- 10:27So when it was written, like that was the choice.
- 10:30But there was something that was kind of interesting that was happening with software in the 3D space.
- 10:38There was already a couple of pieces of software that had Python embedded in them.
- 10:44And Maya actually, as one of the biggest, again, taking it back to an Autodesk product, was introducing a version that had an embedded Python.
- 10:53And at that point, if one of the biggest applications that you're using in your pipeline speaks Python natively,
- 11:01there was a pretty serious indication to DreamWorks as a whole that maybe committing to Python rather than Perl would be a great idea
- 11:09because all of a sudden, all of this integration work that we're doing doesn't have to end outside of the applications that we're trying to tie together.
- 11:19We get the chance to run inside the application with code that you're using to tie everything together,
- 11:26which is amazing because all of a sudden you can speak the same language throughout the entire pipeline
- 11:33and do a much more seamless handoff for the artists, kind of, which is, again, the purpose of all of this is to make it so that they can spend their time
- 11:42just doing as much creative work as possible.
- 11:44Right.
- 11:45Yeah, that's really cool.
- 11:45rather than trying to integrate Perl and Python and have some sort of handshake or handoff, just make it Python all the way through, right?
- 11:54Yep, which actually was, at the time, controversial.
- 11:58It was a pretty big jump to do, and it wasn't clear that Python was going to take hold in the entertainment industry the way that it has.
- 12:06But since then, nowadays, it's a no-brainer.
- 12:09Almost every new piece of software that comes out has an embedded Python interpreter,
- 12:14and Python studios around the world is the de facto language that's used in order to do this kind of work,
- 12:23in order to tie stuff together, or even just the tools that you write for artists.
- 12:28Unless it has to be compiled, you tend to gravitate towards Python to do it.
- 12:33That totally makes sense to me.
- 12:34What I think is interesting, and I see it happening in data science, I see it happening in education,
- 12:38you're telling me it happens here as well, which makes a lot of sense,
- 12:43is it seems like Python is becoming more and more popular, and that popularity is almost accelerating.
- 12:52The rate of popularity growth seems to actually be growing, which is really cool to be part of it as that's happening.
- 12:59Why do you think that is the case in the entertainment industry?
- 13:03I think I was thinking about this in advance of sitting down.
- 13:08A lot of it, I think it got its start by being so easy to embed and having kind of this kitchen sink approach.
- 13:18Those two things combined together made it so that with just a little bit of C code,
- 13:24all of a sudden, the scripting environment that you could offer people became incredibly rich.
- 13:32And because of the ease of exposing your C, C++ libraries through to Python,
- 13:40even if you just go natively to the Python C API,
- 13:44it meant that all of these programs that didn't necessarily have a great scripting language
- 13:53could have one without too much investment.
- 13:57Now, Maya actually did have an incredibly embedded scripting language, still does, called Mel,
- 14:04but it was only for Maya.
- 14:06And people were Mel experts.
- 14:08There was a ton of work done in Mel,
- 14:10but your world ended at the boundaries that Maya provided.
- 14:15And it didn't give you too much of a chance to extend outside of that.
- 14:19Whereas with Python, you get the exact same kind of scriptability,
- 14:24but now you get to talk to the rest of the world and the rest of the universe
- 14:27that's also speaking Python, which is huge.
- 14:30So I think the application developers saw that,
- 14:36and it wasn't that huge an investment to say,
- 14:39like, hey, let's just slap Python in there.
- 14:41And then it paid dividends.
- 14:43And then once that started happening, it almost was a no-brainer.
- 14:48If you're going to be doing this work,
- 14:50you do it in a language that all of the big applications that you're running speak natively.
- 14:56And everything just kind of came together around that.
- 15:00Yeah, it just kind of snowballs from there.
- 15:02Exactly.
- 15:04And then once it's kind of established as the de facto,
- 15:06then everything else that comes in just has to speak it.
- 15:09In the industry, there's been a ton of new open source projects
- 15:15that are going on,
- 15:16like a standard way to pass 3D geometry between applications,
- 15:22a standard way of describing what's going on inside of a 3D scene.
- 15:28And every single one of those comes with Python bindings out of the box
- 15:33because everybody knows that you're going to have to interact with it via Python.
- 15:39Right.
- 15:40So if you don't have the Python bindings,
- 15:42it's almost like you don't have a mature scripting story or something like that.
- 15:46Yes.
- 15:47And it almost like that can be the bulk of your scripting story.
- 15:51And if you don't write it, then someone will write it really shortly
- 15:55because people need it.
- 15:57If you're going to be used, you need to speak Python.
- 16:00That's interesting.
- 16:01You were talking about sort of, you know,
- 16:03you had the scripting language Mel and it was doing fine, presumably,
- 16:07but it kind of, it could only do its thing.
- 16:11And I think that's also why Python's becoming one of the major reasons
- 16:15why it's becoming so popular in like data science
- 16:17is there are languages like R and so on.
- 16:20But if you want to build like a full stack sort of thing,
- 16:23like I want to do my, you know, the data science part,
- 16:26I want to do my science and my visualization and my web app
- 16:29and my database access all in Python.
- 16:32You know, you can't do that in these other more specialized languages.
- 16:36So it's interesting to see the parallels over there.
- 16:39Yeah, it is.
- 16:41I'd actually say the thing that I'm seeing where Python isn't in play as much
- 16:48comes from applications that were kind of originally developed
- 16:51for either like a very specific workflow or from outside the industry
- 16:56and they're coming in.
- 16:57a lot of those actually start with nowadays JavaScript engines built in
- 17:02because I think the same story has kind of repeated itself a little bit on the JavaScript side
- 17:07where it's so easy to embed at this point that for very little investment,
- 17:12you can go ahead and have a JavaScript interpreter running inside your app,
- 17:16just like you can have a Python interpreter inside your application.
- 17:20like within the entertainment industry,
- 17:22those are actually some of the big areas where we're kind of have a miss
- 17:26in terms of getting everything to talk to each other.
- 17:28Photoshop is a good example where there's various somewhat convoluted ways
- 17:36to try to get the JavaScript that Photoshop speaks to talk to Python outside of Photoshop
- 17:41and various places are doing that.
- 17:44But again, it's that idea of just how easy it is to create a scripting environment
- 17:51inside of these applications where there's a lot of value to being able to talk to it
- 17:56without writing compiled code.
- 17:57You know, I think the whole V8, the thing happening with Node,
- 18:02but really the V8 engine itself being a separate thing that you can host
- 18:06has done some pretty amazing stuff for JavaScript.
- 18:09Exactly.
- 18:11And I think some of the full stack, like it's Python all the way through,
- 18:15like the whole Node story and V8 is like it's JavaScript all the way through.
- 18:19Yeah.
- 18:20And it has a lot of the similar kind of parallels where it has a little bit more
- 18:23of the kitchen sink, not as much as Python does,
- 18:26but there's more and more JavaScript libraries popping up all the time,
- 18:30just like there are Python libraries too.
- 18:33So it's interesting just seeing that pattern replicate itself.
- 18:36It's kind of detrimental from where I'm sitting,
- 18:38because I would love it if all of those things spoke Python.
- 18:40It would make my job easier,
- 18:41but it's just kind of interesting seeing that take hold again.
- 18:53continuous delivery.
- 18:55Continuous delivery isn't just a buzzword.
- 19:03It's a shift in productivity that will help your whole team become more efficient.
- 19:06With SnapCI's continuous delivery tool, you can test, debug, and deploy your code quickly and reliably.
- 19:12Get your product in the hands of your users faster and deploy from just about anywhere at any time.
- 19:18Did you know that ThoughtWorks literally wrote the book on continuous integration and continuous delivery?
- 19:24Connect Snap to your GitHub repo and they'll build and run your first pipeline automagically.
- 19:29Thanks SnapCI for sponsoring this episode by trying them for free at snap.ci slash talkpython.
- 19:44That is super interesting.
- 19:45That is super interesting.
- 19:45It makes a lot of sense to say either Python or JavaScript as a proposition for somebody who's not a developer but needs to automate a thing.
- 19:53To say your API is C++ and you've got to have this compiler with these headers and these libs you're statically linking.
- 20:00That just doesn't fly, does it?
- 20:03No.
- 20:03The stuff that Python is used for tends to be a lot higher level workflow.
- 20:09I think you're taking workflow and translating it to code.
- 20:12So it tends to be pretty dynamic.
- 20:14It needs to be updated constantly.
- 20:16I mean, almost each project you'll be tweaking the stuff to work how the people working on that project need to work to get their job done most efficiently.
- 20:24And it doesn't need to be performant, I guess.
- 20:27Yeah, because it's just orchestrating the things that are probably written in C.
- 20:30Exactly.
- 20:31Interesting.
- 20:32You were talking about JavaScript and having the JavaScript try to interact with Python somehow.
- 20:40And obviously getting out of a JavaScript engine can be pretty tricky because they try to sandbox you a lot.
- 20:44But have you looked at PyPyJS or one of these embedded JavaScript foundation Python implementations?
- 20:55We haven't.
- 20:56I guess I should qualify.
- 20:57What I'm doing at Autodesk is actually a group that is putting together one of these production pipelines that is just part of a production management product that we make.
- 21:10So I'm now not working at a studio doing all this pipeline work, but working at a software company that is, again, just trying to make it so that the various workflows that we see being done in VFX and animation, just content creation in general, we make it really easy for people to get some of the grunt work out of that.
- 21:29Given that setup, we're not embedding the interpreters ourselves.
- 21:35So I'm working on the scripting code that's going to be able to talk to that application.
- 21:41So it's like Photoshop has JavaScript.
- 21:44We're not going to be able to embed Python in it, although we could do a plugin, get an embedded Python running.
- 21:52But then there's a lot of threading issues and other stuff that we've tried to be as seamless as possible.
- 21:57But you can only do so much with an application.
- 22:01It all depends on what kind of SDK and API they offer you.
- 22:05So we don't have that level of control.
- 22:07But we are looking at some standard RPC kind of libraries and trying to figure out what does make for a good bridge between those worlds.
- 22:16Right.
- 22:17I think probably the easiest way to bridge JavaScript to another thing is some kind of network layer, right?
- 22:24Network layer or even if you're not going over the network.
- 22:28Yeah, exactly.
- 22:30Like RPC, even if it's just talking to another process on the same machine.
- 22:35Yes, exactly.
- 22:36But making that a really rich communication channel.
- 22:39And there's some impressive projects out there that do that.
- 22:42And we're actually kicking off an effort to evaluate them and try to pick one that's going to work well for us.
- 22:51One of the things you'd sent over is you talked about sort of Python and games.
- 22:59And what's the story there?
- 23:00Sure.
- 23:01Games is kind of an interesting take on all of this because VFX and pixel production has been around longer
- 23:12and has a bunch of different constraints than games have.
- 23:17So far, games have really been driven by the game engine and the developers as almost separate from the creation of the models and the shaders that show up in the game.
- 23:34All of those need to play well together.
- 23:36But it's almost been more of an agile developer kind of style than a cascade of content flowing between different departments,
- 23:47which is what you see in animation and VFX, mostly because the complexity of all of the environments and models that VFX has been playing around with has been higher than what you've seen in games.
- 24:01But that's actually switching a lot nowadays, where the complexity of production in a game is a lot of times higher than what you would see in a feature film.
- 24:14The need for this kind of pipeline is showing up in games more and more.
- 24:20But they've got this whole coding side to the game where the artists are just a piece of what's going on and they need the developers in order to tie everything that they're creating in.
- 24:32And it all comes together in the game engine.
- 24:34That is what's actually going to be running all this stuff at the end of the day.
- 24:38What we've seen there is there's some game engines that speak JavaScript coming out now.
- 24:44The tried and true has been .NET.
- 24:47Just a lot of this has been pretty Microsoft-centric.
- 24:51And the .NET code can speak Python, the iron Python that's out there, which has been kind of an interesting tie-in for us.
- 25:01Or Lua, actually, is another scripting language that a lot of the game engines tend to speak.
- 25:08But it's yet another kind of separate world.
- 25:10Even the .NET side has limitations.
- 25:13It lets us do kind of basic Python integration.
- 25:16But you hit brick walls pretty quickly when you want to do cross-platform networking stuff or GUIs, especially.
- 25:24You have to start writing things specifically for the .NET flavor as opposed to treating it just like another Python interpreter that's out there.
- 25:32Right.
- 25:32Yeah, you get very, very specific, like WPF-type stuff.
- 25:37You can't do PySide, PyQt type of things.
- 25:41That kind of, which is much more cross-platform.
- 25:43Can you give me just your feedback on what you've done and what it's like to work with IronPython?
- 25:48I haven't actually...
- 25:49I've played with it and looked at it, but I don't really know much about it.
- 25:54So it'd be interesting to hear.
- 25:55I've actually found it to be pretty good.
- 25:58The boundaries that you hit are kind of what you'd expect, where Python itself starts having dependencies on third-party libraries, like SSL implementation or the GUI kind of side of the world.
- 26:10But, I mean, personally, I've had fun little side projects like getting IronPython up and running in a plugin for Microsoft Office projects.
- 26:21So that, you know, there's an API that's available only via Python.
- 26:24You can start interacting with it from within Excel in order to kind of get deep scripting ability within something like that without having to write visual basics.
- 26:33So that you can, again, reuse that Python code base that you've got.
- 26:37Yeah, that's quite interesting.
- 26:40It's kind of a Frankenstein kind of approach, but a lot of the integration that we end up doing has some element of that because you're really trying to establish this rich Python programming environment in all of these different spots.
- 26:57And some of them are more conducive to it.
- 26:59Some of them, you kind of have to jam it in.
- 27:03They resist a little more, huh?
- 27:05Exactly.
- 27:06IronPython was a Microsoft project.
- 27:09I think it was created by people inside Microsoft or maybe they created it and promptly joined Microsoft.
- 27:14I can't remember the exact chronology of it.
- 27:16But they, a while ago, set it free and said, we're not really doing anything more with IronPython, but it's now this sort of open source project.
- 27:25The world can have it.
- 27:26And I just, like, a few hours ago, although it's been out for a couple of months, learned about this thing called Pyjion.
- 27:33Pyjion?
- 27:34P-Y-J-I-O-N.
- 27:36Have you heard of this?
- 27:37I've heard the name, but I don't actually know much more than that.
- 27:41It's kind of a competitor to PyPy, which is a JET compiled runtime implementation for Python.
- 27:49But this is one that runs on the new open source cross-platform version of .NET.
- 27:54So maybe there's something interesting there coming in the future.
- 27:57I don't know.
- 27:57We'll see.
- 27:58But it's interesting to see them taking kind of a second shot at something like that.
- 28:03Cool.
- 28:04I'll just check that out.
- 28:05Because something like that could potentially open up, like, the game engines that speak .NET to the deep integration with kind of the rest of the creative process that would share the pipeline from feature animation and the kinds of complex asset builds, like the models and the various assets that you see on screen, that process for games.
- 28:29Yeah, absolutely.
- 28:30I mean, IronPython seemed really cool, but kind of like you were saying, its limitation is you're all in on Windows.
- 28:37Like, it only runs on Windows.
- 28:39You have to really program against the .NET, so at the time, Windows-specific APIs.
- 28:45But with the cross-platform plus this, you know, maybe that sort of opens up again.
- 28:50It's going to be really interesting.
- 28:52I don't know where it is.
- 28:53Is that the mono environment?
- 28:55No.
- 28:56No, it's the mono environment was Miguel de Caza's work on sort of re-implementing .NET, which is Herculean.
- 29:06And they've gone on to do Xamarin, right, with the mobile stuff.
- 29:10So this is a new effort called the Core CLR by Microsoft to do a shell or a core kernel of .NET that's totally cross-platform that you can do on OS X and Linux and sort of, but, you know, official, not like a sort of frenemy-type project in what they're doing.
- 29:27So it'll be interesting to see if this can bring a really rich version of Python to that story, kind of like we have Jython for Java.
- 29:36Exactly.
- 29:37But, you know, that's not really updated really quickly.
- 29:40So maybe, I don't know, I have high hopes, but they may get dashed.
- 29:43We'll see.
- 29:44I hope it comes out awesome.
- 29:46We'll see.
- 29:46Definitely dig into that.
- 29:48Thanks.
- 29:48Yeah, you bet.
- 29:49This episode is brought to you by OpBeat.
- 30:04OpBeat is application monitoring for developers.
- 30:07It's performance monitoring, error logging, release tracking, and workflow in one simple product.
- 30:11OpBeat is integrated with your code base and makes monitoring and debugging of your production apps much faster and your code better.
- 30:18OpBeat is free for an unlimited number of users.
- 30:21And starting today, December 1st, OpBeat is announcing that their Flask support is graduating from beta to a full commercial product.
- 30:28Visit opbeat.com slash Flask to get started today.
- 30:32There sounds like a lot of positive news from all the cool things you're doing and the way you're able to weave these pipelines together.
- 30:48I want to kind of talk about what you see, the sticking points and so on a bit.
- 30:53But before we do, maybe just to give me and everyone else a better idea, could you describe what the steps are and this pipeline that you talk about?
- 31:03What are people doing?
- 31:05What does the software have to do?
- 31:06Just so we get a little more concrete idea there.
- 31:08The kind of nature of this is that you can go down these giant rabbit holes.
- 31:14Like you can go extremely deep into automating things.
- 31:18And traditionally, only fairly large studios that could afford having an R&D department had the ability to go deep.
- 31:27Lots of places had pipelines, but they tend to be pretty easy handoffs rather than tackling a lot of the deeper issues.
- 31:35It can start as early as a script.
- 31:39If you've got a script that you're thinking of making a movie of or that you need to do visual effects for, it tends to come in from some program that stores it as an XML file.
- 31:53You can write a parser for that in Python and use that in order to get a listing of here's all of the different scenes in the movie and here's the characters and location, things like that.
- 32:03Which, if you were doing this by hand, traditionally you would do a breakdown where you would just build up a spreadsheet of all of those things so that you can start getting your head around what you have to build.
- 32:12You go ahead and you start storyboarding things so that you get an idea of what everything is going to look like.
- 32:19And there's various software that's built around storyboarding.
- 32:22I mean, Photoshop is kind of one of few players in that area.
- 32:26Even then, you tend to just have these images that you're working on and then tracking those to say, OK, here's the current storyboards that relate to this scene.
- 32:37We want to hand them off to editorial that's going to start cutting them together into a movie that we can watch to get a sense of how this plays together.
- 32:44There's lots of iterations there that go back and forth.
- 32:47So you have to keep track of those files and know which ones were approved, what the notes were, so that whoever's going to be doing the next iteration on that can take those into account.
- 32:57And it's really trying to put some organization around a very creative, quick iteration workflow without getting in the way of that creative process.
- 33:06So then you start getting this editorial content together where you're cutting together these images on a timeline and you get a sense of timing.
- 33:15That tends to be a place where you need a lot of R&D to dig in because a lot of the editorial software out there, Avid being the biggest one, tends to be a little bit of a black box.
- 33:27You've got Final Cut, which has an XML spec that you can start taking apart, but you don't get a chance to understand too much of what's going on inside of editorial software.
- 33:37Sure.
- 33:38So are you guys doing actual processing of MP4 files or raw assets in Python and looking at them, that kind of stuff?
- 33:47So an example of how Python would tie in over there, not with Autodesk, but my previous job at a studio that's in Portland called Leica that does stop motion animation.
- 33:58We actually, there's a C library around this file format called AAF that is what the Avid editorial software speaks.
- 34:08And it's a pretty obscure format, very complicated.
- 34:12The API is very complicated.
- 34:14And we wrapped that with Python bindings so that we could take a export from Avid and really deconstruct it, which meant that we actually were able to know which storyboards an editor cut in where and what characters were in that storyboard.
- 34:33So that when you're going ahead and putting together a shot, you would know generally the contents of that and all of the comments that came through, all of the notes that the director had for the storyboard artist, which is incredibly valuable because in the shot, you've got to go ahead and take your 3D models and bring them in.
- 34:55So having the list of what's already been included from the storyboard artist gives your layout artist who's doing that work a leg up and you can get started and you can write a tool to automate the initial pass at that and then let him actually do the creative piece of that, which is where you should be spending his time rather than searching for the right models to put in.
- 35:15And then when it gets to animation, it's really valuable for the animator to be able to see all of the notes that the director had for the storyboard artist because they're very applicable to the job that he has to do.
- 35:25And none of that would be readily available without being able to connect the dots between all of those different handoffs.
- 35:32So connecting those dots and managing those handoffs and making it so that you can deal with this explosion of data that happens throughout this process in a kind of tractable, meaningful way is what the pipeline is responsible for.
- 35:49Okay.
- 35:49Okay.
- 35:49That gives me a really good view into it.
- 35:51I think it seems like there's all these different apps that the various people have to use, editors, artists, and so on, and they don't necessarily talk to each other.
- 36:02Right?
- 36:02So you're kind of writing.
- 36:03Yeah.
- 36:04So you're kind of writing this glue that can turn that into like one almost distributed data source or something.
- 36:12Right?
- 36:12Right.
- 36:14It's kind of like if you're used to using Excel on one front and you've got this text editor that you use on another front, if you were able to kind of connect those together because it knew that you're doing accounting work and it was able to actually react to the files that you're saving from the text editor, parse them, and automatically bring them into your spreadsheet so that you didn't have to manually do that.
- 36:39Each time you've changed one piece of information and get the rest of it in sync with that.
- 36:45It's kind of that on an extremely grand scale.
- 36:49I don't know if you have the answer off the top of your head or really no, but I'm thinking about all these different processes and all these different raw editions and then produced and sliced up editions.
- 37:04So these files, you know, if I go and get like a movie, it's probably a couple of gigabytes.
- 37:08But what's the data, the total data size for like a modern production movie or something?
- 37:15Do you have an idea?
- 37:16Oh, we're in many terabytes land nowadays.
- 37:20Yeah, it is terabytes and terabytes in order to do the models and the effects work and all of the simulations that need to happen in order to get the quality that we're seeing on screen.
- 37:33It's incredible the amount of data that goes into just those final pixels that you see.
- 37:39So like the gig, couple gig download that you get, which is a really high quality video that you could watch.
- 37:44Yeah.
- 37:45Each of those, you know, frames as gigabytes and gigabytes and gigabytes, like hundreds of gigs behind it alone.
- 37:52So we put it all together at 24 frames a second for feature length.
- 37:56It definitely adds up.
- 37:58Yeah.
- 37:58Wow, that's crazy.
- 37:59It is the scale and especially just the amount of data and the number of people involved and the amount of handoffs that happen in order to achieve that thing that is on the screen is pretty amazing.
- 38:14Yeah, I bet it is.
- 38:16Everything sounds really good, but you said that there was actually some issues that you were running into.
- 38:22Like one of them was that using Python 3 in this world is not something you can just necessarily jump straight into.
- 38:28A lot of the issues kind of around Python use almost come from how successful Python has been and how it's embedded in so many different places.
- 38:38We just have this versionitis problem where currently the code that we're writing, we actually support back to Python 2.4 because there's some versions of software that are out there and they've been updated since.
- 38:53But studios are pretty notoriously slow to update if everything is still working.
- 38:58It had Python 2.4 embedded in it.
- 39:00There's definitely a lot of Python 2.5, 2.6 that's still out there.
- 39:06The majority of modern stuff is on Python 2.7.
- 39:08There's like one notable source project that's made the jump to Python 3.
- 39:14But because the nature of this pipeline work is to glue stuff together, when you have a jump that's not backwards compatible, it kind of makes it hard because you have to have two different code bases.
- 39:29There's one that will run for all of the environments that are Python 2.5 based and one that will run for everything that's Python 3.5 based.
- 39:37And you can kind of work to minimize this.
- 39:40But there's definitely this hard jump that happens because not all of these pieces of software are going to update their Python interpreters at the same time.
- 39:50And there's nothing that says that you'll be able to, as a studio, be able to update to that version of that software at the same time.
- 39:58It gets into a whole lot of issues from just cost, support, licensing, getting the bugs out of it, down to having the resources to update your code to run in Python 3.
- 40:08Wow, that's crazy.
- 40:10That's going to be an interesting cliff for the visual effects feature animation world to get to the other side of.
- 40:18There's various attempts within the industry to try to control this versionitis issue because it's not just Python.
- 40:26There's all sorts of common libraries that are used throughout production.
- 40:31And whenever they don't match, it causes issues.
- 40:33So there's a VFX reference platform that tries to standardize some things.
- 40:38Python 3 isn't even on the radar of that.
- 40:41I think Python 2.7.whatever is the target for the foreseeable future.
- 40:48I think it's probably going to be dropping support with a combination of security issues that just force updates.
- 40:56That'll be the thing that finally gets us as an industry to the other side of that.
- 41:01But it is kind of unfortunate just because of the wide range of versions that you have to support and the dependent libraries and all of the complications that come up trying to develop software in that kind of an environment.
- 41:13Yeah, that really, that's quite challenging, it sounds like.
- 41:16I mean, when I think of people that are using Python 2 and they say we can't switch to Python 3, in my mind, I often think of a couple things.
- 41:26Like one is we have a quarter million or more lines of code that was tested and is working on Python 2.
- 41:34And we're just not going to change that because it's too risky and it's just, you know, it's not broken.
- 41:39We don't really want to mess with it.
- 41:40That kind of thing.
- 41:41And then the other is we've got some key library that we depend on, some package that itself is only Python 2.
- 41:48So until that gets upgraded, you can't only flip your app, right?
- 41:52But this is a whole nother level, like those two things still apply.
- 41:57They definitely still apply.
- 41:59They're just one part, right?
- 42:01Because you've got multiple compiled, distributed, shipped, non-updating, potentially pieces of software that have a host of versions packed into them.
- 42:10And you've got to fit into that.
- 42:12That's pretty crazy.
- 42:13And then you guys are building software that works with multiple versions of those, right?
- 42:19Because you're not building the pipeline to make a movie.
- 42:21You're building software to give to the people that are making the movie.
- 42:24So it's just, you know, a few more dimensions there.
- 42:28It actually is one of the things that really excites me about the project that I'm working on where almost for the first time, rather than building one of these just for a particular studio or as kind of just an open source project, we're trying to do it with the resources of a company like Autodesk behind it.
- 42:47Autodesk, which all of a sudden, like the jump to Python 3, which for the industry as a whole feels like it's a huge issue.
- 42:58It gives us a place where if all of these vendors for the major applications got together and said, okay, here's the version where we need to switch to Python 3.
- 43:07We could do a lot of the legwork for the industry as a whole and get stuff going and create that bridge over to Python 3, which doesn't exist if every studio had to do that themselves and manage it themselves.
- 43:22Yeah, that's really interesting.
- 43:23You're one of the few groups that lives, you basically are one of the few groups that live between all these pieces of software where everyone else is just consuming it, right?
- 43:32Exactly.
- 43:32And everyone, you know, almost every company figures out a way to get that in-between stuff written in order to automate stuff that they do.
- 43:43It's just too tedious otherwise.
- 43:45But we're kind of a central place where we can do that, which gives these software developers someone to work with in order to figure out some of the issues.
- 43:55And we definitely wouldn't encounter all of the issues that studios out there could see with the setup.
- 44:02But we at least can take it a big step further and prove that this kind of integration does work on the other side of that giant chasm.
- 44:11And here's how we did it.
- 44:12And here's the issues we found and help other people cross it.
- 44:15So another thing that you said that was kind of challenging, kind of like this version story, is PySide and PyQt.
- 44:23Can you maybe first of all tell people what that is so that everyone knows?
- 44:28And then what's the story there?
- 44:30Sure. Qt is a cross-platform C++ GUI toolkit.
- 44:37So you can build complicated applications using Qt as the components that you're using to build all of the GUI widgets and do it in a way that's cross-platform.
- 44:50So it runs on Linux and on OSX and on Windows.
- 44:55Yeah. And one thing I'd like to add about that is that's one of the few cross-platform UI frameworks that I think looks modern and really good on all the different environments.
- 45:06Like a lot of times you're like, whoa, that is definitely not native.
- 45:09That looks like a weird app or whatever, you know.
- 45:11But I think Qt or Qt, it's nice.
- 45:15Yeah. I mean, it has a rich set of widgets.
- 45:19They're very configurable.
- 45:20It ties in nicely with the native OSs.
- 45:23It's been around a while.
- 45:24It's been used in a ton of places.
- 45:25Some huge applications use Qt.
- 45:28And it's funny that you say it looks modern.
- 45:30There's actually been this divide in the Qt world between Qt4 and Qt5, similar to the kind of the jump to Python 3, where Qt5 is this big leap forward.
- 45:39And that's one of the other things that the entertainment industry is trying to navigate the jump from Qt4 to Qt5.
- 45:47And to go back to what is Qt and what is PySide, PySide and PyQt are two Python bindings to that Qt library so that you can build these cross-platform, good-looking, complicated UIs in complete Python.
- 46:00It's pretty prevalent.
- 46:01It's out there.
- 46:02It's great.
- 46:03But PyQt is not open source.
- 46:07There's licensing restrictions around it.
- 46:09It makes it hard to build a commercial product around that, even though kind of supporting it as a runtime is completely doable.
- 46:18But in order to actually run a PyQt app, you need to be licensed if it's a commercial software.
- 46:24PySide, it was the branch, was another implementation of that Python binding in order to kind of get around those licensing restrictions to make it so that within Python,
- 46:34you could build these rich GUIs without having all those licensing constraints that come with PyQt.
- 46:40The problem with PySide is that it's one of those open source projects that's kind of stalled out.
- 46:45And there has not been a version that supports Qt5.
- 46:51So ironically, one of the big reasons that the industry can't cleanly jump over to Qt5 is because Python is everywhere.
- 47:01And people have used Python to build these really awesome production tools that are Qt4.
- 47:06And there needs to be an upgrade path for all of that code.
- 47:10So figuring out how to kind of breathe some life into the PySide project and get it going has been a topic of consideration.
- 47:20And it's something that, with the help of that VFX reference platform that I talked about earlier, because they are trying to drive this jump to Qt5 because there's a lot of improvements there.
- 47:31Qt4 is starting to show some age.
- 47:33They're trying to drive some life into the PySide project in order to get this update to be possible.
- 47:41It's an interesting thing where, again, this dependency and having all of these different apps coordinate this kind of an upgrade affects how we use Python and what's possible.
- 47:51I tend to really think about, I guess, how that kind of paints you into a corner.
- 47:55I did play around with PySide and PyQt and ran into the issue of, well, the licensing on PyQt, it seems overly restrictive.
- 48:05I'm not really against commercial software, but it seems like, I don't know, it just seems harder or more restrictive than it should be.
- 48:12But then again, I tried to use PySide and it was like almost working.
- 48:16It was frustrating.
- 48:18But I knew if I could get him to work, I'd have something really cool.
- 48:21But I kind of gave up and went and did something else altogether.
- 48:23Yeah.
- 48:24We do a ton with PySide.
- 48:26It would be amazing to have it be under more active development.
- 48:32Like I said, it's almost there.
- 48:34You can do a lot with it.
- 48:35There's definitely kind of low-level issues with memory management and things like that at the interface between the Qt world and the Python world.
- 48:44that if it was under active development, we would be seeing some upgrades happen that would clean that up and make it easier to develop rich Python GUIs that are embedded in these giant applications,
- 48:57which is where we actually realize a lot of just saving artist time so that they don't have to hunt around for files or manually export things knowing the settings that they do.
- 49:12And then they can just get back to doing the creative part of their job.
- 49:19And all of that currently for a lot of places, unless they bought the license for PyQt, is done in PySide.
- 49:27Have you considered using some of the fully native options like Py, OBJ, C, OS X, and Iron Python and WPF on Windows and just having a separate UI layer?
- 49:41Definitely thought about it.
- 49:43It's a lot of overhead when something like PySide is there and you can write it once and have it work everywhere.
- 49:52Yeah, it makes perfect sense.
- 49:54It's something I've been thinking about some native apps in Python and I'm like, well, you know, how much, I guess it depends on how much of your code and complexity is in the UI itself and how much you can push down to packages that those two distinct UIs that you'd have to write would consume, you know?
- 50:12I mean, at that point, you start wondering, like, would it make sense to have the GUI level written in actually Objective-C for OS X directly and embed a Python interpreter and tie it in like that?
- 50:23Like, at that point, it being in Python, you start wondering if having that layer be Python makes sense because you're having to code it specifically for the operating system itself.
- 50:33And for the GUI work, you get to use Xcode in a really deep way.
- 50:37Right, right.
- 50:37Maybe just use Xcode and like Swift now.
- 50:39So that's pretty close to Python, actually.
- 50:41Something like that, right?
- 50:42Exactly.
- 50:43Yeah.
- 50:43Yeah, but you'd lose all the packages.
- 50:45Anyway.
- 50:45Exactly.
- 50:46And it needs to talk to the rest of the pipeline.
- 50:49Again, your general knowledge of what's going on in the production and how to translate between these different applications is usually Python logic.
- 50:59So you've got to figure out a way to talk to that.
- 51:02Yeah, yeah.
- 51:03It's a super interesting set of trade-offs to consider.
- 51:05I personally would love to see PySide really come on strong.
- 51:09But...
- 51:09It'd be amazing.
- 51:10Yeah.
- 51:10All right.
- 51:12I have just enough time for a few more questions for you before you go.
- 51:15All right.
- 51:16So if you're going to write some Python code, what editor do you open up?
- 51:19That's funny.
- 51:21I have switched over to Sublime.
- 51:24I was kind of diehard VI Vim for a long, long time.
- 51:28And Sublime was the first thing that I saw that I was like, okay.
- 51:30It's fast enough to launch and fast enough to get going that it competes.
- 51:35There's still definitely some stuff that I miss from them.
- 51:40But I've grown addicted to multiple cursors.
- 51:43Yeah.
- 51:45Okay.
- 51:45Very cool.
- 51:46Yeah.
- 51:46I like Sublime as well.
- 51:47That's nice.
- 51:49There's, you know, many thousands of packages out on PyPI that people can go grab.
- 51:55What are some of your favorites that maybe not everyone knows about that they should check out?
- 51:59Oh, man.
- 52:00I mean, it's not on PyPI.
- 52:02But I do think PySide and kind of being able to build a GUI in complete Python and then even package it up with like Py2XE, Py2App or that kind of flavor of that is a pretty amazing thing for people to do.
- 52:17It's just kind of cool to be able to take something and actually hand it off as a self-contained thing to somebody else to run.
- 52:24Yeah.
- 52:26That is really cool.
- 52:26And I don't think I or any of the guests have spoken about Py2App or Py2XE or CXFreeze or any of those categories of things.
- 52:36Maybe you could just tell everyone out there, like those you can go pip install at least one or two of them, I think.
- 52:41Yeah.
- 52:42Some of them just come with the Python distributions.
- 52:45So it's a way of basically compiling down and freezing the Python interpreter and your code together as a native executable.
- 52:55So on OSX, the Py2App will actually create a bundle that has all of the Python embedded in it.
- 53:04And the same thing with Py2XE.
- 53:05You get a standalone EXE that you can run on Windows and it'll run your code.
- 53:10So if you combine it with PySide, then you get this EXE that you double click on and you don't even necessarily know that you're running Python under the hood.
- 53:20You got to take the code that you wrote and the speed with which you got to develop it because it's all scripted and you're able to put it together with something like PySide.
- 53:31And at the end of the day, you end up with this self-contained thing that you can just email to somebody without them having to set up any infrastructure under it and they'll be able to run it.
- 53:39Yeah, that's really cool.
- 53:40And you can, it takes your packages and everything, right?
- 53:43Yep.
- 53:43It embeds it all.
- 53:45Yeah, I haven't had a real good use case for that because I mostly do web stuff.
- 53:48But yeah, it's really cool to think, you know, instead of zipping up a bunch of scripts and sending them, I go, oh yeah, and you need to, you know, pseudo-pip install this while you're at it.
- 53:57Just go, you know, here's your .app, double click it.
- 54:00Or here's your .exe, double click it.
- 54:02It's great.
- 54:03Nice.
- 54:04Final call to action or anything people should check out?
- 54:08Let's say there's calls to action.
- 54:12Then people who are interested in open source development and the PySide, I would recommend that.
- 54:17It would be amazing to get people interested in that again.
- 54:19All right.
- 54:20Awesome.
- 54:21And how do they find this project that you're working on?
- 54:23Is it something that's out or something you're working on still that's going to come out?
- 54:27It is out in a beta form.
- 54:30There's a production management software that Autodesk sells called Shotgun.
- 54:35You can go to shotgunsoftware.com.
- 54:37And everything that I've been talking about is the pipeline developer section of that.
- 54:43So the project is Toolkit.
- 54:44We're the pipeline toolkit for Shotgun software.
- 54:48All right.
- 54:49It sounds like a really interesting project.
- 54:51And definitely got a fresh look at all the barbs that live in the different versions of all these things.
- 54:59Yeah.
- 55:00I would say if people are kind of interested in the stuff that I was talking about, the project that we work on is source shared.
- 55:06We've got public repos on Git.
- 55:11The license is you kind of have to be using Shotgun as a product in order to use the project.
- 55:17But all of the Python code is there for people to look at, improve upon.
- 55:22We try to do it as a very open project so that everybody that does this kind of work can join together as a community.
- 55:29That's great.
- 55:31It's been really fun talking to you, Rob.
- 55:33Thanks for being on the show.
- 55:34Thank you.
- 55:35It's been a pleasure.
- 55:35Yeah.
- 55:36Bye-bye.
- 55:38This has been another episode of Talk Python To Me.
- 55:40Today's guest was Rob Blau, and this episode has been sponsored by SnapCI and OpBeat.
- 55:45Thank you guys for supporting the show.
- 55:47SnapCI is modern continuous integration and delivery.
- 55:50Build, test, and deploy your code directly from GitHub, all in your browser with debugging, talker, and parallelism included.
- 55:56Try them for free at snap.ci slash talkpython.
- 56:00OpBeat is mission control for your Python web applications.
- 56:03Keep an eye on errors, performance, profiling, and more in your Django and Flask web apps.
- 56:09Please take a moment to check out the online course Kickstarter at talkpython.fm/course.
- 56:15You get a discount for the course by signing up early and the satisfaction of helping create something amazing.
- 56:20You can find the links from this show at talkpython.fm/episodes slash show slash 46.
- 56:27Be sure to subscribe to the show.
- 56:29Open your favorite podcatcher and search for Python.
- 56:31It should be right at the top.
- 56:32You can also find the iTunes and direct RSS feeds in the footer of the website.
- 56:37Our theme music is Developers, Developers, Developers by Corey Smith, who goes by Smix.
- 56:41You can hear the entire song on talkpython.fm.
- 56:43This is your host, Michael Kennedy.
- 56:45Thank you so much for listening.
- 56:47Smix, take us out of here.
- 57:06First, developers, developers, developers, developers, developers, developers, developers, developers, developers.
- 57:11you