Version: 2018.2
Подборка уроков по графике
Как я могу создать Skybox?

How do I Import Alpha Textures?

Этот пример показывает, как использовать технику отступов от краев в Photoshop. Имейте ввиду, что альфа канал в Unity будет считываться из первого альфа канала файла Photoshop.

Настройка

Перед тем как сделать это, установите макросы альфа-утилиты для Photoshop: AlphaUtility.atn.zip

После установки макросов в Alpha Palette должна появиться папка AlphaUtility:

Getting Alpha Right

Предположим у вас есть альфа текстура с прозрачным фоном в Photoshop. Похожая на эту:

  1. Duplicate the layer

  2. Select the lowest layer. This will be source for the dilation of the background.

  3. Select Layer->Matting->Defringe and apply with the default properties

  4. Run the “Dilate Many” action a couple of times. This will expand the background into a new layer.

  5. Select all the dilation layers and merge them with Command-E

  6. Create a solid color layer at the bottom of your image stack. This should match the general color of your document (in this case, greenish). Note that without this layer Unity will take alpha from merged transparency of all layers.

Теперь нам надо скопировать прозрачность в новый слой.

  1. Set the selection to be the contents of your main layer by Command-clicking on it in the Layer Palette.
  2. Switch to the channels palette.
  3. Create a new channel from the transparency.

В завершении, сохраните ваш PSD файл и теперь вы готовы продолжать.

Extra

Заметьте, если ваша картинка содержит прозрачность (после объединения слоев), Unity возьмёт альфу как объединённую из всех слоев и проигнорирует альфа маски. Чтобы обойти это создайте непрозрачный слой цвета в низу стека слоев. Это должно совпадать с основным цветом вашего документа.

Подборка уроков по графике
Как я могу создать Skybox?
Copyright © 2023 Unity Technologies
优美缔软件(上海)有限公司 版权所有
"Unity"、Unity 徽标及其他 Unity 商标是 Unity Technologies 或其附属机构在美国及其他地区的商标或注册商标。其他名称或品牌是其各自所有者的商标。
公安部备案号:
31010902002961