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 /
  • Help Room /
avatar image
0
Question by sandvitch · May 11, 2016 at 12:30 PM · camerarenderingmask

Replace the camera's depth field view with another camera's view ?

Hello everyone,

I hope I don't post a doublon question but i didn't find an exact answer for it, so here I am :

I would like to know if it's possible to simply replace the depth field view of a camera (the Z buffer) with his "Clear mask" set as "Depth only" or "Don't clear" with the view of another camera.

In others words, for example, I have two cameras :

alt text

Let' say that the blue and red objects are at the same distance from their camera.

Even if I set the camera 2 with a lower Depth, I will see the blue object inside the red one (because of the distance from their camera), i don't understand why.

The result I'm looking for, is the "grey" in the camera 1 (because it's set as Depth Only, so the skybox is not rendered) is replaced by the view the camera 2 so : I get the reb object and the skybox as an immobile background even when the camera 1 or the blue object moves.

Thanks you for your help :)

example.png (16.6 kB)
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 Lewwwer · Jul 16, 2016 at 02:21 PM 0
Share

Hello! If you set the depth of the camera 2 lower to the camera 1, you will get the image of the camera 1 rendered on top of the camera 2. So the engine renders the camera 2's image and on top of that it renders the camera 1's image. this means that you will see the blue object. In your example given that these objects are spheres and the blue sphere is a bit smaller. Rendering the camera 2 it will give you the skybox and the red sphere as a circle. After rendering the camera 1 it will give you the blue sphere as a blue circle and the rest of the image will be the same as it was in the camera 2.

0 Replies

· Add your reply
  • Sort: 

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

66 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

Related Questions

Cut through camera render and display LITERALLY NOTHINGNESS 0 Answers

Unity 2018 and Depth Mask not working as I would expect 0 Answers

Scene and game view in old project became completely black. 0 Answers

Weird Rendering Unity5 1 Answer

How to apply a shader on a part of the scene ? 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