'ID Mask' anti-aliasing problem

Hello,

When using the ‘ID Mask’ nodes to separate by material ID or object ID, the anti-aliasing checkbox no longer (since 2.76b) anti-aliases as I believe it should.

This is supposedly not a bug, see here: https://developer.blender.org/T47798

I cannot use the workaround mentioned at the bottom of the page on above link due to a legacy setup for some projects.

I know I can blur the edges and use dilate / erode etc. but for me 2.76b did it just right.

Does anyone know another work around or if I can simply copy & paste some bits of code from 2.76b into a newer version?

Attached is the .blend file and outputs from 2.76b & 2.78c, see the vertical edges to the cube.

Cheers, tom_holly

Attachments



anti-alias problem.blend (562 KB)

Hum, indeed this new anti-aliasing isn’t showing up much…
Getting good edges out of ID masks in general is always an issue.
Here is how I would edge/dilate to get something workingish…


I can’t help you to get a patched blender version, but that sound a bit of a nightmare if you’re not used to this.
I advice you to stick for 2.76 for that project if you can, or make a custom nodegroup that clean the edges in some way and then put that all over you project, you may end up having something working faster than trying to compile blender and all.

Good luck ! :smiley:

PS : the technique in the description is nice but it’s limited to 3 mask , or you need to stack many renderlayers to just output ID masks, it’s ok in some cases but not great in others. I think we have to stick to edges/blur tricks unless a better anti-aliasing is found…

Many thanks sozap,

I will give this a go.

As a work around, I rendered masks at 400% and scaled by 25% to get what I needed when I had to use version of blender > 2.76b.