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
3
Question by Pierre-Claude · Feb 23, 2011 at 10:59 PM · gameobjectbloomimage-effects

Applying Motion Blur (or any image effetct) to a specific GameObject.

What I am trying to do is apply a motion blur only to my ninja shown in the image below.

http://img411.imageshack.us/i/ninjav.png/

I have the Pro version of unity, meaning I can easily use the Component->Image effects->Motion Blur. Sadly, this affects the whole rendering (the whole scene), not only my speedy ninja.

I read around and what I understood I had to do and did was:

1-I went in the layer editor and created a user layer wich I named "Ninja".

2-I selected my ninja GameObject and set is layer to Ninja layer(all his children also had their layers changed to ninja).

3-Modified my Main Camera culling mask to only render "Default". If I run the game at this point, my ninja is invisible, wich is expected (right?).

4-Create a new Motion Blur Camera (wich is a children of the main camera, not sure if that is a good idea) wich as the Ninja Layer as culling mask. If I run the game at this point, my ninja is visible, wich is expected (right?).

5-I added the Motion Blur image effect to my Motion Blur Camera (wich is only rendering the ninja, at least it's what I'm trying to make it do.)

Now Im expecting the ninja to have motion blur and the rest of the scene to be clean... but depending on the depths of the cameras I get either:

-The original result, with the whole scene affected by motion blur. This happens if depth of the main camera > depth of the motion blur camera.

or

-The whole scene affected by motion blur, plus the ninja is rendered over everything (UI, objects between him and the camera). This happens if depth of the main camera < depth of the motion blur camera.

In all cases the Clear flags are set to depth only.

I don't really understand how else to do this. Maybe write my own motion blur shader for my ninja ? I know GLSL and HLSL, but I never wrote shaders for Unity.

Thanks for the feedback !

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
0

Answer by Eric5h5 · Feb 24, 2011 at 01:03 AM

Image effects are full-screen only, and apply to all cameras "below" the one you're using for the image effect. If you apply motion blur to the top-most camera, it affects all of them, regardless of whether they're using any image effects or not.

So essentially using multiple cameras won't work for what you want; you'd have to write some kind of custom image effect that somehow applies only to a certain object (using alpha channel maybe? not sure).

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

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

No one has followed this question yet.

Related Questions

enable/disable image effects in code 1 Answer

Black boxes on bloom flares Unity 5 problem 0 Answers

FastBloom is not supported on this platform? 1 Answer

How do I shedule image effects? 1 Answer

using Contains(gameObject) to find and destroy a gameObject from a list 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