- Home /
Having trouble in 2d image scaling
I'm completely new to unity and for starters i'm trying to make a 2d maze game so i setup my art in illustrator and it looks like this
and when imported in unity it looks like this
the problem arises when i scale the image downward so it looks decent in my 9:16 ratio android size screen https://ibb.co/ky3yUe
as you can see the thickness of lines in red and yellow colored circles is different and if i keep stretching or shrinking happens the same. I googled for answers and tried many 1.tried using canvas scalar and anchor points 2. used a scalar script 3. tried aspect ratio fitter script 4. increased the pixel size of my art and still no use
would really like some help on this if anyone can help me out. and is there any other way of making a 2d maze for android games?
Answer by eses · Aug 31, 2018 at 05:31 PM
Hi @Miteshk7 - If you scale down any image to lower resolution, there is no guarantee that each similar detail will end up presented with matching amount of pixels.
Think about it - if you have an image of 2048x2048 resolution, you scale it to fit 320x240 resolution screen - which pixels of original image you are going to see?
"The problem arises when i scale the image downward so it looks decent in my 9:16 ratio android size screen" - Yes, the aspect ratio might be that, but you show a picture of unity editor, where the rendered game view might have pretty low pixel resolution... so no wonder the details show up like they do. If screen capture is original resolution, your pixel resolution for the screen is 336x597px.
I'd recommend you learn more about scaling images and play with scaling your graphics to target resolution both in Unity and in image editor of your choice. See how your image details end up looking.
Also remember to check image import settings, so you actually also get the maximum resolution needed for your source graphics / unless it's impractically high resolution.
Your answer
Follow this Question
Related Questions
Generate Tiles Programatically Over Player Position? 0 Answers
What is the most efficient method of adding letterbox to a 2D game? 0 Answers
How to change scaling unity? 0 Answers
How to scale specific part of texture when game object scales? 0 Answers
Resizing orthographic camera to fit 2d sprite on screen 1 Answer