Jump to: Board index » General » Fusion

Anti-aliased depth merge, How?

Learn about 3D compositing, animation, broadcast design and VFX workflows.
  • Author
  • Message
Offline

Kirill Kryukov

  • Posts: 24
  • Joined: Wed Nov 12, 2014 6:09 pm

Anti-aliased depth merge, How?

PostSat Nov 15, 2014 3:44 pm

When I try to compose objects by its depth with "perform depth merge" checked in in the merge tool I always get a line/edge of objects intersection aliased.

There is Zcombine node in Blender which is doing pretty much the same and it has "anti-aliased" check-box that fixes it there. Does Fusion have something similar or maybe I have to do the depth merge/Z blending some other way ?
Offline
User avatar

michael vorberg

  • Posts: 943
  • Joined: Wed Nov 12, 2014 8:47 pm
  • Location: stuttgart, germany

Re: Anti-aliased depth merge, How?

PostSat Nov 15, 2014 10:21 pm

from a pure technical point there cant be a antialiased z merge. a value in the z channel repesents a certain depth, antialiasing is a filter that would change that value and you end with a different depth.

but fusion can use the "coverage channel" from renderings to apply some antialiasing on z channel operations. but this channel is very hard to find in 3d renderers

then you can render your depth channel in 2x resolution and resize them before the z merge, this will give you some kind of filtering/antialising and can result in better looking z merges
Offline
User avatar

Stefan Ihringer

  • Posts: 257
  • Joined: Mon Nov 10, 2014 10:40 pm

Re: Anti-aliased depth merge, How?

PostSun Nov 16, 2014 12:54 am

I have downloaded Blender's source code and looked at it. There's really a function in there that anti-aliases an image that only consists of black or white pixels....

It would be a nice exercise to convert this to a Fuse (for those of you who are new to Fusion: It's a script plugin written in LUA and optionally OpenCL that is supported by the free version of Fusion 7.5)

I've pasted the algorithm over at http://www.steakunderwater.com/wesuckle ... 1077#p1077
Anybody who's interested in learning about Fusion's excellent Fuse API is invited to take a look. We're currently building a learning resource where small tools like this would be programmed in a community effort and each step and improvement to the code is fleshed out in public. :geek:
blog and Fusion stuff: http://comp-fu.com/2012/06/fusion-script-macro-collection/
Offline

Kirill Kryukov

  • Posts: 24
  • Joined: Wed Nov 12, 2014 6:09 pm

Re: Anti-aliased depth merge, How?

PostSun Nov 16, 2014 4:23 pm

Unfortunately I am not proficient with the code so I am trying to recreate the same appearance with usual node blending. So I need to get a mask when one z value is greater then another one. I think it's possible to do using difference blending mode. At least I did so in Photoshop. Then threshold the picture to just 1 and 0 and then anti-alias it. That anti-aliasing part is where I have no ideas. I can do not pure threshold , just something very contrast or after-blur it a bit but it not seems right and produce multiples artifacts and mismatches on small details. Not the same good as Blender does

Any suggestions?

Return to Fusion

Who is online

Users browsing this forum: Bing [Bot] and 64 guests