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 Sixakoo_ · Aug 08, 2011 at 09:39 AM · camerashaderrendertransparentculling

Semi transparent Object behind walls?

I want to make an object to appear semi transparent when it is behind walls so that the camera would still be able to render it but in less solid form. Does this have to do with shaders or raycast? I not sure on the right keyword to search for the problem or even where to start. Hopefully someone could point me to the right direction. Thank you.

Comment
Add comment · Show 2
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 CHPedersen · Aug 08, 2011 at 09:48 AM 0
Share

This might be a stupid thing to ask, but I can't help my curiosity - Why is the object visible in the first place, if it's behind a wall? Is the wall itself transparent?

avatar image Sixakoo_ · Aug 09, 2011 at 03:45 AM 0
Share

I want it to be visible because the object is some sort of guidance to the player so that the player knows the location of the object wherever they are. The object is solid if the camera looks directly at the object and the camera would render it semi transparent when behind walls (will render through walls).

1 Reply

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

Answer by Waz · Aug 08, 2011 at 09:52 AM

Shaders. Basically, you need to render the object with two shaders: the normal material and one with an inverted Z test (as well as whatever glowing rim lit transparent whatever effect). Keywords:

 ztest greater shader

Try to make something with the Strumpy Shader Editor, or modify an existing shader source. This is a good simple intro to Shaders. You'll find they're quite fun.

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 Sixakoo_ · Aug 09, 2011 at 04:08 AM 0
Share

Thanks for the answer, will try it!

avatar image Waz · Aug 09, 2011 at 11:22 AM 0
Share

Note that to render with two materials, you can just give it two materials in the $$anonymous$$eshRenderer.

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

4 People are following this question.

avatar image avatar image avatar image avatar image

Related Questions

Several questions about OnRenderObject and Camera projection matrix use. 0 Answers

Is there any way to hide only part of an object from the camera? (unity free) 2 Answers

Shader Edges Transparent Relative to Camera 0 Answers

Glow effect - alpha channel ignored to some specific android device 0 Answers

Is it possible to tell unity not to render overlapping transparent objects after certain number of times? 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