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 /
This post has been wikified, any user with enough reputation can edit it.
avatar image
0
Question by thebarryman · May 12, 2013 at 04:16 AM · layersimage effectsmultiple camerasselective

Blurring only the top camera

I am rendering light shafts and want to blur them to mask some edge artifacts. Enclosed is a picture of what it looks like now.

Basically my current set up is that I have one camera rendering the entire scene, except the light shafts, and then I have another camera in front of it that does not clear the depth or color buffers, that is rendering the light shafts.

I thought this would be relatively easy -- the camera previews show exactly what I would expect, and the final image is composited as it should be. The only problem is that once I apply the blur image effect to the light shaft camera, the entire scene is blurred, not just the light shafts.

In general terms, I want to be able to render a light effect that is masked by the z-buffer properly (but does not write to it), blur it, and composite it with the rest of the scene using simple additive blending. I've been searching for hours, and although I've found many questions similar to mine, I haven't found any answers.

Thanks so much!

alt text

lightshaftssmall.png (169.0 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 ZannaU · May 01, 2015 at 04:04 AM 0
Share

Did you find a solution for this problem? I'm having the exact same issue in my project. Thanks for sharing

1 Reply

· Add your reply
  • Sort: 
avatar image
1

Answer by bernardfrancois · Sep 11, 2013 at 04:01 PM

Since blurring the scene is a post-screen effect, it blurs the entire view buffer.

I suggest the following solution:

  • Rendering the top camera to a MovieTexture (Unity Pro only)

  • Applying the blur to that camera

  • Showing the movieTexture on a plane

  • Having an orthographic camera render that plane. The Ortographic Size must then be set to half the height of that plane.

I didn't try if this works, but let me know if it worked or if you encountered any issues with it.

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 dasbin · Oct 29, 2013 at 04:48 AM 0
Share

This doesn't work because the blurry camera only blurs between what it sees and a solid color (set by the clear flag color, usually black) and doesn't seem able to blur with transparency (setting alpha=0 on the clear flag color doesn't work, not does setting other clear flag options). The end result is strange looking colored blobs underneath the things the blurry camera renders.

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

17 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

Related Questions

Unity 5 image effects for multiple cameras 1 Answer

Make GameObjects dynamically visible/invisible for certain cameras 1 Answer

What are the performance issue of using multiple camera in layers (Mobile) 0 Answers

Render Splitscreen to RenderTexture 0 Answers

Unity - blur on one camera effects the other as well 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