ADOBE AFTER EFFECTS: Forum Expressions Tutorials Creative Cloud

Gradients as Map Layers

COW Forums : Adobe After Effects

<< PREVIOUS   •   FAQ   •   VIEW ALL   •   PRINT   •   NEXT >>
Anne LawantGradients as Map Layers
by on May 15, 2011 at 2:01:22 pm

Trying to make a tilt-shift effect (because, you know, it's just one of those things I want to have done), I found a simple tutorial. However, I stumbled upon a problem. I then realised I had a similar problem some time back working with time-remapping. Namely, the mapping system seems to behave as though the gradient has a way lower resolution. I'll show what I mean:

In this video, from roughly 0:25 forwards, you see sharp edges:






I rendered out a frame of the tilt-shift thing:
http://img198.imageshack.us/img198/816/mvi00010001213.jpg

As you can see, it goes (from top to bottom) from fully blurred to not at all blurred, back to completely blurred. However, the whole point of a gradient is that the effect is ramped up gradually, not instantaneously.

I could of course just duplicate the footage, make one layer blurred, the other not and put a feathered maks over the top layer, but that would be a cheat and would not have the effect come up slowly. Which I want. So, anyone have any idea? It feels like a simple solution should exist.



Return to posts index

Anne LawantRe: Gradients as Map Layers
by on May 15, 2011 at 6:29:34 pm

Here are two other pictures. The first is the gradient I'm using now, the second is the result. Interestingly, using the gradient diagonally results in a strange effect with lines of 90 degrees. Furthermore, changing the resolution changes where the actual edge of the blur effect is.

I'm not that familiar with the inner workings of After Effects. Does anyone now what is going on?

http://img59.imageshack.us/img59/1488/gradientmap.jpg

http://imageshack.us/m/848/3351/mvi00010010111.jpg



Return to posts index

Tudor "Ted" JelescuRe: Gradients as Map Layers
by on May 15, 2011 at 10:24:10 pm

If you are working at 8bit color depth try changing to 16 bit and 32bit. You will probably get different results. Also, you can try adding a blur to the gradient and/or noise. This will also help.
Maybe I did not understand exactly what you're after, but the kind of blur you have in the still that you posted can be achieved if you apply a blur on an adjustment layer and mask out the part you do not want affected by the blur. Feathering the mask will give you a softer transition.

Tudor "Ted" Jelescu
Senior VFX Artist


Return to posts index


Anne LawantRe: Gradients as Map Layers
by on May 15, 2011 at 10:38:49 pm

Heyhey, thanks for your reply, I'll try to explain better.

The pics I posted are the pics I have, not the ones I want. In the pics there is a clear problem. The edge of the effect is hard, not soft. The reason I want to use a gradient to map it to is because I don't want that hard edge. Right now I'm rendering out a version where I copied the layer and used a feathered mask to seperate the layers, but this is also not quite the way I want it.

If I use a feathered mask to go from lens-blurred to not lens-blurred, I have two instances of the effect: blurred and not-blurred. 0% and 100%. Now, the feathering does not give me spots where the image is 50% blurred. Merely spots where both the 0% blurred and 100% blurred are visible.

In theory, when using a gradient as a map, black pixels should blur the image 0%, white pixels 100%. But the awesome part is that perfect gray spots are 50% blurred, and other tints of gray should cover the entire range between 0% and 100%. But, as the pictures I posted show, this theory is not working out.

I'd understand if this is still somewhat strange. If so, I'll try to reformulate tomorrow.



Return to posts index

Tudor "Ted" JelescuRe: Gradients as Map Layers
by on May 15, 2011 at 10:48:57 pm

Just follow the tips in the first post and you should be fine- the adjustment layer with the blur and feathered mask is most likely the best solution- it will give you that nice transition from 0 blur to 100% blur and better control on how wide that transition is than a gradient.

Tudor "Ted" Jelescu
Senior VFX Artist


Return to posts index

Anne LawantRe: Gradients as Map Layers
by on May 16, 2011 at 10:12:52 am

Why this would the solution if I was working on a deadline and needed something to work, I would prefer the actual Map Layer process to work. Here is what I have now, working with feathered masks:







It might not be that obvious, but there are only three levels of blurriness in the frame. I want more levels, gradually moving into eachother. The way a gradient Map Layer would.



Return to posts index


Darby EdelenRe: Gradients as Map Layers
by on May 15, 2011 at 11:40:34 pm

[Anne Lawant] "In theory, when using a gradient as a map, black pixels should blur the image 0%, white pixels 100%. But the awesome part is that perfect gray spots are 50% blurred, and other tints of gray should cover the entire range between 0% and 100%. But, as the pictures I posted show, this theory is not working out."

What you describe is correct. Can you describe more about your workflow? Are you using OpenGL? The Lens Blur effect? Anything else?

Darby Edelen


Return to posts index

Anne LawantRe: Gradients as Map Layers
by on May 16, 2011 at 10:04:26 am

I am not using OpenGL, but turning the preview to OpenGL made no difference. I am right now using the Lens Blur effect. The way my project is setup is as follows:

The project is 1920x1080.
The first layer is a pre-composed Shape Layer, containing a diagonal gradient black and white shape. This pre-comp has a 5000x5000 resolution, but the problem existed even before I precomposed the layer and it was just 1920x1080 (pre-composing did not work as a fix, but I like the workflow aspect). This layer is turned invisible. Collapsing the Transformation does change the picture, but does not get rid off the sharp edges.
The second layer is an adjustment layer containing some colour correction.
The third layer is an adjustment layer containg the Lens Blur effect. The depth map layer is set to the first layer. The channel is set to luminance. The blur focal distance is set to 0, the iris radius is set to 15. The Repeat Edge Pixels checkbox is checked. The rest of the options are set to standard. Playing with the Iris and Focal Distance values does change the picture (at value 100, for example, another part of the frame becomes unblurred, but there is still a rough edge between what is blurred and what is not).
The fourth layer is my actual footage. Only effect is Time Remapping. I used to have the Lens Blur effect on the actual footage, but I put it on an adjustment layer, hoping that would fix the problem. It didn't.


So that's my workflow. My conclusion is that for whatever reason, using Map Layers is buggy. However, I don't see how this could be something like a driver issue. But then again, I don't understand why the problem occurs at all. Does anyone have any experience with this problem?



Return to posts index

Matthew KeaneRe: Gradients as Map Layers
by on May 16, 2011 at 1:26:47 pm

Just a couple of thoughts: Have you tried using a solid layer with the Ramp effect instead of the shape gradient? And have you tried the Compound Blur effect, to see if that shows the same problems as the Lens Blur effect?

I know that may not be the solution you're looking for, but it might help identify the source of the problem.


Return to posts index


Anne LawantRe: Gradients as Map Layers
by on May 16, 2011 at 3:23:59 pm

Okay, I just tried all that, no luck. The Compound Blur also has the hard edge when I have it point to the shape layer. The solid layer has no effect, wether I point the Compound or the Lens Blur towards it.



Return to posts index

Matthew KeaneRe: Gradients as Map Layers
by on May 16, 2011 at 3:28:09 pm

I'm pretty sure that the solid layer with the gradient effect will need to be precomped for it to work as a gradient map. But it sounds like something is strange with the gradient on the shape layer.


Return to posts index

Anne LawantRe: Gradients as Map Layers
by on May 16, 2011 at 3:32:14 pm

Okay, pre-composing the Solid Layer did help, but now it has the exact same problem as the Shape Layer, namely that it still has the hard edge. Well, luckily mapping layers is nice, but not something I can't live without.



Return to posts index


Matthew KeaneRe: Gradients as Map Layers
by on May 16, 2011 at 3:47:50 pm

Then there's something strange going on with your project. I've just tried a quick test with both methods (solid + ramp & shape + gradient fill) and I'm not seeing blockiness like that. I even tried with a very small shape layer which I scaled up and with the layer quality set to draft, but it still looks OK.

To be fair, the test image I used was only about 2000px across, so smaller than your comp settings - is it possible it's a memory problem when working with a larger image? Also, my tests were with CS4 - did something change in CS5?


Return to posts index

Matthew KeaneRe: Gradients as Map Layers
by on May 16, 2011 at 4:18:09 pm

Ah, hang on... If you have an adjustment layer with colour correction effects in there - is it possible that it is affecting the gradient layer and causing the blockiness? Try previewing just the gradient and the colour correction layer and see how that looks.


Return to posts index

Anne LawantRe: Gradients as Map Layers
by on May 16, 2011 at 6:52:21 pm

Turning of the colour adjustment does nothing. I'm more and more convinced the problem is something with my system. But for the life of me, I can't figure out what. I don't understand how a memory issue would forbid layer maps to be used.



Return to posts index


Darby EdelenRe: Gradients as Map Layers
by on May 17, 2011 at 3:43:12 am

[Anne Lawant] "So that's my workflow. My conclusion is that for whatever reason, using Map Layers is buggy. However, I don't see how this could be something like a driver issue. But then again, I don't understand why the problem occurs at all. Does anyone have any experience with this problem?"

Following your workflow I don't experience the same issue you do. Can you get Lens Blur to work properly in a new project under the simplest of circumstances? Perhaps something is wrong with your AE installation.

Darby Edelen


Return to posts index

Anne LawantRe: Gradients as Map Layers
by on May 17, 2011 at 8:46:19 am

Yeah, I think a re-install may be the best option. In my first post, I posted a video with some time-remapping with Layer Maps. There too there are some hard edges.

Thanks everyone for all the help and thinking with me. I like this community :)



Return to posts index

<< PREVIOUS   •   VIEW ALL   •   PRINT   •   NEXT >>
© 2017 CreativeCOW.net All Rights Reserved
[TOP]