- Home /
Prevent texture quality from being degraded when importing into Unity
I'm making various types of trees and when I use leaf textures everything seems to look fine. However, when I use pine needles or spruce branches, anything with needles, and import them into Unity they lose their quality. I confirm this I tested a very high res pine texture, not the one below, and the same this happened.
When I import them into Unity and apply them to a tree they are blocky, quality is extremely low res, and you can barely make out what the texture is. I've tried using psd, tiff, tga, and png. I get the same problem with all types. I have tried plugins for Photo Shop that blend the background to match all the colors of the transparency. I have also tried using gimp. I get the same low quality textures once applied to a tree. They look good in the inspector.
My goal was to try and mimic Skyrim's mountain trees but I can't get anywhere close due to this issue. Does anyone know what the problem is? I can't seem to get individual pine needles to show up on the tree.
I've tested other tree packs that use needle based branches and their quality isn't the best either.
Below is my tree with the texture issue and then Skyrim's. Why are their textures so clean and detailed? I have a dds viewer and looked at Skyrim's pine texture, it's not too different from my texture so why is the quality in Unity so horrible and what can I do to fix it?
Update: It's not the tree but Unity itself that's making the texture lose quality. You can see form the inspector below. I messed with every setting and this was the best I could get. The texture has an alpha channel so I don't know why it's turning out like this..
Update:
So I tested this on a texture from the CryEngine 3. I got a plane and put a high res texture on it. I put the exact same one on the tree. On the plane the texture is very clear and detailed, but on the tree the same thing happens as the above making it blocky and blurry.
I'm not sure what the problem is, I'm using the newest version of Unity. It's probably something with the tree shader, maybe it degrades the textures quality or has a max resolution for textures?
i got the same problem. importing image in unity loosing its texture quality. But if you just import an .png file without using photoshop the quality of the image remains. Any best solution for this irritating problems occur when importing image in unity?
Answer by DaveA · Nov 02, 2012 at 08:36 PM
Click on the texture in the Project list, check the import settings. What is the max texture size? Is it too small? Make sure it's at least as big as the texture itself and Apply
The original texture is as big as the max texture size. What I just realized is that when I look at the texture in the inspector it is also messed up. It blurs all of the pine needle together ins$$anonymous$$d of them being individually defined like in Skyrim. Any idea how I can fix this?
Answer by Anxo · Nov 02, 2012 at 09:05 PM
Note that your image is imported and compressed. Unity will only compress images that are square to the 2nd power thingy right? So your image needs to be 512 x 512 or 1024 x 1024 and so on. If you compress your image that is not square before you bring it in, Unity will squash it to meet the nearest number. Also, note that the image may look all crisp on white but may not look like that on black. Put a black backgorund behind the image in photoshop to make sure what you are seeing on white is actually so. 3. check out different filter modes. It looks like you are having an antialiasing issue.
Thanks for the answer.
I tried everything you said but it's still blurry and blocky. $$anonymous$$aking the texture 512x512 or 1024x1024 just make the texture smaller and it didn't improve the quality.
What I mean is you need to have the texture as a square already before you import it or it will squash it. Did you check it against a black background in photoshop and with the alpha channel ?
Yes, I've done both and the same problem, even when using a 1024x1024 texture from the CryEngine.
I think I may have figured it out. I explained above how when I put the tree's material on a plane it seems to be improved, the CryEngine texture is improved a lot.
When you make a tree Unity generates a optimized tree shader of whatever you assign to that specific tree. This is different than the one that is applied directly to the tree because it generates a new one based on what you've applied each tree. This is stored in the tree's prefab. I think this is what is degrading the quality of the texture. It is a hidden shader so it's not visible in the project.
I'm going to get the shader from the built-in shader pack and see if I can overwrite it but I'm not sure if a shader can purposely degrade texture quality..
What could be done if i need to import a landscape png image(1024 x 768) without losing its quality
Answer by Althaen · Nov 03, 2012 at 08:30 AM
Have you tried to change the "Import Type" setting in your first image?
Well, but my only other options are normals and lightmapped. Default seems like the best one.