VFM02: Unity 5 Realtime Render Test

Within literally a single minute of opening Unity 5, I had created a new project, dropped in my (very work-in-progress) Maya scene, and bam: rendering exactly as I wanted by default… in realtime. I spent only an additional 30 minutes loading up and tweaking scripts to calibrate Unity’s camera, getting a more polished look (anti-aliasing, vignetting, chromatic aberration, slight bloom, depth of field, screenspace ambient occlusion, etc). The prototype image is nothing breathtaking (yet!) — this test is entirely about process, efficiency, and effectiveness.


For virtual filmmaking, this blows Maya out of the water for rendering, even though it isn’t as perfect as a Maya render can ultimately get. The trade off is minimal. It took me a half an hour to get this set up and only a split second to screenshot it at 2K+ res. Getting additional shots as I develop this set is going to be a simple process of opening up Unity again with changes made in Maya automatically updated in the scene, kicking off and launching a build, and taking screenshots through cycling around the same anchored cameras. We’re talking minutes, instead of hours or days. Imagine, rendering a 60 second animation will take exactly 60 seconds… instead of two days… and it will look like filmic CG. We are now there.

Beyond getting instant renders, the ability to iterate and review has launched into warp speed here, freeing up more time to try even more things and get the shot just right, ultimately through less work. And if I’d want to change things much later along in the project, going back, making that change, and getting a new capture will be trivial compared to Maya, especially for animated shots. Setting up new shots, like below, took seconds.


I spent all day yesterday in Maya trying (and failing) to achieve a render as good as this: learning and tweaking render settings, quality levels, and testing lighting with lengthy (40 minutes to 2.5 hours) single still image test renders between 2K and 4K. With every tweak, I’d have to wait minutes for IPR to re-render even a 10% scaled preview so I could (barely) see how my changes were taking effect in as practical a workflow as it could provide.

Compared to that, the benefits of using a game engine to render in realtime are enormous, especially for an indie or small team studio. Only now that game engines can render graphics this well is that even professionally viable. Literally, Unity 5 was released yesterday. Machinema is not a new concept, but machinema now possible at this ‘next-gen’ level of quality certainly is new indeed (and it’s only going to get better from here).

I wouldn’t expect a multi-million dollar funded film and VFX house to jump over to this (though they too might find this as appealing), but for one guy wanting to tell a cinematic story on a no/micro budget, this presents a huge advantage. Additionally, I can create assets for both a film and a future related video game simultaneously, preparing them all in-engine as I go. That is also enormous.


There are a few issues I’m aware of right off the bat:

1) Resolution — My now four-year-old 27″ iMac has a maximum resolution of 2560×1440. When I bake a build and run it, that’s the best I can get for the realtime render from a direct screenshot or video capture. This is perfectly sufficient for the current (outgoing) standard of 2K (1080p), but I’m going to want to get 4K renders at least, if possible. There are two solutions to this off the top of my head: 1) get the new 5K iMac. Then screenshots can actually be more than 4K when running a build at fullscreen. 2) DVI-to-HDMI my existing iMac to a 4K UHDTV as a second monitor and run the build over there. Of course, both of these solutions are a tad ridiculous and certainly expensive.

UPDATE 2015.03.05: 3) The Unity Asset Store has plug-ins that will do screenshots at any resolution– even video capture. There’s a $20 one called Screenshot Creator, but upon loading it into Unity 5, I got a bunch of errors and it was unusable. There’s a free one, Instant Screenshot, which works, but it doesn’t render with camera effects. I could get an 8K render and scale it down to 4K in Photoshop to artificially create anti-aliasing at least, but I lose all other desired effects, especially depth of field. That’s probably the most viable solution so far. It still beats the heck out of waiting hours for a Maya render at 4K. You have to wonder why a game engine doesn’t have the ability to take screenshots at any res as a built-in feature, especially these days– but I guess that’s why the Asset Store is great if not often frustrating as various assets often break or don’t play nice with others.

