简体   繁体   English

Unity 3D 2D 导入的精灵像素化

[英]Unity 3D 2D Imported Sprites Pixelated

I have this image generated thanks to PowerPoint:由于 PowerPoint,我生成了此图像:

雪碧首页

We can see here, the image is not pixelated.我们可以在这里看到,图像没有像素化。

But when I import this in Unity 3D, the result is:但是当我在 Unity 3D 中导入它时,结果是:

结果在 Unity 3D

Here you can see the sprite's parameters:在这里你可以看到精灵的参数:

精灵的参数

  1. Am I using the correct tool for my sprite creation?我在创建精灵时使用了正确的工具吗? (PowerPoint) (微软幻灯片软件)
  2. If the answer is "No", which tool can I use for avoid this kind of problem?如果答案是“否”,我可以使用哪种工具来避免此类问题?
  3. If the answer is "Yes", how can I avoid this pixelization of my sprite in Unity 3D?如果答案是“是”,我怎样才能避免 Unity 3D 中精灵的这种像素化?

Thanks a lot for your help!非常感谢你的帮助!

PowerPoint is not the best image editor :D But your sprite looks correct, possible you just set small scale in Unity Scene window for it. PowerPoint 不是最好的图像编辑器 :D 但是你的精灵看起来是正确的,可能你只是在 Unity Scene 窗口中为它设置了小比例。

Try increasing your sprite Scale in Scene window.尝试在场景窗口中增加您的精灵比例。 Select it, next in Inspector increase XYZ Scale parameters in Transform component (it should be on top).选择它,接下来在 Inspector 中增加 Transform 组件中的 XYZ Scale 参数(它应该在顶部)。

I just tried your image in my Unity editor and it seems fine.我刚刚在我的 Unity 编辑器中尝试了您的图像,看起来不错。 Make sure your Sprite Renderer transform scale is set to (1,1,1).确保您的 Sprite Renderer 变换比例设置为 (1,1,1)。 For me even that seems not to affect the quality but it is a best practice not to have different distorted scales for everything in your scene.对我来说,即使这似乎不会影响质量,但最好不要对场景中的所有内容使用不同的扭曲比例。

One tip for improving your sprite quality is to export it in a POT resolution.提高精灵质量的一个技巧是将其导出为 POT 分辨率。 Meaning that the resolution of the image should be divisible with 4. This way Unity will be able to compress the image with a much higher precision and quality.这意味着图像的分辨率应该可以被 4 整除。这样 Unity 将能够以更高的精度和质量压缩图像。 One resolution example of that is 800x800 or 1920x1080 etc.一个分辨率示例是 800x800 或 1920x1080 等。

Make sure your build target is set to Standalone and not other platform.确保您的构建目标设置为 Standalone 而不是其他平台。 If you are set to Android for example.例如,如果您设置为 Android。 check the Android specific compression in your sprite import inspector.在您的精灵导入检查器中检查 Android 特定的压缩。 That might also affect the quality.这也可能会影响质量。

To answer your question on what image editor to use, the best one, in my opinion, is Adobe Photoshop.要回答您关于使用哪种图像编辑器的问题,我认为最好的编辑器是 Adob​​e Photoshop。 If you don't want to pay for it, just search for any free image editing tool.如果您不想为此付费,只需搜索任何免费的图像编辑工具即可。 But stop using PP, I'm not exactly sure how you have come up with that.但是停止使用PP,我不太确定你是怎么想出来的。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM