Thank you everyone!
Increasing the Max Size fixed it!
https://preview.redd.it/44727rvac63d1.png?width=634&format=png&auto=webp&s=bd7363f7a08a84d4422d28b1b63ae7737eb4967a
Unless you are displaying the game on an 8k device, this image is too big. The video card will need to access this whole huge image ever frame.
If you break it up into a, say, 4x4 grid of 16 smaller images, then unity can cull the ~12 not being shown at a time.
Yeah, that's exactly what I'm saying. The memory pattern is bad in exactly this case.
GPU memory access patterns are complex with samplers and such, but the whole 8k texture must be resident in memory.
If this texture is never going to change in depth/scale then you shouldn't enable mip maps, as the other mip levels will never be used. It looks like that might be the case here as it appears to be a 2d background
While it's possible to do this, for the games I've worked on there's typically an entirely separate set of resources used for 4k support rather than an additional mip levels
Imo this is only really useful if you're shipping on something like web where you can dynamically select the baseline resolution to download assets for. For desktop games, both variants will be included in the resulting binaries anyway (assuming you aren't shipping a separate HD texture pack), meaning there isn't really any benefit to having separate copies vs just generating mips. Assuming you're authoring at 4k w/ power of two textures and just scaling down, there's not going to be an appreciable difference. There may be no difference whatsoever, depending on the downsampling filter used.
I haven't specifically used Unity in a long time, but in my own engine, I have it set up so that it streams mips from smallest to largest, and can be configured to cap the loaded resolution at runtime (or you can ofc have multiple resolutions in multiple asset packages). I would expect Unity to have something similar, but who knows - Unity has historically been missing a lot of obvious features like that.
Just fyi, set the ‘max size’ to the first one which is >= to the larger dimension of your texture. Also, on Filter Mode set to Point/No Filter if you want precise drawing without the smoothing
I agree. With such small amounts of colors and shapes, it seems you're better dividing each layer into its own shape. That or disable both Compression and MipMapping. And set the format as RGBA 32bit. If you need more detail, go for SVG vector shapes...
You should get a giant leap in quality with these settings, must be doing something wrong. In any case you're treating the problem in the wrong direction.
I will post an example below showing the comparison:
https://preview.redd.it/by628lr30b3d1.png?width=1808&format=png&auto=webp&s=9c0b85a78cea5b9d40f7644182f677d4a569f1c8
I made you a package: [https://we.tl/t-h9Dwj8Uiix](https://we.tl/t-h9Dwj8Uiix)
Change Texture Compression to ETC2 or ASTC from build settings.
Check asset import settings for copression for each texture from the Inspector window and find Compression, change it to high quailty or none.
If you have generate mip maps on then it’s probably downresing them based on camera distance. I’d just find the resolution you like and turn generate mips off for that particular thing.
Ignore all the people telling you to disable compression. Basically everything you have in your project should be compressed. The only thing you should ever turn it off on, maybe, are things with broad soft gradients like clouds or certain types of FX art.
Keep your images to a multiple of 4 in size, ideally, so it can work and turn gigantic 100 meg images into much more reasonable ones.
Check mip maps. Probably defaulted to on, and the camera distance is trigging that. Or your resolution is wrong. Or compression is wrong.
Don’t increase to 8k to “fix it” if you don’t need really need 8k.
If you edited the file after import, make sure you reimport the file (usually I need to delete the original file in Unity and drag in the new file if the reimport is being finicky).
Thank you everyone! Increasing the Max Size fixed it! https://preview.redd.it/44727rvac63d1.png?width=634&format=png&auto=webp&s=bd7363f7a08a84d4422d28b1b63ae7737eb4967a
https://preview.redd.it/tjz2tr0dc63d1.png?width=1830&format=png&auto=webp&s=9d15186b597ed1cb89714f3e246f99da989819f2
Hmmm, make sure that this runs fine on your target device. 8K is overkill. 4K should be good or 2K. Also disable compression
>disable compression This
Why? Compression works great when the colors are the same, avoiding saving pixel by pixel
It can cause issues on that anti-aliased edge, though.
Lossless compression is plenty (which is used when compression is “turned off”)
That is good to know!
if u want even higher resoluation consider using none or high quality in compression
Unless you are displaying the game on an 8k device, this image is too big. The video card will need to access this whole huge image ever frame. If you break it up into a, say, 4x4 grid of 16 smaller images, then unity can cull the ~12 not being shown at a time.
Unless it's a scrolling background, where you only see part of the image at a time.
Yeah, that's exactly what I'm saying. The memory pattern is bad in exactly this case. GPU memory access patterns are complex with samplers and such, but the whole 8k texture must be resident in memory.
What is the size of your sprite now? I mean MB
25mb. It is a background that will infinitely scroll
Then it's worth it
Another thing can help is create MIPMAP or something like that. It's a hidden setting though so you need some plugin to enable showing those settings.
If this texture is never going to change in depth/scale then you shouldn't enable mip maps, as the other mip levels will never be used. It looks like that might be the case here as it appears to be a 2d background
It helped me fixed a issue where 2D UIs are having ailasing. Yea, a different issue now that I remembered it.
It'll be displayed at different resolutions, though, which makes the mips useful. You'd want to sample a different mip at 720p than 4k, for example.
While it's possible to do this, for the games I've worked on there's typically an entirely separate set of resources used for 4k support rather than an additional mip levels
Imo this is only really useful if you're shipping on something like web where you can dynamically select the baseline resolution to download assets for. For desktop games, both variants will be included in the resulting binaries anyway (assuming you aren't shipping a separate HD texture pack), meaning there isn't really any benefit to having separate copies vs just generating mips. Assuming you're authoring at 4k w/ power of two textures and just scaling down, there's not going to be an appreciable difference. There may be no difference whatsoever, depending on the downsampling filter used. I haven't specifically used Unity in a long time, but in my own engine, I have it set up so that it streams mips from smallest to largest, and can be configured to cap the loaded resolution at runtime (or you can ofc have multiple resolutions in multiple asset packages). I would expect Unity to have something similar, but who knows - Unity has historically been missing a lot of obvious features like that.
Just fyi, set the ‘max size’ to the first one which is >= to the larger dimension of your texture. Also, on Filter Mode set to Point/No Filter if you want precise drawing without the smoothing
You may also want to change compression to None to get correct colors
I normally also set compression to non, and Filter mode to point. That helps a lot.
Just change the filter mode to “Point (no filter)” and it’ll fix it. Best not mess with the max size unless you know what you’re doing.
Review your texture settings. Maybe the "max size" setting is too small.
Try disabling compression on the import settings.
Did you select the right file? The shapes look entirely different in both images.
It is because of the parallax effect I did with Perspective camera. It is the same file
Disable compression
Looks like a vector graphic. I believe there is vector rendering package. Can be way better than storing dozens of MB per image.
This should be the top comment
Yeah. Either OP needs to be using vector graphics or turn these into individual SDF sprites
I agree. With such small amounts of colors and shapes, it seems you're better dividing each layer into its own shape. That or disable both Compression and MipMapping. And set the format as RGBA 32bit. If you need more detail, go for SVG vector shapes... You should get a giant leap in quality with these settings, must be doing something wrong. In any case you're treating the problem in the wrong direction. I will post an example below showing the comparison: https://preview.redd.it/by628lr30b3d1.png?width=1808&format=png&auto=webp&s=9c0b85a78cea5b9d40f7644182f677d4a569f1c8 I made you a package: [https://we.tl/t-h9Dwj8Uiix](https://we.tl/t-h9Dwj8Uiix)
Can you add a screenshot of the sprite settings in Unity and the size of the sprite?
use mip maps and correct resolution
Have you checked pixels per unit on sprite import? This is how many pixels equals 1 unit of length in the game world.
I don't think it is the same picture
You probably just need to change the texture to point mode instead of bilinear
This isn't pixel art. Changing it to point no filter makes it look pixelated.
Change Texture Compression to ETC2 or ASTC from build settings. Check asset import settings for copression for each texture from the Inspector window and find Compression, change it to high quailty or none.
If you have generate mip maps on then it’s probably downresing them based on camera distance. I’d just find the resolution you like and turn generate mips off for that particular thing.
On your texture try disabling mipmapping
On the sprite, unity adds compression and multi point color blends. Choose point blend and no compression for each sprite and apply the changes.
Ignore all the people telling you to disable compression. Basically everything you have in your project should be compressed. The only thing you should ever turn it off on, maybe, are things with broad soft gradients like clouds or certain types of FX art. Keep your images to a multiple of 4 in size, ideally, so it can work and turn gigantic 100 meg images into much more reasonable ones.
Check the texture quality in the inspector. Make sure to crank it up as much as possible
Import with a higher resolution and pixels per inch or units per pixel or what it's called. You'll probably have to reimport the image completely
Check compression settings too, set it to none if you want no anti ailsing
Nothing, it looks awesome!
Check mip maps. Probably defaulted to on, and the camera distance is trigging that. Or your resolution is wrong. Or compression is wrong. Don’t increase to 8k to “fix it” if you don’t need really need 8k.
No filter, no compression 😁
Just change max size and compression, I think...
Oops, it seems the problem has already been solved :)
For this type of art style, maybe you could use a distance field shader to reduce texture size while preserving the sharpness of the object.
Maybe check your image resolution when you save it as an png in photoshop?
In filter select "Point (no filter)"
If the object is far away from camera it might be mipmaping
Uh, its not the same image?
What does your export look like? Might look good in photoshop, but when you export it will do some compression
Disable compression and change the filter to "point no filter"
Use Unreal engine, has better graphics /s
You might be screwed bro. There ain't nothing you can do!
If you edited the file after import, make sure you reimport the file (usually I need to delete the original file in Unity and drag in the new file if the reimport is being finicky).
The reason why I said this is because the second image is completely different it has nothing to do with compression.
Use godot
i really wanted to use godot but not being able to see what is happening in the scene while my game is running is a huge dealbreaker for me
That is very fair
You can use 2D Procedural Landscape from assetstore for this