2) Performance Framerate — Running this build on my four-year-old iMac, I got 17fps at first. All the camera effects dragged this down. I may be able to have a ‘naked’ camera (no effects) and replicate those effects in post via After Effects. Now, if the objective is to just get still image plate renders and bring them into Photoshop and After Effects, this doesn’t even matter. But, I’m increasingly considering going all-CG with filmmaking, at least for some of the types of projects I want to do, which means I’ll need to animate. Doing everything in Unity allows me significant animation advantages, I’d think, since I can review playback and iterate in realtime. So, one solution is I could get a much cheaper Windows gaming PC with super-beefy specs and use that to capture engine video over at least 30fps to 60fps performance runtime (the capture would only get probably 30fps at best, but for film I only need 24 and will drop the video down to 24fps in After Effects anyway). Alternatively, maybe the 5K iMac can run this stuff sufficiently, which means getting it would kill two birds with one stone. But performance framerate will be exceptionally important not only to get a clean capture, but to also ensure voice actor performances and animations all sync up as intended on realtime playback.

(Later, I did some tests and discovered the screenspace ambient occlusion on the camera tanked the framerate most. Camera Motion Blur even lead to crashes consistently. Without them, I could get anywhere from 36 – 155fps (???) on my old machine and can simply bake ambient occlusion instead. With no camera effects, I get perfect 60fps+.)

3) Limitations of Realtime Assets — The gap on this is closing, especially now, but there will be certain limitations on realtime assets, when in Maya you can have as many polys and as high-res texture maps as your system can handle. I’d say it’s very likely a hybridization between using game engines and Maya to render elements of varying complexity is the way to go, compositing them together in post. For example, I can use a game engine to render environments, but use Maya to render characters. Or I can do multiple passes in a game engine by simply turning on and off layers of game objects or making them invisible, like in Maya. But ultimately— this issue may actually be an advantage, as it will force me to develop assets through games practices that prep two types of product for the same IP simultaneously: films and video games.

4) Less than Perfect Rendering — The contemporary game engines of today do a damn good job, but of course not as good as something meticulously set up and rendered multiple times in passes through Maya with Vray. Still, this is maybe something I’d just have to accept as a trade-off for working this way in exchange for the enormous time saving advantages. To work around this, I can always enhance capture in Photoshop and/or After Effects manually, which is likely still saving time. And I have to ask myself, do I really have the time or any ability to create a renderfarm to do this in Maya practically anyway? That’s probably a stretch, especially for something more than just a short film. Finally, what if photo-realism isn’t the goal for a CG-film project, but instead a stylized hyperrealism? Then this will matter much less. Look how amazing this recent short CG film is in its totally stylized look fit for a game engine, made by three people: Le Gouffre — inspiring! They even talk about how they enhanced every single shot with a ton of layers in After Effects to fully maximize their film’s look, so there really is no requirement that the plate render be perfect either way.


Using this layout, I have a 1920×800 (2K CinemaScope) Game Viewport,
so I can grab render captures directly out of the Editor without
even having to kick off and launch a build at all.

Overall, not too bad. Will be thinking a lot about this in the future. I will probably be upgrading my Unity 4 Pro licenses to Unity 5 Pro very soon. At this point, I’ll be returning to modeling up the VFM02 set again now, knowing I can get a render of it at a desirable quality without having to painfully mess with Maya’s rendering and lights any further. This changes my virtual filmmaking formula, which is why I love prototyping– that’s exactly what VFM02 is all about.

UPDATE: 2015.03.04.23:11

Did a camera flythrough animation and video capture test. With all camera effects on, I’ll need stronger hardware to get this at a perfectly smooth playback in realtime, as it ended up dropping frames occasionally. Otherwise, I might be able to get it at a better framerate with effects off (UPDATE: yep, at perfect 60fps), and then simulate them in post via After Effects.


For comparison, this same shot took Maya two days to render when I did it for VFM02’s initial graybox edit back in January. Using Unity 5 and lossless screen capture, I got this in a high-definition 2KSCOPE .mov within 30 minutes.

IMDb / LinkedIn

← Blog Home