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
2
Question by DoubleElite · Apr 06, 2012 at 02:10 AM · cameracullingimage-effectsunitypro

The "top" camera is removing image effects from the bottom.

So, I'm having a bit a issue. I have two cameras, one for the environment and one my first person weapon (being used as a culling mask to prevent the gun from going into the walls). My issue is that I want to apply the SSAO image effect to the environment camera, however, because the weapon camera has a higher depth, it removes the filter. And I can't add the effect the weapon camera because all it's rendering is just the gun. Does anybody have any ideas?

Thanks! And if you need more info, let me know.

Comment
Add comment · Show 3
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 FlameOn · Apr 06, 2012 at 02:26 AM 0
Share

You, don't need to put two cameras, you only, need one, but, you could put two camera supposedly, I spelled it wrong, for split screen. I think if the effect is for the gun put it on the gun if not, put it on the camera, but never the enviroment, I tried it once stupidest thing ever and audio, without, a trigger. That was along time ago. You could also remove depth I think with the filter, I can't remember I usely don't have a Problem like this.

avatar image Kryptos · Apr 06, 2012 at 08:10 AM 0
Share

Could be related to the clear flags on both camera. What are their settings right now?

avatar image DoubleElite · Apr 06, 2012 at 04:37 PM 0
Share

The weapon camera's clear flags is set to depth only, and the environment camera is set skybox.

2 Replies

· Add your reply
  • Sort: 
avatar image
0

Answer by Bunny83 · Apr 06, 2012 at 11:14 AM

I would suggest using one camera and use a special shader for the gun that doesn't do a depth test(ZTest Always).

Additionally you could also set the render queue to something behind transparent so it's drawn at last, but that's not really necessary.

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 DoubleElite · Apr 06, 2012 at 04:39 PM 0
Share

The problem is that $$anonymous$$y weapon model is made up of many different models, so I use many different materials and thus it really wouldn't be effective. It seems kinda dumb the way the cameras are rendering things, every camera should be able to have their own effects.

avatar image
0

Answer by Kryptos · Apr 06, 2012 at 04:48 PM

Try to set the clear flags to the weapon camera to Don't clear because you need the depth for the SSAO (see http://en.wikipedia.org/wiki/Screen_Space_Ambient_Occlusion).

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 DoubleElite · Apr 06, 2012 at 06:56 PM 0
Share

Well, for the SSAO it kinda worked. But if I do it that way it removes the whole culling mask setup. $$anonymous$$aking my weapon still go through walls and such. Thanks for the idea, I just think Unity needs a better way to handle this kinda setup. Either that or I'm doing something wrong.

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

6 People are following this question.

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

Related Questions

Image effects do not work when rendering with multiple cameras 0 Answers

Ngui Camera and Image effects 0 Answers

How do I get my camera to render 2 culling masks in scripts? 2 Answers

Render an layer from the position of player to a specific distance 0 Answers

3D Objects are not being in their regular shape at distance 2 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