• Products
  • Solutions
  • Made with Unity
  • Learning
  • Support & Services
  • Community
  • Asset Store
  • Get Unity

UNITY ACCOUNT

You need a Unity Account to shop in the Online and Asset Stores, participate in the Unity Community and manage your license portfolio. Login Create account
  • Blog
  • Forums
  • Answers
  • Evangelists
  • User Groups
  • Beta Program
  • Advisory Panel

Navigation

  • Home
  • Products
  • Solutions
  • Made with Unity
  • Learning
  • Support & Services
  • Community
    • Blog
    • Forums
    • Answers
    • Evangelists
    • User Groups
    • Beta Program
    • Advisory Panel

Unity account

You need a Unity Account to shop in the Online and Asset Stores, participate in the Unity Community and manage your license portfolio. Login Create account

Language

  • Chinese
  • Spanish
  • Japanese
  • Korean
  • Portuguese
  • Ask a question
  • Spaces
    • Default
    • Help Room
    • META
    • Moderators
    • Topics
    • Questions
    • Users
    • Badges
  • Home /
avatar image
0
Question by Leviathanth · Jan 08 at 08:13 PM · 3dgraphicspixel art

Using a Sprite as a Texture, getting sub-pixel glitches.

I am running into an odd issue. I have a 3d game, but I am using a pixel art sprite as a texture to paint an object. However, when that object is displayed at runtime the pixel art is not being displayed crisply, it is displaying with a bunch of sub-pixel errors.

alt text

Is there any way to prevent or fix this? It it just a result of not looking at the texture at a 90 degree angle? When the camera moves the errors disappear and the more appear in different places in the graphic.

sub-pixel.png (9.6 kB)
Comment
Add comment
10 |3000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users

2 Replies

· Add your reply
  • Sort: 
avatar image
1
Best Answer

Answer by Eno-Khaon · Jan 08 at 09:46 PM

To start, your Texture appears to be Point Filtered (a.k.a. nearest neighbor filtering). This filtering scheme eliminates sub-pixel blending in your texture (most prominent when viewed up close).

What this means for you is that, when viewed at *ANY* angle whatsoever, as the engine decides which pixel to draw on the unaligned face, the nearest pixel-in-your-texture to the pixel-being-drawn-on-screen will be displayed. This results in the texture appearing to be jagged when viewed up close, or incomplete (as it were) when viewed from far enough away that the texture's pixels take up less space than the screen's pixels.

Comment
Add comment · Show 1 · Share
10 |3000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users
avatar image Leviathanth · Jan 08 at 11:49 PM 0
Share

That sounds like it would be causing the issue. The texture is point filtered and viewed at a bit of an angle. So I guess I need to figure out a way to keep the clarity of the texture without using standard point filtering. Thank you for the insight.

avatar image
0

Answer by Leviathanth · Jan 08 at 09:24 PM

I think this may be partly the fault of my monitor. When I moved the game window to a smaller and higher resolution monitor the glitches shrink significantly.

Comment
Add comment · Share
10 |3000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users

Your answer

Hint: You can notify a user about this post by typing @username

Up to 2 attachments (including images) can be used with a maximum of 524.3 kB each and 1.0 MB total.

Welcome to Unity Answers

The best place to ask and answer questions about development with Unity.

To help users navigate the site we have posted a site navigation guide.

If you are a new user to Unity Answers, check out our FAQ for more information.

Make sure to check out our Knowledge Base for commonly asked Unity questions.

If you are a moderator, see our Moderator Guidelines page.

We are making improvements to UA, see the list of changes.



Follow this Question

Answers Answers and Comments

153 People are following this question.

avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image

Related Questions

Camera / Graphic bug with 2D Sprites [Please help me solve this] 4 Answers

3D Assets on Some Computers, Not Others.. Direct3D? 0 Answers

How to maintain sharp lines (pixel-like effect) from small textures on 3D assets 2 Answers

Tutorial on adding texture and images to 3d objects? 2 Answers

Texture artifacts on device? 1 Answer

  • Anonymous
  • Sign in
  • Create
  • Ask a question
  • Spaces
  • Default
  • Help Room
  • META
  • Moderators
  • Explore
  • Topics
  • Questions
  • Users
  • Badges