- Home /
Transparent grid shows odd irregularities when displayed.
I created a grid prefab with a plane and a texture applied to this plane. The plane was made in an external modeled and is centered at origin. I have a transparent png texture used to display the grid. I run into problems when it is used in game. The image doesn't always show up correctly. Lines sometimes may be thin, missing, or seem off when viewed at angles. How can I get a nice and crisp image? (btw the image layer has 70% opacity in gimp if that makes a difference)
Here is an example of what going on, notice the lines and irregular drawing of the drug when viewed farther away.
It doesn't look irregular to me ;). It's actually quite regular pattern.
How does your texture look like? does it contain only one square? What texture type do you use in the TextureImporter? I guess you want a pixel perfect filter since "usual" textures are smoothly interpolated. In the case of a reduction you will lose some pixels since the texture's texels doesn't fit into the screen's pixels ;)
If the grid should always have the same line-width you have to draw it manually (maybe with the GL class).
$$anonymous$$y texture is just a grid of solid criss crossing lines (no rounded corners). I want the grid to be blue and semi transparent, can I still do that using the GL method? (yes I have unity pro).
What is an example of using the GL method to draw a grid? I'm a bit confused, and the documentation doesn't help much.
PS :my texture is imported as an unlit transparent texture as to avoid parts being black as they are away from the light source.
You mix up the shader you're using with the TextureImporter settings which are more important in this case. What texture type did you set in the TextureImporter for your grid texture? Have you tried some other texture import settings? @Berenger posted the link below.
If you use a texture with single pixel lines on a 3D object the line will always disolve or get magnified depending on the distance / angle to the camera.
With the GL class you can draw the lines manually so they are real lines and aren't affected by the depth.
Can't get gl. Lines to show up. I tried using code in documentation, but I see no lines... Can you provide an example. And what is the material setpass for? Do I make this material as color of lines? Or opacity of lines wanted? I'm a bit confused and can't find documentation.
Answer by Berenger · Feb 05, 2012 at 02:02 AM
Look there : http://unity3d.com/support/documentation/Manual/Textures.html
Aniso level.
Your answer
Follow this Question
Related Questions
Vertical Layout draw order, child appears above parent 2 Answers
Applying UV to plane mesh is pixel imperfect. 0 Answers
Mesh deformation by terrain shape 0 Answers
Procedural Mesh 1 Answer