- Home /
Map jpg to plane question
Hi,
I'm new to Unity and I'm trying to map a JPG to a plane. I managed to do that with a little dragging and dropping but I'm running into the following issue:
I can't seem to find a way to make the image to be "crisp". It's always smoothed out and kind of blurry. And also the size is different than the original file pixel wise. As for the latter I understand that this is related to the size of the orthographic camera I'm using but I can't find a way of making this work other than trial and error. I was hoping there would be an easier way of doing 2D (but this maybe just me being too stubborn in using a 3D software to do 2D work). Still, after getting the size to be close to the original image by playing with the plane and camera's size, the rendered quality is still not good as when I drop the image say in like Cocos2D and just use it. Messing with project settings' quality doesn't help much.
Any help is greatly appreciated.
you have to set the quality settings of the view
http://unity3d.com/support/documentation/Components/class-QualitySettings.html
and also quality settings of the texture by changing the compression settings or removing compression in the inspector of the image.
Answer by Dunkhan · Apr 11, 2012 at 05:55 AM
Actually it's not the quality settings. It is the image texture settings. Assuming you are using pixel art and you want square and blocky pixels (I know I do), you click on the jpg asset in the project view in the editor. There should be an option near the top of the inspector called "filter mode". Change this to "point". If this is too crisp for you (ie you didnt want blocky pixels), you can try changing the texture type from "texture" to "advanced". There you will find an option called "non powers of 2" which can change to "none". This will only help if the texture is not a square with dimensions equal to a power of 2(eg. 64x64 or 128x128). If neither of these help then the answer in the comment above was probably right.
Using pixel art along JPEG image is quite contradictory, because of the way JPEG does its compression.
You should consider using PNG or even Bitmap images ins$$anonymous$$d.
O$$anonymous$$, I'm almost there but can't quite get this. Using the above suggestions made a big difference though. I think my problem now boils down to how to relate Unity units to actual pixels as I think the texture is O$$anonymous$$ now but it's getting messed up because my camera settings are stretching/shrinking the texture. I made a simple project with one plane, one material, and one camera. Do you think you could take a look at it and see what's wrong with it? http://mnd.com.ar/test.rar