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 jorgeardz · Aug 08, 2012 at 03:27 AM · transparencyalpharendertransparentblending

Transparency with correct culling

Imagine the camera looking the main character's back, I want to see tru it, let's say the enemies in front of my character, but I don't want to see my own character's arms that should be occluded by it's back

If I make it transparent , the arms can be seen tru the back, which is wrong, then I need the culling to happen correctly ( back culling is not the solution )

Then I need first to get the correct culling, and then make it transparent, I know how to do that with render targets, although I don't have unity pro

Is there a way to do that with the Unity basic version?

Thank you

(edited to clarify the problem)

Comment
Add comment · Show 5
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 Bunny83 · Aug 08, 2012 at 03:30 AM 0
Share

Uhmm. the point of transparent objects is to see what is behind it don't you think? So you want to cull certain things but not everything? I think i don't get what you want. Can you add a screenshot that shows your problem?

avatar image jorgeardz · Aug 08, 2012 at 04:41 AM 0
Share

Imagine the camera looking the main character's back, I want to see tru it, let's say the enemies in front of my character, but I don't want to see my own character's arms that should be occluded by it's back

I don't have my unity computer handy, I'll post a screenshot later

Thank you

avatar image PAHeartBeat · Aug 08, 2012 at 05:01 AM 0
Share

Hi Alpha Blending and Alpha test is good option you just need to use texture with alpha where you want transparency. but Alpha test used more resource then alpha blending and it's sometime killing the game when we trying it for device like iOS or android device

avatar image jorgeardz · Aug 08, 2012 at 05:30 AM 0
Share

Thanks RAJPatel

I don't think a texture with alpha would work, because the transparency is not static, it depends on the perspective of the camera

avatar image PAHeartBeat · Aug 08, 2012 at 11:16 AM 0
Share

Hi Jorg I think you have a simple option move your camera little above on Y Axis. As Second option just put your camera it little bit over and back side of your player head with rotation downside X axis, and script will tack care of movement of your camera as per your player / character position

you can find the ready script on car Tutorial project of Unity3D. the script is whoToLookAt.js.

2 Replies

· Add your reply
  • Sort: 
avatar image
0

Answer by PAHeartBeat · Aug 08, 2012 at 10:09 AM

Hi Jog

As I have not much experience in Unity3D but you can go with lerp and culling with shader option, you will find more option from Jessy's video tutorial for shader lab. I go through it and it's work for me. I used same technique in game Crazy Monster Truck - Escape for power feed back animation

link: http://www.youtube.com/watch?v=6Eyk-KU56ow http://www.youtube.com/user/JessyUV?feature=watch

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 Bunny83 · Aug 08, 2012 at 10:56 AM

The only way to render this unusual setup is that you have your arms seperate from your body. Otherwise there's no way to control in which order things are drawn. Transparency means you use alpha blending in the shader. So as first step all opaque objects are drawn and then all transparent objects are drawn sorted from far to near. Transparent geometry usually doesn't write to the z-buffer. Transparent geometry can't occlude other things.

You can fake this effect without problems, but only when your arms are seperate objects.

You can't specify the order in which the triangles of your character are drawn.

If you really need just the back, you can try to put a plane in the center of your character and use the depth-mask-shader.

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

9 People are following this question.

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

Related Questions

Change blend mode from outside shader? 3 Answers

Transparency shader problem 5 Answers

Sorting issues within single transparent mesh 1 Answer

Need help with opacity error 0 Answers

Blending and Decaying Alphas 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