Hi guys, I know there are a ton of Orthographic questions on here already, I’ve read a good deal of them and they’re all pretty straightforward and consistent in their advice. However, there’s a couple of points which are unclear to me.
Here’s what I’m doing:
-
So your Orthographic camera size determines how many world units in the top half of the screen, so an Orth Size of ‘10’ means the screen can display 20 world units in height;
-
In my test scene, I want my sprite to be 64x64. The original size of the sprite is 256x256, so I imported it and in the importer set the max size to 64 and pixel to units to 64 (as I have 10 world units high based on my orth size, I should be able to stack 10 of these purple sprites)
The sprite seemed much larger than I anticipated (see screen below), so I tried again, using a red sprite but this time scaled it’s source texture down to 64x64. I then set its max size to 64 and pixel to units to 64. As you can see from the screenshot below, this is what I was after.
So here are my questions
- I’m not sure if I’m misunderstanding the importer, but why when I set the max size of the sprite to 64 and pixels to units to 64 it’s still rendering 256x256?
- Second question is with the pixel to units, if I set it to 64 for my sprite, should all other sprites in the game share the 64 pixel to units ratio?
To your first question, it’s pretty weird. I didn’t use the new 2D system a lot. But for me. I just take an example from on of my project.
I go a planet of 1024*1024.
I say this sprite will do 115px/unit
And my orthographic camera is set to 5unit (so 10 in the full height)
And my planet use 90% of the screen which is the size I expected.
To your second question I can say no. You can set the unit per pixel that you want.
BUT
if you do this you will lose the proportions between your assets. I think you design them to have a ratio and a logical proportions between them. SO if you wanna stay at the same scale for each of them you must put them all @ 64px per units.
But if for some reasons you don’t care so yeah you can put another pixel per units to another sprite.
In regards to the initial question:
The documentation specifies the following
Max Texture Size: The maximum imported texture size. Artists often prefer to work with huge textures - scale the texture down to a suitable size with this.
I believe that the documentation is rather vague. However I believe that what you are expecting is the intended behaviour.
The Max Texture Size property should be considered a tool for you as a game designer to be able to turn down the quality of the imported image without altering with the conceptual size of the image in the editor, whereof conceptual refers to the original size of the image. This allows for the artists to work with high resolution images outside of Unity, whereafter you can choose between different levels of quality for the image inside of Unity.
This behaviour allows for the option to change the property at runtime or between builds, without you having to change anything in the objects using these images. In other words you can export different builds with different levels of quality or even have an in-game option for the user to switch between different levels of texture quality.