- Home /
Correct sprite/texture resolution and settings for "2D" sprites in 3D game?
I'm making a 3D fps that's a bit like Wolfenstein with enemy characters that are simple pixel sprites (currently created at 32x32 pixel size so they have an "8-bit NES" look), and I'm wondering what's the best way to go about putting then in the game, such as using filtering or not when I import them into Unity, and the resolutions I should use and that kind of thing?
I want to show these enemy sprites looking like they are actually the proper 32x32 pixels (nice and clean), and they will be scaled or put onto objects that are roughly 2.5 units high in Unity's scale (which is around normal human height in real-world scale). And this game will be running on both PC and in VR too, so although I want them to look like pixel art (with blatant large pixels), I also want everything (the pixel edges) to look clean and smooth regardless of how near or far they are from the player (especially important in the VR mode).
Right now I'm initially drawing them in Photoshop at 32x32 and then changing the size to 512x512 using "nearest neighbor" so they are scaled pixel perfect, and then when I import them into Unity I turn on trilinear filtering (because they look jaggy in the game otherwise), set the aniso level to 16 (because some of the textures were causing pretty bad moiré at a distance otherwise, which is real obvious and sickness-inducing in VR) and the compression to high quality (just to make sure).
But I'm a little worried I'm doing things in a way that's taking up too much space for every single sprite, especially when I get into animating some of them, where I'll have sprites that can made up of many 515x512 images. And I have no idea what kind of memory we're meant to use for all the sprites/textures in our games, as in what any limitations on this might be.
So, any suggestions on the correct way to go about this would be appreciated.
I thought that using the point filter mode is best for pixel art. Have you tried it? Where is the jaggedness co$$anonymous$$g in without trilinear filtering?
I'm not sure what the point filter mode is but I'll have a look. The jaggies are co$$anonymous$$g from the texture art itself, all over it, when you view it at various distances and angles, but turning on trilinear filtering keeps them looking pretty nice and smooth regardless of the distance they are from you. And as long as they're imported at high enough resolution then they still look like proper pixel art.
Traditionally, pixel art is imported as follows:
Filter $$anonymous$$ode: Point (no filter)
Compression $$anonymous$$ode: None
Does that not work?
I'll have a look and see. . . .
Edit: Nah, it comes in quite jaggy when viewed my game with those settings. At least if I don't resize it in Photoshop first like I'm already doing with the other sprites.
The filtering def helps, but it's only useful if I import the sprite at a high enough resolution first, otherwise it's just all blurry.
That's the way games like Wolfenstein 3D imported their textures. If that's not the look you're going for, you'll have to give more info on what you're trying to do. Pictures help.
Your answer
Follow this Question
Related Questions
Sprite filtering: Point/Bilinear 1 Answer
Anti aliasing with sprites 0 Answers
How can I access a sprites texture and add it to a GUI button? 0 Answers
Sprite.Create is not working 1 Answer
Can i Use Pixel Animations for My Top Down Shooter? 1 Answer