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
1
Question by Cyriel_M · Sep 17, 2012 at 08:49 AM · cameraobjectlayerblur

Blur only specific objects

Hey All,

I have looked through the forum and the unityAnswers for my problem. But i just can't find anything like it. I hope you guyz could help me out. Here's my situation. I'm making a first person horror/survival game. I have 1 enemy that looks like a foggy shadow. I'm trying to give this specific model a blur-effect. I tried to use 2 camera's, and give one a blur-effect. I made a second camera that is a child of the maincam, and i called it "ghostcamera", and i gave that camera an image-effect (blur). I made a second layer called "ghost". And i made a cube (for testing) and gave the cube the layer "ghost". Now the ghostcamera is a child of the maincamera.

The Depth of the ghostcam is 0, and the depth of the maincamera is 1. I don't see the cube ingame. Because only the ghostcam can see it. But if i change the depth's of the ghostcam, i can ONLY see the cube. I was hoping i could get to see a mix of both camera's. And with the blur effect only on the cube. But i guess that doesn't work like i thought. Is there anything else i could try? Or am i doing something stupid or wrong? Or maybe both?

Before i gues questions about scripting, i have zero scripting experience. But i have somebody who can help me with that. I was just thought this effect wouldn't need any scripting. If you need more information please let me know ! :)

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 martinnnnnn · May 10, 2017 at 01:22 PM 0
Share

Hey @Cyriel_$$anonymous$$ , I'm running into the same problem and got to the same point as you : the motion blur shader takes effect on all objects... Have you found a solution to this ? :)

2 Replies

· Add your reply
  • Sort: 
avatar image
0
Best Answer

Answer by svenskefan · Sep 17, 2012 at 08:52 AM

Hi! You need to set the clearflags on the topmost camera to depth only. This way the top camera will draw its contents on top of whats already drawn by the other camera

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 Cyriel_M · Sep 17, 2012 at 10:52 AM 0
Share

Hey Thanks allot !! For the cube, that did work ! But the blur effect just goes on everything. Is there a way to put the blur-effect only on the cube ?

avatar image
0

Answer by Cyriel_M · May 14, 2017 at 07:11 PM

@martinnnnnn Hello, Sorry for my late reply. In the end I didn't find a good solution. I wanted to use this effect to create ghostly figures. And since they only show up once in a while and from a distance. We eventueally used 2d sprites. From a distance you don't see its a 2d object. And with afterFX or photoshop, you can make it look blurry and vague. For us, this effect was what we needed. But on a real 3d object we never succed this..

Here's a rough example of the effect we made. I have some fluently moving versions. But we never recorded those.. https://youtu.be/9t0CYgY5zjU?t=759

I hope this helps, and if not. I hope you find a solution :) I doubt I can do a lot for you, but If I can help with something, please let me know.

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 martinnnnnn · May 17, 2017 at 12:44 PM 0
Share

I find a solution : what you can do is have the camera with the blur shader render to a RenderTexture (I did it via script, in the "OnRenderImage" of the script attached to the camera), then use this RenderTexture in a shader used in the OnRenderImage of the main camera. You can then mix both images in this shader. I hope this is clear enough ! If someone is ever interested don't hesitate to contact me, I can send the actual code that might make it clearer. Thank you for your help @Cyriel_$$anonymous$$ , your ghost looks really cool ! it's good to know you can get away with just 2d sprites in some senarios :)

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

13 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

Related Questions

Zoom camera based on position between player an object 2 Answers

With multiples cameras, How to change what is rendered without using layers? 2 Answers

Camera Orbiting Character: How to make an object move with another with no rotation 1 Answer

Make object follow mouse, while actually moving camera, instead of object 2 Answers

Attaching an object to a camera movement weird, Help! 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