lighting


CGI Coffee

New Unity 2019 2D Sprite Rigging and Lighting Tools

With the latest 2019.1 update the Unity team has seriously upgraded the 2D toolset of the editor:

Seems like a lot of those tools were inspired by the Rayman Legends engine. Something I was drooling over 5 years ago, hoping one day Unity would implement some of those. And they finally did!

It really makes me all warm and fuzzy inside, remembering how most of those automated 2D tools and thingies were not available when I was working on Run and Rock-it Kristie in the freeware version of Unity 4 (which back then lacked even the Sprite packaging functionality!) and had to be either developed from scratch or achieved with some cool Asset Store stuff you would need to purchase and integrate into your product.

memories

Oh, The Tools... The Tools...

IK and rigging with bone weighting? Check:

Manual sprite atlasing and setup? Check (atlasing is vital for mesh batching and draw call reduction):

manual-atlasing

Sprite assembly and animation? Check:

Dynamic level-building tools? Check (with a modded version of the Ferr2D asset):

Dynamic lighting? Check! — With up to 4 live vertex lights and light culling based on camera distance to make sure the game would run at a stable 60 fps on an iPhone 4 (heavily reliant on the amazing but now deprecated Core Framework asset by echoLogin):

It Was... Fun!

You know what I also remember? Almost every day working on the game, I felt excited and driven. It was FUN. Even when it was challenging to solve some technical issues (there were a lot of those, especially for a beginner) or work around Unity limitations or bugs, it felt truly rewarding and would give such a powerful motivation boost that I would continue working until the end.

Until the release.

manual-atlasing

But the "serious" CG movie stuff I'm doing now? Honestly? Meh. It's so slow and clunky compared to my previous game development experience. Everything needs to be either cached or rendered... I'm also having some grave issues with hair simulation, which I wasn't able to overcome in the last 6+ months. Many operations in the "classic" world of 3D editors are still either single-threaded, unstable, or require some very specific knowledge or particular and elaborate setup... It's almost no fun! No fun means there's much, much less motivation to continue.

It's a problem.

manual-atlasing

Therefore, this July I'll be checking out the latest Unity Engine and seeing whether most of what I'm doing right now could be ported into Unity. Starting with simulation and scene assembly, and hopefully ending up animating, rendering, and applying post effects right within the Unity Editor where everything is real-time and fun! I miss the real-time aspect! Oh boy, do I miss the ability to tweak materials and see the more or less finalized render of the scene even during assembly. The ability to import assets and build "smart" prefabs (like Softimage Models, but with interactivity and intrinsic scene-aware scripting via MonoBehaviour) etc...

I miss you, Unity!

Unity and Unreal Engine: Real-Time Rendering VS Traditional 3DCG Rendering Approach

(Revised and updated as of June 2020)

Preamble

Before reading any further, please find the time to watch these. I promise, you won't regret it:

Now let's analyze what we just saw and make some important decisions. Let's begin with how all of this could be achieved with a "traditional" 3D CG approach and why it might not be the best path to follow in the year 2020 and up.

The Linear Pipeline and The One Man Crew Problem

I touched upon this topic in one of my previous posts.

The "traditional" 3D CG-animated movie production pipeline is quite complicated. Setting aside pre-production and animation/modeling/shading stages, an A-grade animated film treats every camera angle as a "shot" and these shots differ a lot in requirements. Most of the time, character and environment maps and even rigs must be tailored specifically for each shot.

tintin-shot-to-shot-differencesShot-to-shot character shading differences in the same scene in The Adventures of Tintin (2011)

For example, if a shot features a close-up of a character's face, there is no need to subdivide the character's body each frame or feed it to the renderer. However, this does mean the facial rig requires more controls, and the face probably needs one or two additional triangles plus a few extra animation controls/blendshapes, along with displacement/normal maps for wrinkles and other details.

The fundamental issue is that the traditional pipeline is inherently linear.

Digital Production Pipeline

As a result, you will only see true production-quality images very late in the production process. This is especially true if you rely on path-tracing render engines and lack the compute power to render hundreds of frames at scale. After all, this is an animated feature running at 24 frames per second. For a short 8-plus-minute film, that translates to more than 12,000 still frames. And they aren't straight-out-of-the-renderer beauty shots. Each final frame is a composite of several separate render passes, plus special effects and other elements layered on top.

Now imagine that at a later stage of the production you or the director decides to make adjustments. Well, shit. All of those comps you rendered out and polished in AE or Nuke? Worthless. Update your scenes, re-bake your simulations and render, render, render those passes all over again. Then comp. Then post.

Sounds fun, no?

You can imagine how much time it would take one illiterate amateur to plan and carry out all of the shots in such a manner. It would be just silly to attempt such a feat.

Therefore, the bar of what I consider acceptable given the resources available at my disposal keeps getting...

Lower.

There! I finally said it! It's called reality check, okay? It's a good thing. Admitting you have a problem is the first step towards a solution, right?

Right!?..

welcome-to-aa Oups, wrong picture

All is not lost and it's certainly not the time to give up.

Am I still going to make use of Blend Shapes to improve facial animation? Absolutely, since animation is the most important aspect of any animated film.

But am I going to do realistic fluid simulation for large bodies of water (ocean and ocean shore in my case)? No. Not any more. I'll settle for procedural Tessendorf Waves. Like in this RND I did some time ago:

Will I go over-the-top with cloth simulation for characters in all scenes? Nope. It's surprising how often you can get away with skinned or bone-rigged clothes instead of actually simulating those or even make use of real-time solvers on mid-poly meshes without even caching the results... But now I'm getting a bit ahead of myself...

Luckily, there is a way to introduce the "fun" factor back into the process!

And the contemporary off-the-shelf game engines may provide a solution.

game-engines