x


Can you use a camera effect that only applies to a certain layer?

Hi,

I would like to use a blur effect but only on certain objects. Is there a way I can put these objects on a certain layer, and have the blur only affect that layer?

more ▼

asked Apr 28 '10 at 08:10 PM

Pure Phase gravatar image

Pure Phase
224 21 24 31

(comments are locked)
10|3000 characters needed characters left

1 answer: sort voted first

Not sure if you can do it with a single camera, particularly given the nature of post-processing filters on the graphics card, but under certain circumstances you may be able to do it in multiple layered renders.

On one camera set to the full game screen, render only the layers you want sans-blur. On another camera set to the same params outputting to the same space, render only the layers you want blurred. If objects in the two layers don't intersect or clip eachother, just be sure to set the render order of the far-stuff camera to before the near-stuff camera and you should be set.

Otherwise, you may need a third pass and some special programmatic shader work to render a clipping mask texture (render ALL layers with a shader/filter that, rather than outputting to screen, writes a 0 to a texture when the rendered pixel is from one layer group and a 1 when it's from the other) and then plug that clipping mask into a filter on one camera or the other so that pixels only get drawn to the screen if they're part of what ~would~ be seen in that camera's layer set if it was being rendered with everything else.

more ▼

answered May 06 '10 at 09:40 PM

sean gravatar image

sean
296 11 12 19

I am sorry but i didnt understand the answer, I have similar problem http://answers.unity3d.com/questions/376851/can-i-blur-only-part-of-the-objects-on-my-scene.html can you please look at my question and tell me what am i doing wrong?

Jan 08 at 11:51 PM blackpag
(comments are locked)
10|3000 characters needed characters left
Your answer
toggle preview:

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

By Email:

Once you sign in you will be able to subscribe for any updates here

By RSS:

Answers

Answers and Comments

Topics:

x3003
x199
x78

asked: Apr 28 '10 at 08:10 PM

Seen: 2488 times

Last Updated: Jan 08 at 11:51 PM