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 /
avatar image
2
Question by Laurent_Lavigne · Apr 24, 2010 at 10:47 AM · alphaeffectblurpost-process-effect

Blur Effect on camera slice - How do I blur only only the rendered portion of a camera which clear flag is set to Depth only ?

Blur Effect blurs the entire frame and I only want to blur the portion which is rendered. How do I do that ?

this is what I want (photoshopped): http://img263.imageshack.us/img263/9816/screenshot20100424at115.jpg

but this is what I get when the blur effet of camera 2 is turned on - the whole frame is blured, not just what camera 2 is rendering http://img97.imageshack.us/i/screenshot20100424at115.png/

here is my set up

Camera rig : camera 2 is the foreground camera http://img641.imageshack.us/img641/9429/screenshot20100424at120.png http://img708.imageshack.us/i/screenshot20100424at115.png/

entire scene http://img6.imageshack.us/i/screenshot20100424at115.png/

view through camera 2 blurr off http://img72.imageshack.us/img72/8194/screenshot20100424at121.png turned on... http://img217.imageshack.us/img217/3470/screenshot20100424at122.png

Comment
Add comment
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

1 Reply

· Add your reply
  • Sort: 
avatar image
1

Answer by sean · May 06, 2010 at 10:05 PM

Short answer is that my best guess for the process is as I put down in http://answers.unity3d.com/questions/8983/can-you-use-a-camera-effect-that-only-applies-to-a-certain-layer

Try doing it with two cameras in the same position set to render to the same part of the game window. One has a blur filter and only renders objects on one set of layers, one has no filter and only renders objects on the other layers.

If the objects on the respective layers interclip eachother... then the process goes into the realm of the hypothetical, but you may be able to use some shader wizardry to render-to-texture a mask that contains info on whether a given screen pixel contains an object tagged for one layer or another.

Based on your description, you seem to be doing something similar... I'd double-check that the foreground camera is set to not render your background objects and vice-versa. If all else fails, you may need to do something hack-ish like render each camera independently to a texture in real time and layer those textures as GUI elements :P

Comment
Add comment · Show 2 · 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 Laurent_Lavigne · Apr 08, 2011 at 09:20 AM 0
Share

So with two intersecting cubes on different layers, one camera rendering only one layer and set to Do Not Clear, the two cubes intersect

But as soon as I add the dof on the skybox/ rest of the scene camera, they no longer intersect.

So it seems the dof shader overwrites the camera's depth ... and I logged bug #397887

avatar image sean · Apr 11, 2011 at 02:49 PM 0
Share

This is a realm where what you're trying to do may go against some fundamental hacks/assumptions in the graphics pipeline; I'm not sure. The skybox is going to be treated somewhat specially, since it isn't supposed to have a position per se, just to render "behind" everything regardless, and to do this, it may need to use certain buffer bits in unusual ways. Also, any blur effect is going to be strictly 2D postprocessing, and may assume a final screen render target and thus play fast-and-loose with setting e.g. depth bits as there is no way for them to be relevant.

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

1 Person is following this question.

avatar image

Related Questions

Simulate Shutter Speed 1 Answer

Blur the alpha part of a shader 1 Answer

need help with javascript for underwater blur effect 1 Answer

OnRenderImage with 16 bit framebuffer 0 Answers

Changing render time (framerate) of a shader 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