- Home /
Trouble with UV Mapping Blender => Unity 3
For some reason I am getting nasty grey edges around the edges of rendered 3D models that are not present in Blender.
I seem to be able to solve the problem by reducing the size of the UV coordinates within the part of the texture that is to be mapped. But this means that:
I am wasting valuable texture space
Loss of accuracy in drawn UV maps
Could I be doing something wrong, perhaps a setting in Unity that needs changing? I have watched countless tutorials which demonstrate Blender default generated UV coordinates with "Texture Paint" which are perfectly aligned in Unity.
Here is an illustration of the problem:
Left: approximately 15 pixels of margin on each side of UV coordinates
Right: Approximately 3 pixels of margin on each side of UV coordinates
Note: Texture image resolution is 1024x1024
You can take the "3" out of the question's title; the version of Unity is irrelevant.
Answer by Jessy · Feb 03, 2012 at 07:14 PM
This is due to mipmapping. The amount of rendered pixels is far enough below what's in your texture map that the GPU is grabbing from at least mip 1. If bias doesn't solve your problem, then you'll need to rethink how to put this together.
In the future, be aware that such widely-varying colors will lead to these artifacts. Do you really need that black? It might be easy to use as a background, but if it's not being mapped onto anything, than using Solidify (in Free Plugins) will get you better results, while allowing mipmapping to be used to its most performant capacity.
Does that mean that if that part of the texture was scaled down (and the triangle was scaled down to fit within just a couple of pixels) that the problem would be resolved?
Yes. The drawback is blurry pixelation if the texture gets bigger on-screen. http://www.google.com/url?sa=t&rct=j&q=jessy+%22look+so+good%22+unity3d&source=web&cd=1&ved=0CC$$anonymous$$QFjAA&url=http%3A%2F%2Fforum.unity3d.com%2Fthreads%2F34541-Why-do-the-colors-look-so-good-far-away&ei=ZUcsT6_jJIeW2QXhr5DxDg&usg=AFQjCNE_FrDRhE10DnBZ__EeLp9VaXUEwA
You could adjust the mipmapping settings or disable mipmapping entirely on the texture if it's a major issue. Though it's on by default for a good reason (to reduce aliasing and improve performance), your game may call for non-default settings for best visuals. You can change said settings by going to your texture and changing type to advanced.
There is no setting in the Inspector GUI for bias; you need to change it through code. Turning off mipmaps completely may or may not be the best solution, and $$anonymous$$aiser filtering could be an improvement, but it won't solve the problem like bias can.
Your answer
Follow this Question
Related Questions
Assigning UV Map to model at runtime 0 Answers
Wrong import of UV from blender 1 Answer
Texturing larger models "Uv image" Blender and Gimp 2 Answers
UV issue on pixel pallet from Blender 0 Answers