Wayback Machinekoobas.hobune.stream
May JUN Jul
Previous capture 13 Next capture
2021 2022 2023
1 capture
13 Jun 22 - 13 Jun 22
sparklines
Close Help
  • 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 Romano · Feb 14, 2014 at 07:37 AM · 2dspritepoint

2D sprites - Can I use point filtering without getting the "rippling" effect when the camera moves?

I'm trying to decide whether to use Point or Bilinear filtering on the sprites in my game. My preference would be to use point - the style is pixel art and I'd like the edges and colours to be sharp - bi or trilinear filtering seems to dull the colours slightly and the edges become blurred.

The trouble with using point filtering is that fast movement seems to cause a rippling effect on the sprites - almost like the pixels in a single sprite are trying to move in different directions or at different speeds. The effect is subtle and hard to explain but it can be seen in Unity's 2D platformer demo project - if you change the filtering of the spaceship's sprite to point and then jump around you can see that the edges of the ship have this "rippling" effect. On my pixel art backgrounds this effect is enough to make the handheld camera script I'm using look terrible - it looks fine when all the sprites are bi or trilinear.

Is it really just down to choosing between the lesser of two evils or is there something I've missed? Thanks very much!

Romano

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
0
Best Answer

Answer by Romano · Mar 03, 2014 at 06:43 AM

http://www.third-helix.com/2012/02/making-2d-games-with-unity/ gives info on how to set the orthographic size so that you have sharp looking pixels (using point filtering) and no movement rippling.

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
avatar image
0

Answer by Owen-Reynolds · Feb 14, 2014 at 07:13 PM

Bilinear filtering was invented exactly to fix the flickering point problem you're describing. In other words, yes, you can fix the rippling, by switching to bilinear filtering! And the way it fixes the ripple is by blending (blurring) the colors, as you describe.

I'd go with larger images (but still pixel art -- like quadrupling each pixel) Doubling the pixels will cut the interpixel "blend zone" in half. And the images will still compress to about the same size.

Comment
Add comment · Show 3 · 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 Romano · Feb 19, 2014 at 05:06 AM 0
Share

You're totally right Owen, bilinear does fix the rippling, but I'm looking for a solution where I can have perfectly sharp pixels and not have the rippling (See Sword and Sworcery). There actually seems to be a point where if the pixels are doubled enough times that the bilinear filter doesn't work to reduce the rippling effect anyway.

I've read in some places that actually the size of the orthographic camera is a major factor in making the pixels look correct. $$anonymous$$aybe I need to post a new question about how to make sure the pixel art will work with the orthographic size and vice versa... I wonder if that would help with the ripple?

EDIT: Posted. http://answers.unity3d.com/questions/643631/will-correct-orthographic-camera-size-fix-point-fi.html

avatar image Owen-Reynolds · Feb 19, 2014 at 07:06 AM 0
Share

The ortho size won't matter, since all the math cancels out. In the end, you have a physical screen X by Y pixels, no matter what you do. But, what you were reading may have involved using the ortho size to make it easier to shift the background in whole number pixels. Like if the ortho cam is the exact pixel size of the screen.

avatar image Romano · Feb 19, 2014 at 07:15 AM 0
Share

That is indeed the kind of thing I was hoping to try out. Can you explain what you mean by all the math cancels out?

The orthographic size does seem to make a difference though - by changing it incrementally I can see a difference in the way the jitter looks. It looks better or worse depending on what I do with the size.

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.

Follow this Question

Answers Answers and Comments

19 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

Related Questions

Is it possible to default sprites to Point (No filter) instead of Bilinear? 0 Answers

Artifacts: Point, Bilinear, Trilinear 1 Answer

Is there any way for a Sprite Renderer to use mipmaps? 1 Answer

2D Level Design (programmatically or not) 1 Answer

Animataion of a Sprite v2 1 Answer


Enterprise
Social Q&A

Social
Subscribe on YouTube social-youtube Follow on LinkedIn social-linkedin Follow on Twitter social-twitter Follow on Facebook social-facebook Follow on Instagram social-instagram

Footer

  • Purchase
    • Products
    • Subscription
    • Asset Store
    • Unity Gear
    • Resellers
  • Education
    • Students
    • Educators
    • Certification
    • Learn
    • Center of Excellence
  • Download
    • Unity
    • Beta Program
  • Unity Labs
    • Labs
    • Publications
  • Resources
    • Learn platform
    • Community
    • Documentation
    • Unity QA
    • FAQ
    • Services Status
    • Connect
  • About Unity
    • About Us
    • Blog
    • Events
    • Careers
    • Contact
    • Press
    • Partners
    • Affiliates
    • Security
Copyright © 2020 Unity Technologies
  • Legal
  • Privacy Policy
  • Cookies
  • Do Not Sell My Personal Information
  • Cookies Settings
"Unity", Unity logos, and other Unity trademarks are trademarks or registered trademarks of Unity Technologies or its affiliates in the U.S. and elsewhere (more info here). Other names or brands are trademarks of their respective owners.
  • Anonymous
  • Sign in
  • Create
  • Ask a question
  • Spaces
  • Default
  • Help Room
  • META
  • Moderators
  • Explore
  • Topics
  • Questions
  • Users
  • Badges