• 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
Question by keyp3r · Feb 21, 2012 at 08:44 AM · multiple camerasdepth of field

Depth of Field 3.4 and multiple Camera Layers?

Correct me if I'm wrong, but according to previous questions on here, and the documentation on camera depth, if you put a post effect onto a camera, it should, in theory, effect that camera and each camera below it in depth, right?

In my scene I have three cameras; One the UI, one rendering objects in the fashion of the gun in first person shooters, and one rendering the scene. I'm attempting to get Depth of Field running on the camera rendering the scene, but any time the other cameras are active they seem to remove it and I don't know why.

I'm using the Depth of Field 3.4 that comes with Unity Pro, so nothing special on that end, and my UI and First Person camera are both clearing on depth and rendering only their respective layers (through Layer Masks). I guess I'm just wondering if this is the way its suppose to function, or if something is going wrong?

I've searched, but if this question has already been asked please redirect me.

Comment

People who like this

0 Show 0
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

2 Replies

· Add your reply
  • Sort: 
avatar image

Answer by keyp3r · Feb 22, 2012 at 09:59 PM

So, by asking around and talking with people I think the problem may have been pin-pointed. According to This, setting a camera's clear flag to Depth Only will "..discard all information about where each object exists in 3-D space." Meaning that when the camera rendering the gun renders over the one rendering the scene it, in theory, discards all depth information. I am still lacking a solution, but I have a few ideas. I know nothing about shader scripting, so how hard would be to make either a post effect that pulls the alpha channels of multiple cameras and adds them together to use as a mask on ANOTHER camera on top of everything that has DoF on it, OR filter depth information from one camera to another higher in depth?

Comment

People who like this

0 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 aj_246 · Aug 01, 2012 at 03:14 PM 0
Share

I am also running into this issue. Were you able to find a solution/workaround? --Thanks

avatar image

Answer by keyp3r · Aug 01, 2012 at 08:02 PM

It was, like most problems, a much simpler fix than I had anticipated and was stumbled across by a friend of mine. The camera on top of the depth order, in my case the UI camera, simply needed to be set to Vertex Lit under the Render Path drop down on the camera. Now I have no idea why this matters at all, which is why I never found it I'm sure, but thats it!

Comment

People who like this

0 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 aj_246 · Aug 01, 2012 at 08:16 PM 0
Share

Hah! So simple! Thanks for the quick response, works like a charm!

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.

Welcome to Unity Answers

If you’re new to Unity Answers, please check our User Guide to help you navigate through our website and refer to our FAQ for more information.

Before posting, make sure to check out our Knowledge Base for commonly asked Unity questions.

Check our Moderator Guidelines if you’re a new moderator and want to work together in an effort to improve Unity Answers and support our users.

Follow this Question

Answers Answers and Comments

6 People are following this question.

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

Related Questions

Depth of field with multiple cameras 0 Answers

Tesselletion "bypassed" by Depth of Field 0 Answers

Rendering a camera view on top of the GUI 1 Answer

Oblique Frustrum on Multiple Cameras 1 Answer

Multi Camera/Display Synchronization 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