Wayback Machinekoobas.hobune.stream
May JUN Jul
Previous capture 13 Next capture
2021 2022 2023
1 capture
13 Jun 22 - 13 Jun 22
sparklines
Close Help
  • Products
  • Solutions
  • Made with Unity
  • Learning
  • Support & Services
  • Community
  • Asset Store
  • Get Unity

UNITY ACCOUNT

You need a Unity Account to shop in the Online and Asset Stores, participate in the Unity Community and manage your license portfolio. Login Create account
  • Blog
  • Forums
  • Answers
  • Evangelists
  • User Groups
  • Beta Program
  • Advisory Panel

Navigation

  • Home
  • Products
  • Solutions
  • Made with Unity
  • Learning
  • Support & Services
  • Community
    • Blog
    • Forums
    • Answers
    • Evangelists
    • User Groups
    • Beta Program
    • Advisory Panel

Unity account

You need a Unity Account to shop in the Online and Asset Stores, participate in the Unity Community and manage your license portfolio. Login Create account

Language

  • Chinese
  • Spanish
  • Japanese
  • Korean
  • Portuguese
  • Ask a question
  • Spaces
    • Default
    • Help Room
    • META
    • Moderators
    • Topics
    • Questions
    • Users
    • Badges
  • Home /
avatar image
0
Question by esitoinatteso · May 03, 2015 at 09:39 PM · uiimageresolutionmaskjagged

Unity UI image + mask has jaggies

Hi there! The new layout for GUI in Unity is amazing BUT, as I was playing around with it, I've found out that one of my canvas' images is rendered with jaggies and I know it shouldn't have them.

I've imported it with maximum settings and the image itself is pretty large, which is why I wasn't expecting this issue. Thing is, the image is jagged even if I scale it to lower W/H in the Canvas.

Since I'm not familiar with these problems and I've already checked the import settings, I'm now clueless.

MAYBE I should also mention the fact that this particular image is coupled with a mask image.

Does that matters?

What should I try to do?

Thanks for your time!

P.S.: As suggested, I'm editing this to include the pics...

This is with jaggies, the orange colour is a flat layer, the Stamina itself is the mask I'm using on it

This is a pic of the Stamina while you deplete it, if you look carefully the edges of the mask are not jagged

screen-shot-2015-05-07-at-221658.png (26.2 kB)
screen-shot-2015-05-07-at-221643.png (12.4 kB)
Comment
Add comment · Show 3
10 |3000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users
avatar image esitoinatteso · May 04, 2015 at 07:28 AM 0
Share

That's a nice idea! I'm going to try that, thanks!

avatar image moghes · May 04, 2015 at 07:52 AM 0
Share

please take a snapshot of the import settings and attach it here

avatar image esitoinatteso · May 07, 2015 at 08:23 PM 0
Share

Edited! thanks for the suggestion, sorry if it took me a while!

2 Replies

· Add your reply
  • Sort: 
avatar image
3
Best Answer

Answer by digzou · May 04, 2015 at 04:40 AM

Try creating the image sprite with an ideal resolution. (By ideal I mean to say that, in my game I was setting 300x300 facebook profile picture.But my dummy avatar image size was 1024x1024,which I was resizing and using. So I changed the size of my dummy avatar to 300x300. And set the max size to 256[closest to 300] and set import to 'Truecolor'. Although not very crisp, it did improve the jaggies.) :)

Comment
Add comment · Show 3 · Share
10 |3000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users
avatar image esitoinatteso · May 11, 2015 at 03:03 PM 0
Share

Hi digzou, sorry if some days have passed!

edit I've found out that one of the significant causes of those jaggies was the Filter $$anonymous$$ode... I changed it from Bilinear to Trilinear while $$anonymous$$dlessly stuffing with options and magic happened!

Right now I'm almost happy with the result on the mask while full ( it still has some jaggies but now they seem acceptable).

I couldn't try your suggestion with those textures because, If I've understood correctly, I should try to scale them to the resolution my Canvas will use. That would be 1080 hd, but originals are raster and far tinier than that; if I photoshop/resize them I'll get something wrong.

