Using lessons learned from working on AAA 2D games, a 4-strong indie team set out to create a complete pipeline for creating modern 2D games with an organic feel and a high level of polish... on indie-scale resources.
The tools and techniques developed to reach that ambitious goal will be presented, from the innovative animation system, the terrain, vegetation and level art system, to the effective but powerful rendering model, and more.
Intended audience & prerequisites: Anyone working on a 2D game: programmers, animators, level designers, level artists.
The talk will be of particular interest to teams using Unity, but rather than being purely technical, the talk will outline principles that can be applied in any engine.
Session takeaway: I believe 2D has a great future ahead of her, and that we can do much more with it. I intend to demonstrate how to improve the production pipeline, and invest in tools to become more technical the way 3D does, while retaining the unique advantages of 2D.
Game Credits:
Rayman Origins (Ubisoft Montpellier)
Rayman Legends (Ubisoft Montpellier)
Tetrobot and Co. (Swing Swing Submarine)
Seasons After Fall [working title] (Swing Swing Submarine)
Six Myths about Ontologies: The Basics of Formal Ontology
Benoit fouletier guillaume martin unity day- modern 2 d techniques-gce2014
1. Modern 2D Techniques
for indie teams with Unity
Benoit FOULETIER - @benblo42
Guillaume MARTIN
Swing Swing Submarine - @swingswingsub
Unity Day – GameConnection Europe 2014
8. So... “modern 2D”?
• Flat objects in a 3D world
• Perspective rendering
• Reusable assets
• In-engine composition
• Organic design (no grids)
9. Been There Done That™
• UbiArt games*
• Broken Age
• Ori and the Blind Forest
• Vanillaware
• many others…
* Benoit worked on
Rayman Origins
& Legends
45. background 2
background 1
playground
foreground
Rendering: Slices
• Each slice is blending with the previous ones
• Overdraw land!
• Overdraw can be limited with Z prepass
46. Rendering: Per Slice Effect
Each slice can:
• Have its own lights
• Make some effects (blur, distortion, etc)
• Have custom ambiant color
47. Rendering: Lighting & Vector Masks
• Carpet geometry
• No texture necessary
• Fade out with vertex color
on outline
48. Rendering: Lighting
• Front light: simulate diffuse lighting, blend with ambiant color
• Back light: simulate fresnel lighting, reveals details
+ =
Front light Back light Combine
49. Rendering passed for 1 slice:
• Light pass:
render back (a) and front (b)
light buffers (~G-Buffers)
• Objects pass:
while rendering objects, compute
back mask (c) and front pixel color (d).
Access light buffers to know pixel lighting (e)
• Post slice effect can occurs (blur, distortion)
Repeat the process for all slices
(e)
Rendering: Lighting
(a)
(c)
x
(b)
(d)
x
+
53. Rendering: Post Process
• Post Process consists mainly of Bloom (HDR on)
• Color remap is somthing we will certainly use
54. Rendering: Lighting, Pros and Cons
Pros:
• Scalable (unlimited number of
lights)
• High blending control
• Reuse carpet
• Don’t need precise shapes
• Sprites can be used if precision
needed
55. Rendering: Lighting, Pros and Cons
Pros:
• Scalable (unlimited number of
lights)
• High blending control
• Reuse carpet
• Don’t need precise shapes
• Sprites can be used if precision
needed
• Slices decomposition make
scene edition very clear
Cons:
• Need « back mask » (we don’t
have normals)
• Hard to make volumetric lights
(will require extra buffers)
• Lights have no orientation (will
require extra buffers)
• Slices decomposition have
some limitation (a light or
effect will at least affect the
whole slice)
56. Rendering: Sorting
Using Order in Layer:
• Maintain a list of RenderItems (a RenderItem linked to each Renderer)
Most significant bit Least significant bit
• Sort the list based on a custom sorting weight:
• Inject the index in the list in Order In Layer before rendering
Front light
Z position « sub object order » Hash based on Renderer
57. Rendering: Implementation & impovements
Current implementation based on:
• Renderer.sortingOrder
• GameObject.layer
• Camera.clearFlags
Camera.targetTexture
Camera.cullingMask
Camera.Render
Front light
Improvements:
• CommandBuffer (Unity5)?
Will allow a better control on
rendering sequence…
… but we will have to
reimplement things (culling)
… and stuff in SceneView will be
broken (picking)
60. Questions?
Benoit FOULETIER - @benblo42
Guillaume MARTIN
Swing Swing Submarine - @swingswingsub
Unity Day – GameConnection Europe 2014
Editor's Notes
Shovel Knight, by Yacht Club Games
Donkey Kong Country: Tropical Freeze, by Retro Studios
Perspective + flat objects, lush textures
vidéo de création d’une carpet
vidéo de collision
This debug texture here is a little weird because there’s no alpha; usually the inside borders are supposed to fade out to blend with the filling texture.
vidéo de création d’un arbre
vidéo de collision
vidéo “produit fini”: montrer qu’on peut avoir des kilomètres de LD avec quelques assets