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 /
This question was closed Apr 15, 2013 at 06:54 AM by MaT227 for the following reason:

The question is answered, right answer was accepted

avatar image
6
Question by MaT227 · Aug 30, 2012 at 08:51 AM · textureimporttexture2dmipmaps

Texture mipmap distance

Hello,

Is it possible to define the texture mipmap generation distance ?

Thanks !

Comment
Add comment · Show 4
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 Wolfram · Aug 30, 2012 at 09:20 AM -1
Share

What is your intention and/or the problem you are having, why would you want to change it?

avatar image MaT227 · Aug 30, 2012 at 09:53 AM 0
Share

When i move the camera back the mipmap applied, but I want to increase the limit distance of mipmap application.

avatar image Wolfram · Aug 30, 2012 at 10:05 AM 0
Share

Yes, but why? If the mipmap is applied at greater distance, it means you would map a larger resolution texture to a smaller size, which will introduce more or less strong aliasing artifacts, and to prevent this type of artifacts is the exact reason mipmaps were invented for in the first place.

avatar image MaT227 · Aug 30, 2012 at 11:46 AM 0
Share

At this distance, the texture is too blury because of the mipmap

1 Reply

  • Sort: 
avatar image
8
Best Answer

Answer by Wolfram · Aug 30, 2012 at 09:19 AM

The mipmap is visible whenever it is necessary. Modifying that distance wouldn't change anything, or would even introduce artifacts.

Texture is displayed closer/larger than 1:1 (=more than one pixel per texel): Mipmaps are not in use.

Texture is displayed farther away/smaller than 1:1 (=more than one texel per pixel): Mipmaps are in use, and the correct required mipmap level is automatically chosen, depending on the texel/pixel ratio. Note your interpolation will be incorrect unless you also set the filter mode to "Trilinear".

UPDATE: in a more recent Unity-Version (tested: 5.5) they added the parameter Texture.mipMapBias, which can override the value of which mipmap level will be accessed, and therefore does exactly what you want. In fact, as the default setting indeed resulty in overly blurry textures, Unity's computation might be incorrect, and a value like -0.5 might be the "correct" choice. Note the mipMapBias value can only be adjusted via script, is not persistent between Editor sessions, but IS persistent between different Play sessions in the Editor (=as long as the Editor is open).

Comment
Add comment · Show 8 · 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 cregox · Apr 16, 2013 at 10:03 PM 0
Share

Additionally @$$anonymous$$aT, toy with `Aniso Level` and `Filter $$anonymous$$ode` for better / more expensive results. Worked for me.

avatar image Steven-1 · Aug 04, 2015 at 02:38 PM 0
Share

You're assu$$anonymous$$g the camera is looking straight at the texture. When looking at it from an angle, for example standing on the ground looking at the horizon, the ground texture will become very blurry because of mipmapping. Anisotrophic filtering can fix this (at a cost), but anisotrophic filtering isn't supported on all platforms. For mobile devices it would be usefull to be able to modify when it would switch mipmap levels (for textures that are only/primarily looked at at an angle).

avatar image Wolfram · Aug 05, 2015 at 10:37 AM 0
Share

Anisotropic filtering was created for precisely the situation you describe. No amount of regular mipmapping will help you there, it cannot improve the appearance of the far end of the texture beyond a certain level.

Please compare the 4 methods in the image below:

  • no mipmapping - which is essentially just a point filtering if the texels are smaller than a pixel.

  • mipmapping+bilinear - note the sharp edge in the distance where the chosen mipmap level is switched, resulting in a purely grey area (due to the worst-case texture "checkerboard")

  • mipmapping+trilinear - now the sharp edge is smoothed out, as now different mipmap levels are interpolated as well. However, at the far end, still 100% of the structure is lost

  • anisotropic filtering - only this method guarantees preserving the texture structure even at extreme angles. Note that even before the "bilinear edge" the texture is much sharper than with any mipmapping.

(open image in new tab and watch at 100%)

comparison of texture filtering

avatar image Steven-1 · Aug 06, 2015 at 08:49 AM 0
Share

I know, read my comment again. I'm saying anisotropic filtering isn't supported on all platform, which makes it useless to me. And mipmapping without anisotropic looks worse than no mipmapping. Allowing to have it switch mipmaps farter, would reduce the blurriness, while still reducing the noisyness of non-mipmapping.

avatar image Wolfram · Aug 06, 2015 at 10:20 AM 0
Share

You would merely be able to adjust the amount of noise vs. blur, and as noise is extremely visible especially if the object or the camera are moving (which almost always is the case), it is highly likely that you couldn't move any mipmap switching much away from how it's currently behaving. If it's the blurring in the distance you want to reduce, you might also want to consider voting for this feature: http://feedback.unity3d.com/suggestions/maximum-mipmap-level

Show more comments

Follow this Question

Answers Answers and Comments

10 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

Related Questions

mipmapCount for Cubemap and Texture3D 1 Answer

Custom mipmaps with texture import settings 0 Answers

Create .png file from script, then import as asset 1 Answer

Texture Settings - Generate Mip Maps, Why? 1 Answer

Disabling mip map turns texture normal 0 Answers


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