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 MLM · Jan 22, 2014 at 05:23 AM · texturematerialuv

Weird "ghost" texture issue with Transparent Texture/Shader

I have an issue with a transparent texture where when viewed at certain angles and distance some "ghost" texture appears on the caps of the cylinder. This happens in both the Game and Scene view.

The ghosting seems to be partially cured by increasing the Aniso Level on the texture import settings but doesn't solve the problem at far distances. The problem gets worse as you zoom out (see second image) although it is much better with aniscropic filtering at 9 (full filtering). I have no idea if this is the root/actual problem because aniscropic solves blurriness at shallow angles it just seems to mitigate the ghosting a bit.

Note: Texture.anisoLevel levels pertain as so:

  • 1: No filtering

  • 9: Full filtering

Texture Ghosting with Transparent Texture according to Aniso level Texture Ghosting vs Distance at both Aniso 1 and Aniso 9

I understand that this may be a LOD, MIP, or some other quality setting issue but I just have no clue. This problem is also weird because the caps (top, bottom) are not textured at all and those UV's are basically out of the picture. Notice that when the caps are selected that the UV's are not projected. If the texture touches those edges it does paint the surface but the texture used clearly doesn't reach the top or bottom.

Cylinder with custom UV map

I am using a custom shader based off of the "Transparent/Diffuse" shader which still has this same issue. You can download the Unity Shaders source which includes "Transparent/Diffuse" here

Shader and Texture in use


Also as a tangent... If anybody knows how to make a texture auto-tile across many objects of different size that would be great. I have asked before but wanted to mention it again.

To make different size cylinders without stretching I think I will have to procedurally generate a cylinder mesh with the appropriate amount of radial segments based on scale. Here is a start someone made (normals are kinda messed up and the caps are a bit weird). But then I would still need to create a new material for every tilingX variation of the material.

Comment
Add comment · Show 3
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 MLM · Jan 22, 2014 at 04:05 PM 0
Share

@nesis Disabling Generate $$anonymous$$ip $$anonymous$$aps solved the issue at every angle and distance so I think you were spot on. I had a suspicion but I didn't know how to mess with it or knew it was affecting my texture. Other settings did lessen the effect but no combination made it go away besides just disabling it.

Just to make it clearer, The cap UV's are mapped but they are on the edge of the map meaning that the texture I am using shouldn't be touching it (maybe mip map textures were). I also just scaled down the UV's so that none are touching the edge but it had no effect on the ghost UV's.

$$anonymous$$ake an answer so you can get some more credit :)

avatar image Pangamini · Jan 22, 2014 at 04:21 PM 1
Share

$$anonymous$$y suggestion: get a cylinder mesh without circle bases; you will save unnecessary fills and also get you rid of the problem

avatar image MLM · Jan 22, 2014 at 04:45 PM 1
Share

@Panga$$anonymous$$i So you recommend the cylinder type on the right? http://i.imgur.com/cd5gfah.png - I will model one up and test. EDIT: Just tested both of those configurations and they both have ghost texturing: http://i.imgur.com/b0Jbwvf.png

EDIT2: Sorry Panga$$anonymous$$i, I misunderstood you. I have deleted the caps (top, bottom) and as expected the ghosting is gone even with mip-maping and Aniso level 1 or 0. Thank you for the suggestion as having the mips makes it more performant. http://i.imgur.com/$$anonymous$$bjo6Ak.png

2 Replies

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

Answer by nesis · Jan 22, 2014 at 05:34 AM

I suspect you're seeing the result of mipmapping. In case someone reading this doesn't know, mipmapping is an automated reduction in texture detail when you view it on a surface from a distance or at a shallow angle.

Disable mipmapping on your texture asset and you should be fine.

I suspect the tris on the caps have UVs (otherwise you'd be getting errors reported by your material in the console). I also suspect your cap UVs are outside the UV map you've screenshot, rather than being deleted? If that's the case, Unity will tesselate the texture across to where those UVs are and will map them anyway. The weird ghosting is probably just low-res mipmaps bleeding colour across to those UVs.

To disable mipmapping, select your texture in the Project tab, then in the Inspector tab, change its Texture Type to Advanced. Some new options will appear in the Inspector tab, amongst which will be Generate Mip Maps. Fiddle with those options - including turning them off - and see if that fixes it.

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 AlanMattano · Feb 13, 2019 at 09:10 PM

  • Mipmapping example

Mipmapping reduces texture detail size when you view it for distance or at a shallow angle.

  • Aniso Level example

Aniso Level value move back in distance when this low-res occurred. Adding Aniso Level the blur reduction in texture detail is done farther back, you get more quality and is more computationally expensive.

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.

Follow this Question

Answers Answers and Comments

21 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

Related Questions

Assigning UV Map to model at runtime 0 Answers

UV Mapping for 2D Meshes with 3 Vertices Only 1 Answer

How to rotate a texture on plane 45 degrees 0 Answers

Can I have multiple/alternate UV textures for one mesh in a single file? 0 Answers

How can i choose the UV than i want to use with each Texture of a material ? 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