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
0
Question by rcabot · May 04, 2019 at 05:05 PM · shaderstransparencypost processingblendinglayering

Blend transparency effect on objects on a certain layer with background, but not with each other

Hi there!

alt text

The problem I have is that I'm trying to figure out the best way to implement a "Hologram Layer" effect with some specific requirements: alt text


  1. Two sorts of object, holographic and non-holographic. Holographic objects are slightly transparent, and non-holographic objects aren't.

  2. Holographic objects should not blend with other holographic objects - that is, they should occlude each other, as if they were rendered to a layer that was separately transparent (not independently transparent).

  3. Near non-holographic objects should occlude holographic objects, but far ones should be seen through holographic objects.


These two images illustrate the effect I'm trying to get.

alt text

I've tried a couple of solutions so far, but have not succeeded in getting either one to work.


  1. Transparent fragment shader, but with some kind of stenciling. I'm not that good with shaders, and as far as I know, there's not a way to stencil out fragments in terms of Z order? Please let me know if I'm wrong.

  2. Screen space layers, with two different rendering cameras and post/screen space effects. One renders the holographic layer, and one renders everything else. However, even when set to the same depth level, the holographic camera renders everything over the top, meaning that objects that would have occluded them get rendered behind. I've then tried using depth textures to manually occlude stuff, but I think this could be too involved/waste of time.


This seems like an easy enough effect to achieve. It's been difficult to find solutions and advice online for this specific effect. Thank you in advance for the advice! - Rachel

-holoeffect-wrong.png (56.9 kB)
-holoeffect-correct.png (53.9 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

1 Reply

· Add your reply
  • Sort: 
avatar image
1

Answer by Hellothere_1 · May 05, 2019 at 01:09 AM

By far the easiest (though depending on your preferences not the prettiest) way to do this would be a shader using dithering transparency.

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 rcabot · May 06, 2019 at 08:53 AM 0
Share

Hi! That is a pretty good idea and a simple way to achieve what I'm describing - unfortunately we also want to try out some different blending modes, like additive. If I'm not able to figure out an alternative I will probably go with this though!

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

114 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

Related Questions

Silhouette overlay shader 0 Answers

How to write shader for hard light blend mode in unity 1 Answer

How to make make an object look like an Opaque but still have Alpha fading effect? 1 Answer

TransparencyLM - Colored Shadows 0 Answers

Unity 3d PBR shader graph: replace transparency with color 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