오르카의 아틀리에


Unity 2018.2가 열렸습니다. 여기를 참고해보면 자세한 내용을 확인해 볼 수 있습니다. 지금 2D게임을 만들고 있고, 앞으로도 아마 혼자 개발할때는 2D 위주로 개발하게 될 것 같으니, 2D관련 업데이트 내용만 잠깐 훑어보도록합시다.


Pixel Perfect Camera (Preview package)

Pixel Perfect 카메라가 프리뷰 패키지로 추가되었습니다. 먼저 원문을 잠깐 읽어봅시다.

Try the Pixel Perfect Preview package to stay true to your pixel art vision. The Pixel Perfect Camera component will help you get perfect, crisp pixels – regardless of the screen size – by making all the calculations automatically for you.


Your sprites will even benefit from the feature when they are in motion or rotating, always keeping a sharp pixelation, without having to add interpolation to smoothen the edges as illustrated below.

대략 요약해보면 '자동으로 계산해서 화면에 딱 맞는 픽셀들을 제공한다'라는 모양인데 아래 이미지를 보면 한번에 이해하실 수 있을 겁니다.



원래 이미지를 그냥 회전시키면 2번째 그림처럼 돌아가 있을 겁니다.

하지만, Pixel Perfect 카메라를 이용하면 자동으로 픽셀라이즈 해주기 때문에 세번째 그림처럼 이미지를 재공받을 수 있다는 겁니다.직접 써보지는 않았지만 아마 이전에 이런 기능을 사용하려면 Asset Store에 있는 플러그인을 받아 사용했어야할텐데 이제 패키기 형태로 유니티가 직접 제공하는 듯합니다.


2D Sprite Renderer “Sort by Pivot Point”

Pivot Point로 소팅하는 기능이 2D Sprite Renderer에 추가되었다고 합니다.

Traditionally, the distance between the center of a Sprite Renderer and the axis is used to determine which sprite would be rendered last and therefore appear at the front of the image.


With this release, you can use the pivot point instead of the center of the sprite as the reference point in the various sorting methods, such as arranging by distance to the top of the screen. For example, in top-down RPG games, you need the bottom of the sprite to determine the rendering order of the sprite.


The new pivot-point configuration lets you set criteria that better suit your game.

말그대로 Pivot Point를 기준으로 어느 것을 아래쪽에 그릴지 위에 그릴지 결정하는 기능인데, 예를 들어 Top-Down RPG같은 장르에 유용할 것이라고 합니다. 확실히 타일 한칸보다 큰 오브젝트들을 그려야할때 유용할 것 같습니다. 


2D Hexagonal Tilemaps

유니티에 육각형 타일맵이 빌트인 되었습니다. 


You can now build Hexagonal Tilemaps. This includes support for flat-top and point-top Hexagonal Tiles, which are especially useful for making strategy games or digital board-games.

기존에 제공하던 타일맵과 비슷하게 사용하면 될 것처럼 보입니다. 육각 타일맵은 항상 관리하기 귀찮았는데 이렇게 빌트인으로 제공해주니 좋아 보이네요.


SVG Importer (Preview package)

SVG 임포터가 프리뷰 패키지 형식으로 추가되었습니다. SVG는 벡터 그래픽으로 크게 확대해도 화질이 뭉개지지 않는다는 장점을 가지고 있죠. 원문을 먼저 읽어봅시다.

This feature lets you import Scalable Vector Graphics (SVG) directly into your projects. The SVG Importer allows you to create sprite assets with a very small file size that will retain their quality at any resolution.


The SVG importer supports the most common features of the SVG 1.1 specification, such as gradients, fills, clipping paths, dashed lines, and rounded corners. Vector graphics sprites imported in this manner are supported by the Unity 2D tools.


Once an SVG file is imported, the vector data is tessellated into triangles and a sprite is generated. This sprite can then be used by the 2D system. The source for the SVG Importer can be found in the Editor folder of the package.


Get the SVG Importer as part of the Vector Graphics Preview package from the Package Manager.

대략 SVG 임포터를 추가했고 SVG 1.1 수준의 기능을 제공하지만 가져온 SVG는 Unity 2D Sprite System을 이용할 수 있도록 되어있다고 합니다. SVG를 이용하면 작은 용량으로도 큰 이미지를 깨짐 없이 재공할 수 있으니 한번 사용해볼법 합니다만, 아직 Preview이기 때문에 실제 프로젝트에 넣는 것보다는 테스트용 프로젝트에 고려해볼 법 한것 같습니다.


New 2D APIs

You can use the Vector Graphics API to create or manipulate vector data directly in the code.


The new 2D Atlas API lets you write custom tools to create or update atlases. For example, you could create personalized character textures using the player’s profile picture, or you could optimize the atlas based on the player’s configuration.

새로운 기능들이 추가되었기 때문에 API도 추가되었는데 SVG가 사용 가능해졌으니 당연히 벡터기반 그래픽 API들이 업데이트가 되어었겠죠! 코드를 통해 벡터 데이터에 접근하거나 데이터를 생성할 수 있다고합니다. (개 힘들 것 같지만 ㅠㅜ)


또한 2D Atlas API도 업데이트 되었습니다. API를 통해 아틀라스를 제작하거나 업데이트하는 툴을 만들 수 있다고 하네요.