I do have tried to manipulate the scale of another piece of GUI that could be rescaled, but I've noticed no visible improvements in my specific case, sorry :(

Thanks a lot for your efforts though!

Note: I used Point first as filter, and the texture under the mask displayed in a precise way but not the mask itself. Trilinear ins$$anonymous$$d works decently when full screen is on, both for the mask and the texture beneath it.

avatar image esitoinatteso · May 26, 2015 at 04:51 PM 1
Share

As I was reworking the interface's elements from scratches, I decided to try out your suggestion also with those that I couldn't rescale ( I redrawn them bigger).

The results are better, but when I mask an element with another, I still get a bit of jaggies! Thanks again for the suggestion!

avatar image Artifact-Jesse · Sep 28, 2016 at 05:33 PM 0
Share

This answer is partially correct, but I think this is only happening because Unity is generating mip maps for sprites that are displayed at lower-than-native resolution. Therefore, if you can't save your images at display resolution for some reason...

...With your texture selected in the project panel uncheck "mip maps" and watch the jaggies disappear.

The downside of this is that the memory footprint for that texture is going to be larger than necessary when you build your game, so try to get them saved into your assets folder at the display resolution if possible.

avatar image
6

Answer by SergeantBiscuits · Mar 16, 2018 at 09:24 PM

Found this question while searching about the same issue... I was able to get 100% clean masking by changing the 'Compression' setting for the texture to 'None.' Hope this helps anyone else who comes across this. :)

Comment
Add comment · Show 3 · Share
10 |3000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users
avatar image jiten12345 · Mar 25, 2021 at 11:26 AM 0
Share

It's not working actually.

avatar image astechnolabs · Aug 18, 2021 at 04:53 PM 0
Share

Where is "Compression" setting?

avatar image Hellium astechnolabs · Aug 18, 2021 at 05:24 PM 0
Share

https://docs.unity3d.com/Manual/class-TextureImporter.html

At the bottom of the texture importer

Your answer

Hint: You can notify a user about this post by typing @username

Up to 2 attachments (including images) can be used with a maximum of 524.3 kB each and 1.0 MB total.

Follow this Question

Answers Answers and Comments

26 People are following this question.

avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image

Related Questions

Ring with changeable diameters 1 Answer

UI Masking (Type visiblity of the content outside and inside of mask ) 0 Answers

How do I save masked user entered image? 0 Answers

UI Texture Max Size (inspector) 1 Answer

Canvas with mask and transparent image 1 Answer


Enterprise
Social Q&A

Social
Subscribe on YouTube social-youtube Follow on LinkedIn social-linkedin Follow on Twitter social-twitter Follow on Facebook social-facebook Follow on Instagram social-instagram

Footer

  • Purchase
    • Products
    • Subscription
    • Asset Store
    • Unity Gear
    • Resellers
  • Education
    • Students
    • Educators
    • Certification
    • Learn
    • Center of Excellence
  • Download
    • Unity
    • Beta Program
  • Unity Labs
    • Labs
    • Publications
  • Resources
    • Learn platform
    • Community
    • Documentation
    • Unity QA
    • FAQ
    • Services Status
    • Connect
  • About Unity
    • About Us
    • Blog
    • Events
    • Careers
    • Contact
    • Press
    • Partners
    • Affiliates
    • Security
Copyright © 2020 Unity Technologies
  • Legal
  • Privacy Policy
  • Cookies
  • Do Not Sell My Personal Information
  • Cookies Settings
"Unity", Unity logos, and other Unity trademarks are trademarks or registered trademarks of Unity Technologies or its affiliates in the U.S. and elsewhere (more info here). Other names or brands are trademarks of their respective owners.
  • Anonymous
  • Sign in
  • Create
  • Ask a question
  • Spaces
  • Default
  • Help Room
  • META
  • Moderators
  • Explore
  • Topics
  • Questions
  • Users
  • Badges