Blur radius - why?

Wondering how to accomplish a certain animation task? Ask here.

Moderators: Víctor Paredes, Belgarath, slowtiger

Post Reply
User avatar
Jkoseattle
Posts: 433
Joined: Tue Nov 08, 2016 6:39 pm

Blur radius - why?

Post by Jkoseattle »

My video mimics shadow puppets. Each body part is actually an imported image of real cut black paper. (I was able to get a much more convincing cut paper look with scissors than by messing with points!) However, the shapes were too crisp, so I placed a blur radius of 2 on every layer in my character. Looks great.

HOWEVER... some layers were much more blurred than others. I finally figured out why, and I'm wondering what is the advantage of it being coded this way: Adding a blur radius to a switch layer multiplies that radius for every layer in the switch. This is not a problem for group or bone layers, only switch layers apparently. Which means I can globally set the BR for everything in one go, but before I set it I must de-select the switch layers first (leaving their children selected). So when I am done, everything has the BR set, but the actual switch layers themselves must be at 0.

What's also odd is that if instead of setting the BR for the switch children you instead set it in the parent switch layer and leave all the child layers at 0, it STILL MULTIPLIES! The parent switch layer itself must have the BR set to 0, or it is wrong.

What is the advantage of this, or is it a bug perhaps?
Most of the time I'm doing music stuff. Check me out at http://www.jimofseattle.com/music.

Thing I did for work: https://www.youtube.com/watch?v=LgFYGqifLYw
User avatar
synthsin75
Posts: 10253
Joined: Mon Jan 14, 2008 11:20 pm
Location: Oklahoma
Contact:

Re: Blur radius - why?

Post by synthsin75 »

I can't see any difference between switch and group layers. Does this happen in a new file?
User avatar
Jkoseattle
Posts: 433
Joined: Tue Nov 08, 2016 6:39 pm

Re: Blur radius - why?

Post by Jkoseattle »

Hmmm, in a new file, it's an issue with both group and switch, but in my own project, only the switch layers do the multiplying thing. In the new file, the issue definitely still presents, though it is the same problem for both group and switch layers:

1: Image not in a group:
Image Blur radius = 10: rendered radius = 10
2. Image in a switch layer (or group layer maybe):
Image BR = 10, Group BR = 10: rendered BR = 20(?)
3. Image in a switch layer (or group layer maybe):
Image BR = 0, Group BR = 10: rendered BR = 20(?)
4. Image in a switch layer (or group layer maybe):
Image BR = 10, Group BR = 0: rendered BR = 10
Most of the time I'm doing music stuff. Check me out at http://www.jimofseattle.com/music.

Thing I did for work: https://www.youtube.com/watch?v=LgFYGqifLYw
User avatar
synthsin75
Posts: 10253
Joined: Mon Jan 14, 2008 11:20 pm
Location: Oklahoma
Contact:

Re: Blur radius - why?

Post by synthsin75 »

I can see it now. It seems to depend on the image I use here. A 500x500 png doesn't show the difference anywhere near as much as a 500x1500 jpg.

With some more testing, the difference seems to be due to layer scaling. I had to scale the 500x1500 more to fit the output dimensions, so the difference between grouped and ungrouped blur was bigger. I would guess that your original file has the layer in the switch scaled more, so it has more blur.

If I blur the group/switch and scale it to match the ungrouped blurred image, they look the same, but if I scale the grouped image it will have more blur from the group. This does make sense programmatically, because group/switch/bone layers are compositing envelopes when rendering. The child layer/s are composited together, and that result is composited, after group layer effects, with the other sibling groups.

When the group is scaled, its blur treats the image, at default scale, as full resolution. But when the image is scaled, there is less resolution to passed up to the group for blur processing. It sounds complicated, but all you need to remember is that the layer that applies the blur must be the one that is scaled, if you want the blur to match an ungrouped and scaled layer.
User avatar
Greenlaw
Posts: 10384
Joined: Mon Jun 19, 2006 5:45 pm
Location: Los Angeles
Contact:

Re: Blur radius - why?

Post by Greenlaw »

Haven't had my coffee yet but I'm going to type like I've already had too much anyway. :)

When I need to soften the edge of an image, I'll normally do this in post using a compositing program like After Effects. A 'dumb and easy' way to do this is to use a matte choker on the layer. The advantage is that this only softens the edge, not the interior of the element, unlike applying an overall blur to an image in Moho.

More typically (for me anyway,) I'll use a Sobel-type filter on the alpha channel. This basically gives you an 'edge trace' which you can use as an isolation mask. You can apply an erode/dilate filter to this mask expand or contract the thickness of the 'edge trace', and the apply a blur to soften the edges. Once you have the edge mask, apply it to a Gaussian blur to blur only the image/animation's edge. I normally do this in Fusion but I've done a variation of this trick in After Effects for adding lightwraps and other edge tricks.

This might sound like a lot of trouble for an edge treatment but it's easier than it sounds, and more importantly, you'll have more precise control for combining the edge treatment with other masks and effects. I mainly do this in for live action, cg and vfx but it works well for 2D animations too.

Yeah, I know...this is probably more than you want to deal with so just putting it out there. For me, I think Moho is an excellent 2D animation program but when it comes to special image enhancement tricks, I usually find a lot more options available by importing Moho layers into compositing programs.
Post Reply