Unity 2D艺术是模糊的(Unity 2D art is blurry)

编程入门 行业动态 更新时间:2024-10-23 17:37:41
Unity 2D艺术是模糊的(Unity 2D art is blurry)

出于某种原因,我无法让这些瓷砖地图像他们在Unity中创建出来一样...像素艺术从Tiled导入到Unity。

Tiled中的像素艺术:

导入Unity的相同像素艺术:

有没有人有任何想法我可以解决这个问题? 提前致谢!


根据要求,精灵导入设置:

For some reason, I can't get these tilemaps to come out like they were created in Unity... The pixel art is imported to Unity from Tiled.

The pixel art in Tiled:

The same pixel art imported to Unity:

Does anyone have any idea how I can fix this? Thanks in advance!


As requested, the sprite import settings:

最满意答案

考虑到您已经将滤镜从Bilinear变为Point (no filter) ,问题可能是Unity默认压缩了您的贴图。 如果它是POT纹理(两个分辨率的功率),则可能是这种情况。

您可以覆盖纹理导入设置底部的单个平台。 如果你需要alpha通道(透明度)或者RGB 24 bit选择RGBA 32 bit如果你不需要,可以使纹理解压缩。 并且不要忘记点击Apply按钮! ;) 如果这没有帮助,您可以发布导入设置的图片吗? 另外,你的图像是什么数据类型?

编辑: 在添加了导入设置屏幕截图之后,我认为问题在于SpriteMode设置。 据我所知,所使用的图像是一张贴图形式的Spritesheet。 因此SpriteMode应该设置为Multiple 。

然后,您可以单击Sprite Editor按钮并使用Slice功能将工作表切成单个的精灵(从Unity 5.6开始,现在是分开的)。 你可能想使用Grid - By Cell Size方法,这基本上是如何在Tiled内处理的。

您还希望调整“ Pixels Per Unit设置以匹配瓷砖的分辨率(对于像素完美的结果)。

Considering you already changed the filtering from Bilinear to Point (no filter), the issue may be that Unity compresses your texture by default. This is likely if it is a POT texture (Power of two resolution).

You can override this for individual platforms at the bottom of the texture's import settings. Select RGBA 32 bit if you need the alpha channel (transparency) or RGB 24 bit if you don't, to get your texture uncompressed. And don't forget hitting that Apply-button! ;) If this doesn't help, could you post a picture of your import settings? Also, what data type is your image?

EDIT: After the import settings screenshot has been added, it seems to me the issue lies in the SpriteMode settings. As far as I understand, the image used is a Spritesheet in form of a tilemap. Therefore the SpriteMode should be set to Multiple.

You can then click on the Sprite Editor button and cut the sheet into individual sprites using the Slice function (now separate, as of Unity 5.6). You probably want to use the Grid - By Cell Size method, which is basically how this is handled inside Tiled.

You also want to adjust your Pixels Per Unit setting to match the resolution of your tiles (for pixel-perfect results).

更多推荐

本文发布于:2023-07-16 09:59:00,感谢您对本站的认可!
本文链接:https://www.elefans.com/category/jswz/34/1126851.html
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
本文标签:模糊   艺术   Unity   art   blurry

发布评论

评论列表 (有 0 条评论)
草根站长

>www.elefans.com

编程频道|电子爱好者 - 技术资讯及电子产品介绍!