Unity помогает управлять толпой в The Relative Worlds

Японская студия Craftar использует технологии 3D реального времени Unity для моделирования сложных сцен с большим количеством людей.

Craftar Studios: пример использования Unity в разработке

Craftar’s recent feature film, The Relative Worlds, includes dramatic sequences in the world’s most populous city, but their existing rendering solution couldn’t easily handle the most complex scenes. So they turned to Unity’s real-time 3D capabilities to achieve their goals.

  • Цель

    Создание сложных сцен с толпой в The Relative Worlds

  • Платформы

    DLP/SXRD (выпуск для кинотеатров)

  • Project staff

    Около 10 пользователей Unity (художники по моделям, аниматоры, компоновщики и программисты)

  • Регион

    Токио

The Relative Worlds trailer

Возможности разработки и графики реального времени Unity ускорили разработку проекта и сократили затраты на рендеринг.

Основное действие The Relative World происходит в Токио, в плотно застроенном небоскребами и густонаселенном районе Синдзюку с самым загруженным железнодорожным вокзалом в мире. Для визуализации нужно было сложное моделирование и рендеринг, а повторяемость сцен требовала нового подхода и мощных алгоритмов рендеринга, поэтому студия и выбрала Unity для работы с этими сценами.

Результаты

  • Ускорение разработки проекта путем построения и настройки эпизодов (производство в реальном времени) вместо работы с отдельными отрывками (производство по каскадной модели).
  • Легкость создания и обновления сложных сцен с большим числом анимированных элементов благодаря технологии вложенных префабов. 
  • Реалистичное поведение толпы с использованием NavMesh для настройки циклов ходьбы как с автоматическим поиском пути, так и без него. 
  • Сокращение затрат на производство благодаря рендерингу в Unity, а не в традиционной для студии 3D-программе.

Анимация параллельных миров для юных зрителей

The best science fiction enables better understanding of age-old issues. For Yuhei Sakuragi, the film’s writer and director, animated sci-fi is a powerful storytelling medium, and he’s applied it to a specific goal: awakening Japan’s youth to the fragility of peace and the specter of conflict. “Few remember what it’s like to live through a war, so youth in today’s Japan have little idea of what war is really like.” 

The Relative Worlds is a story of parallel universes: a high-school student in a relatively tranquil, colorful world confronts a doppelgänger from a dark, war-torn nightmare. Yuhei uses the stark juxtaposition to shock and awe: “I want people, especially the young, to think seriously about Japan’s future in case these relatively peaceful times suddenly come to an end.”

Создание сложных сцен с участием толп людей

Since Yuhei wanted the film to reflect the real world, he chose Shinjuku for the setting as it’s one of the most iconic locations in modern Japan. This meant the team would need to draw and render large animated crowds. However, because it would be too difficult to do it with their traditional 3D software, they tapped Unity.

“We were planning to create huge and repetitive sequences such as crowded street scenes, so we knew we would need file reference and namespace options to easily load and edit our original model/rig files,” says Ken Uchida, Craftar’s lead animator. “But we didn’t have those options in our standard 3D rendering tool. To build these scenes, we also took advantage of Unity’s capabilities like nested Prefabs, relatively light scene-loading, and Navigation Mesh (NavMesh).”

In contrast to Craftar’s traditional rendering tool, Unity manages data based on assets rather than just individual shots. That allowed the team to build entire crowd sequences with nested Prefab assets, which provided them with a more comprehensive – and faster – production method. As the name suggests, nested Prefabs contain other Prefabs, which retain their links to their own assets, so any updates are reflected throughout the scene in real-time. (In Unity, a Prefab is a GameObject that includes all its components and property values, making it easy to duplicate, modify, etc.)

Движение толп с помощью NavMesh и алгоритмов машинного обучения

Одной из трудностей работы с огромными массивами анимированных элементов является управление их движениями, поэтому Кен воспользовался встроенным инструментом Unity NavMesh. «Я использовал NavMesh двумя разными методами. Во-первых, я использовал его для постановки большинства кадров с толпой, пересекающей улицу. Для этого я подготовил несколько FBX-файлов шаблонов с циклом ходьбы и настроил параметры NavMesh для каждого цикла. Поначалу я пытался рандомизировать выбор цикла и скорости ходьбы с помощью скрипта, но в итоге я настроил их вручную для большей реалистичности».

Кроме того, студия также воспользовалась возможностями машинного обучения от Preferred Networks, чтобы реализовать циклы ходьбы с автоматическим поиском пути для NavMesh. Вычисления выполнялись на сервере Preferred Networks, с которым сотрудники студии работали из Unity, проверяя каждый созданный цикл ходьбы. Они задавали скорость, точку назначения и другие параметры NavMesh непосредственно в Unity.

Добавление реалистичных теней

To finesse the crowd scenes, Craftar customized Unity’s Recorder to capture frames that had previously been rendered outside Unity. Then they applied the Unity-Chan Toon Shader (UTS) to optimize cel-shaded images, particularly with shadows that accentuate every part of the character models. UTS does this by automatically adjusting the position and intensity of light sources in character design. 

To further enhance shading, Ken adds, “We relied on Unity’s Timeline feature in conjunction with Shader Forge. For shading in our next project, we’re planning to try Shader Graph and Visual Effect Graph.” Shader Graph lets developers easily author shaders by building them visually and seeing the results in real-time, connecting nodes in a network graph instead of having to write code. Visual Effect Graph creates a wide range of node-based VFX, also with a visual, real-time UI. 

Изучение новых творческих миров с Unity

While Craftar only used Unity for portions of The Relative Worlds, Yuhei is sold on the platform and its deep toolset for artists and other creatives. For example, he looks forward to producing an entire animated film in Unity. “I’d really like to make something that highlights many of Unity’s unique features.”

So as well as looking forward to using Shader Graph and Visual Effect Graph, Yuhei sees the promise of Unity’s upcoming ray-tracing capabilities. “Shadows are particularly difficult to do for crowd scenes, so I can’t wait to see Unity’s new features for challenges like that.”

Finally, Yuhei sees another big advantage of using Unity for future projects. “Since Unity makes it very easy to create mixed media simultaneously, we’ll be able to produce game and/or virtual reality content at the same time we’re working on a film project.” And that perfectly reflects this innovative Japanese studio’s motto: “To create new ways of creating.” We’re excited to see what Craftar launches next.

Ken Uchida, Lead Animator, Craftar

«Для разработки этих сцен мы также воспользовались возможностями Unity, например, вложенными префабами, простыми алгоритмами загрузки сцен и Navigation Mesh (NavMesh)».

Ken Uchida, Lead Animator, Craftar
Yuhei Sakuragi, Writer and Director, The Relative Worlds

«Поскольку Unity сильно упрощает одновременную разработку контента для разных медиа, мы можем создать игру или VR-приложение одновременно с фильмом».

Yuhei Sakuragi, Writer and Director, The Relative Worlds

Мы используем cookie-файлы, чтобы вам было удобнее работать с нашим веб-сайтом. Подробнее об этом можно узнать на странице, посвященной политике использования cookie-файлов.

Согласен