♪ [MUSIC] ♪
[NARRATOR] Welcome to Unite Now, where we bring Unity to you
wherever you are.
[RUS] Hello, everyone.
Welcome to Power to the Artists: The Evolution of 2D Game Tools.
I'm Rus Scammell, the Technical Product Manager
for 2D at Unity Technologies.
Today, we're going to start with an overview of our 2D roadmap.
Next, we'll look at some outcomes that a lot of 2D projects
are interested in, and we'll see how our new features
come together to make these outcomes more achievable.
Let's briefly recap what 2D tools
are currently released in five areas:
foundational features,
Worldbuilding, Animation, Graphics, and Physics.
In Foundational features, we have Sprites.
We also have a Sprite Atlas to combine the Sprites
into a single sheet.
We use Sorting Groups to control
which renderers get rendered together.
And Axis Distance Sort to sort your Sprite renderers
by distance along an axis.
And our new PSD Importer to import Photoshop files
while maintaining layer information.
This is very useful when importing multi-layered characters
in preparation for rigging.
For Worldbuilding, laying out 2D can be as simple
as using loose Sprites or 9-Sliced Sprites.
But for more powerful grid-based layouts,
we have Tilemap in Rectangular, Hexagonal,
and Isometric grid flavors.
These can be super-charged with Scriptable Tiles and Brushes.
A recent release is Sprite Shape,
our solution for more organic levels.
In the area of Animation, we have our Sprite-Rigging toolset.
This includes a Skinning Module for adding and editing Bones,
as well as generating and refining Geometry and Weights.
And a Sprite Skin component
that binds this all together in the Scene.
As for Graphics, you can render Sprites with Sprite Renderers.
Sprite Mask gives you control over which parts of your Sprite
to reveal or hide.
More recently, Pixel Perfect Camera ensures your pixel art projects
render accurately.
This also works with Cinemachine
via the Pixel Perfect camera extension.
And, of course, Physics.
With 2D Physics, we provide
a Rigidbody-based Physics system for 2D.
This comes with Colliders, a Composite Collider
that combines other colliders for better performance,
and a large collection of 2D Joints and Effectors.
Let's take a look at what features are currently in pre-release
for you to try out.
In foundational features, we've also updated the Hub Template
for new 2D projects.
This now includes all verified 2D packages,
and because they are pre-compiled, it also loads much faster
than installing all the packages manually.
Check this out in Unity 2020.1.
Experimental Sprite Atlas version 2 uses an Importer workflow
that supports Cache Server and other Asset Database v2 features.
Sprite Shape has a new Stretched Corner option
that doesn't require a corner Sprite to be defined.
And 2D Animation has two experimental features
to support Sprite Swapping
in the form of a Sprite Library and a Sprite Resolver.
There are lots of exciting developments in 2D Graphics,
and these are focused around the new 2D Renderer
in the Universal Render Pipeline.
These include 2D Lights, 2D Shadows,
and Shader Graph Master Nodes for Lit as well as Unlit Sprites.
And in Physics, there are improvements
to Rigidbody2D XY Position Constraint,
which makes a Rigidbody completely solid under any force
and has almost zero run-time cost.
We have Per-frame Auto-Simulation which enables Physics to refresh
at the same rate as the rendering cycle,
providing smoother physics and visuals.
Finally, the Edge Collider 2D
now lets you control the Stop and Endpoints
to allow edges to overlap other colliders
to maintain a continuous surface.
Over the next few cycles, the focus for 2D is to continue
to maintain stability of the feature set
and to improve performance and workflows.
Okay, let's switch gears and look at how the 2D features
can be used to address some outcomes in 2D games.
We will be doing this using assets from the
The
alongside the 2D and evangelism teams in Unity.
The goal was to see the tools used together
and to raise the quality bar for 2D games in Unity.
This production resulted in many 2D outcomes being addressed
that are important to those of you developing 2D games.
Let's spend some time looking
at how the new 2D features work together
to enable three of these, namely an Organic 2D world,
a Bone-based character
and Natural Lighting in 2D.
We're going to explore the aspects that were important
to the creation of an organic 2D world.
These include organic terrain, dappled light,
and dust and pollen that moves in the wind.
To achieve this, we're working with the following features:
Sorting Groups, Sorting Layers,
Sprite Shape, 2D Lights, and Particles.
As we look at the Scene, the first thing to realize
is that's it's made of multiple Layers.
We control the Sorting Order of all these Layers
with Sorting Layers and Sorting Groups.
The terrain is made of multiple Sprite Shapes.
Sprite Shape is a flexible and powerful world-building tool
that features Sprites tiling along a shape's outline
that automatically deforms and swaps Sprites
based on the angle of the outline.
Sprite Shapes work well with the 2D Polygon and Edge Colliders.
And the collision shape adapts to the Spline when it is edited
so designers don't have to do the additional work
of getting the collision to match the visuals.
The Sprite Shape here uses a couple of tricks
from the Sprite Shape Extras,
which is included with the package.
These Rocks are attached to nodes on the Sprite Shape,
so when you edit the shape, they remain grounded on it.
These Flowers are also a Sprite Shape.
They use a conformer script
so that we can just edit the shape of the Grass
and the Flower Sprite Shape conforms to it.
The new 2D Lights work with Particles
and these are used here to add dust and pollen motes
in the sunshine.
Now the result of all of this is an organic level
that is easy to iterate on.
Multiple Layers of visuals that can be edited together
and Collision Shapes that adapt to those visuals.
Bone-based 2D characters are a powerful alternative
to Sprite sequences.
A single Sprite or a small set of Sprites
can be assembled together to make a character.
Animation data is then decoupled from graphics to save on build size
and to improve production flexibility.
Some things we care about here are the Sprite rigging workflow
and Physics-controlled Joints.
To achieve this, we're working with the following features:
2D Animation, 2D PSD Importer,
2D Physics, and Rigidbody2D
along with the 2D Colliders and 2D Joints.
We start in Photoshop,
where an artist has created a character
made of multiple Layers.
We can see the different parts of the character
are on separate Layers.
There may also be hidden Layers in the file
where reference images or construction history might reside.
We'll export this character as a .psb
so that it can be imported into Unity.
Once we're in Unity, we simply drag the .psb file into the project.
This is where the PSD Importer takes over.
Now we've imported the character with a Mosaic
and Character Rig option.
This gives us an automatic Sprite Sheet
and a Hierarchy of Sprite Renderers in preparation for rigging.
When we open this in the Sprite Editor window,
we can switch to the Skinning Module
to generate Geometry at Bones and paint Weights.
Here we have a character where we've already generated
the Geometry and added the Bones as well as painted the Weights.
While we worked, we were able to preview along the way.
And when we're done, we simply hit Apply.
We drag the character into the Scene
for posing and animation.
We can see here that a Sprite Skin
has been automatically added to each Sprite
to drive the influence of the associated Bones
that we defined in the Skinning Editor.
The long ponytail is controlled by a series of Hinge Joints 2D
that inherit the motion of the character.
These Joints use Angle Limits between -5 and 5
to make sure that there isn't too much self-intersection
and that the simulation stays nice and stable.
Now the result of all of this is multiple animation clips
created from one piece of art,
a multi-layered character with depth,
a mixture of key-framed motion and physically simulated motion
and a production process that supports rapid iteration,
especially when compared
to producing animated Sprite sequences.
Let's look at natural lighting in 2D.
The major aspect that we want to look at here
is achieving natural lighting,
and then changing that lighting for different times of day
with scripts and gradients.
To achieve this, we are working with the following features,
the new 2D Lights, which include Global Lights,
Point Lights, Sprite Lights, and Freeform Lights.
All the 2D Renderers in Unity respond to 2D Lights.
That includes Sprite renderers, Tilemap renderers,
as well as Sprite Shape renderers.
In this Scene, the Global Light is used as a base Layer.
2D Point and Spot Lights are being used to simulate light
that is coming from a single point.
Freeform Lights are adding broad strokes of light
in the trees and grass,
and 2D Sprite Lights which use Sprites as light cookies
are adding dappled light,
simulating light that has passed through a leafy canopy.
Okay, let's look at the Light Color Controller here.
Now this has a slider that goes from zero to one,
and it defines an interface.
And some of the children of this GameObject have scripts
that implement this interface.
When the slider value is changed, we iterate through all the children
that have scripts that implement this interface,
and we set either their Material colors
or the light colors of their children.
This can also be used to drive transparency values as well,
so some objects can appear or disappear as needed.
For example, the stars and the night spirits
that we see in this Scene.
The result of all of this is we can reuse a set of graphics
by adding mood and depth in different lighting conditions.
And we can change all of this dynamically
so we can preview it easily in the Editor.
Now let's talk about where you can get your hands
on all of these features and samples.
For all of the 2D packages
as well as the Universal Render Pipeline and Cinemachine,
you can get these from Package Manager.
From 2020.1 onwards,
the new 2D template will include all the verified 2D packages
so you won't even have to do anything.
We've recently re-released
our Physics samples project on GitHub,
and you can get it at this link.
And the Lost Crypt sample project
is available on the Unity Asset Store.
We are making these tools and features
to power your 2D games and experiences.
So, of course, we want to stay in touch.
Please drop by the 2D forums at this link.
The 2D team at Unity wants to hear about your projects and your teams.
Please share your workflows with us.
Tell us what works, what doesn't,
and what we might have missed.
Most important of all, keep making amazing 2D experiences in Unity.
Thank you.