- Home /
What are the best practices when importing 2D pixel sprites
(Using Unity 5.1.1)
I am developing a game (Name is 'Emortuus') its a 2D platformer and i have the core of the game actually complete and written down now i just need to construct it in a software and instead of using what i usually use I wanted to try Unity and see if i can take advantage of its awesome easy to use features but i want to know more about the importing settings before i start bringing in levels.
heres a pic of the character models (defined pixel art) for you to get what im working with:
-So when making sprites whether it be a sprite sheet for a characters run/idle/jump anim, a single item (maybe like a trash can that will sit on the side of the road) or a big BG for my game scene what dimensions should i make it in that is easy for unity to translate/compress, eg: 256x256, 512x512. does this matter?
-My next concern was with the Pixel to Units. I know the obvious, it changes the size. Unity reads a 256X256 pixels by its unit measurement so it would be 2.56x2.56 in unity. if you change the pixel to units for most of your sprites just so you can make sure it fits well with everything in the scene will it disrupt how the game flows? For example if i import something and it doesnt match how big i wanted it to actually be in the scene can i simply just chnage the pixel to units to match it or will it screw things up?
-The max size (also under import setting) also concerns me. This is where i thought i'd worry about the dimensions of my sprites should be when importing them into Unity. Should i have all my sprites being able to be on 1024 or 2048 or does it really matter. Say if i had just an oddball dimension like 270x270 what would I do in this situation dealing with the 'max size' option. This also leads onto should i practice a more practical approach and just stick to a couple different dimensions that are already listed in Unity like 256x256, 512x512, ect...
I know this will make some of you shake your heads at my questions and sorry for that, i just dont want my brain to hurt later down the road if simple stuff like that can change how i would like it to act.
Summary: Basically need to know a good practice on importing 2d pixel sprites into Unity. -What dimensions are best when making them in Photoshop then importing them into unity so it can compress it better. -Pixels to units : how should i go about with this tool when importing. -Max size: This also goes with what dimensions i should use with my sprites.
Answer by Gauthama · Apr 07, 2017 at 09:52 AM
Here is a FAQ :
"should i make it in that is easy for unity to translate/compress, eg: 256x256, 512x512. does this matter?"
No it doesn't matter chose a size you comfortable with.
" For example if i import something and it doesn't match how big i wanted it to actually be in the scene can i simply just change the pixel to units to match it or will it screw things up?"
No this will not cause any problems.
" Say if i had just an oddball dimension like 270x270 what would I do in this situation dealing with the 'max size' option. This also leads onto should i practice a more practical approach and just stick to a couple different dimensions that are already listed in Unity like 256x256, 512x512, ect..."
Some devices won't load a sprite that's larger than 2048 x 2048.And it is recommended to stick to around 2-4(at max) different resolutions.You should also make sure that the resolution of the sprites are a power of 2 for compatibility reasons.
eg. If we take a 32x32 px sprite then the square root of 32 x 32 must be a whole number.
"Basically need to know a good practice on importing 2d pixel sprites into Unity. -What dimensions are best when making them in Photoshop then importing them into unity so it can compress it better. -Pixels to units : how should i go about with this tool when importing. -Max size: This also goes with what dimensions i should use with my sprites."
Here is a article covering the Unity and Photoshop workflow - http://www.swingswingsubmarine.com/2014/01/23/from-photoshop-to-unity/
And regarding the "Pixels to Unit" just use a size that fits with the rest of the sprites in the scene.
Max Size is really not a big deal leave it as it is.It mainly matters when using textures for 3D objects.
And concerning the sprite size 16 x 16, 32 x 32 and 64 x 64 px(if your really good) are the most common and the best sizes for pixel art.
There is a lot you can do with a few pixels!.About improving in your pixel art skills I recommend you check out PXLFLX and MortMort.
PXLFLX : https://www.youtube.com/user/PXLFLX
MortMort: https://www.youtube.com/user/atMNRArt
And I can wait to play your game my friend.As a matter of fact I am working on a 2D platformer shooter.I think we should keep in touch.