Wayback Machinekoobas.hobune.stream
May JUN Jul
Previous capture 12 Next capture
2021 2022 2023
1 capture
12 Jun 22 - 12 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
4
Question by raminsh · Jun 13, 2011 at 02:57 AM · camerashadertexturetransparency

transparent shader objects disappear on certain camera angles

Hello we just faced this problem which is quite weird. I have 2 groups of objects which have mobile/transparent vertex color shader assigned to their material. now the problem is in come certain camera angle these object either have weird cutoffs or just totally disappeared. now when I change the camera height or angle these objects appear or the cutoff problem is gone. having said that, our camera is stationary and we certainly do not like to relocate it. any solutions?

Comment
Add comment · Show 1
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 Jessy · Jun 13, 2011 at 12:46 PM 0
Share

Do not post on two different sites without crosslinks.

6 Replies

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

Answer by raminsh · Jun 15, 2011 at 01:52 AM

ok, I actually figured it out. just in case others have the same problem: when you are have 2 object in front of camera and in front of eachother and they both have transparency assigned specially if they have transparent texture like PNG files, make sure that at least the one behind is using alpha cut off not regular simple transparency shader.

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 Jessy · Jun 15, 2011 at 02:23 AM 0
Share

That doesn't solve the problem. Your edges are either binary or will be sorted in the wrong order (and the latter requires two draw calls). You need to do something to control the sorting order unless that is acceptable.

avatar image raminsh · Jun 17, 2011 at 06:14 AM 0
Share

you might be right but do you have a solution for it? because the only way that solved the issue was just that. using alpha cut of on one of them

avatar image Jessy · Jun 17, 2011 at 01:40 PM 2
Share

Unless your edges were binary, you did not solve the problem; you only mitigated it. There is no universal solution; how to sort queues depends on your project, and may be practically impossible, which is why people take the approach you did. http://unity3d.com/support/documentation/Components/SL-AlphaTest.html $$anonymous$$etroid: Other $$anonymous$$ is a recent game that used only alpha testing and no blending. Very ugly foliage!

avatar image
1
Best Answer

Answer by raminsh · Jun 13, 2011 at 03:33 PM

Have tried playing with near and far clip already no result there. Apparently it's an issue with two transparent objects in front of eachother.

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
1

Answer by rajeshraj · Dec 05, 2013 at 07:14 AM

problem solved...change the shader to transperant cutout....thanx raminsh

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 CgShady · Nov 27, 2012 at 11:44 PM

If you look into the last shader from the page http://docs.unity3d.com/Documentation/Components/SL-AlphaTest.html you can notice they turn off ZWrite.

Adding ZWrite off to every passes of your shader should do the trick. At least, it did for me.

Comment
Add comment · Show 2 · 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 Cascho01 · Jun 27, 2013 at 12:08 PM 0
Share

Same problem here. ZWrite off is not acceptable for me.

Any further ideas are very welcomed - thanks very much!

avatar image chatpongs · Feb 18, 2020 at 12:12 PM 0
Share

This solution works for me. Thanks!

avatar image
0

Answer by DanjelRicci · Jun 13, 2011 at 02:37 PM

Sounds like a problem of Clipping Planes. Go to your Camera object, then both reduce the Near vale and increase Far value. This should solve the problem, let us know!

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
  • 1
  • 2
  • ›

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

8 People are following this question.

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

Related Questions

Make transparency ignore meshes inside? 1 Answer

Saving Texture at Run time and Reusing it 0 Answers

Is there a shader that will give me a range of transparencies for an unlit texture? 2 Answers

How do I blend or overlay a texture over the main texture? 1 Answer

Is there a shader in Unity that prevents transparent parts from overlapping? 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