View Full Version : 3d DOF issue

02 February 2007, 07:59 PM
Hi folks, have you ever experienced this when using 3d DOF in combustion? Usually it worked fine when i used it couple of times before, but this time it gives me a headache and cant figure out why this happens.

When i apply 3d DOF directly on RPF plate (with all render-channels on), it gives me this (dof1.jpg):

When i render out color and z-depth separately and then plug them into g-buffer builder and apply 3d DOF on top of it, i get rid of white outlines, but still there is strange halo around objects that should be perfectly sharp - like this (dof2.jpg):

Ive been trying to figure this out second day already, but with no advance :-/ The same workflow gives me different result than before. Thanx for any advices.

02 February 2007, 09:39 PM
You have to render in depth passes to avoid haloing.


Or else you can use a couple of hacks that exist to get around it. I.E. use your depth channel as an alpha. Or buy a highend post dof application.

02 February 2007, 02:26 AM
Thats strange Ive used RPFs Z-Depth channel with no artifacting in combustion, it looks like a premultiplication problems with your alpha... have you checked that?

02 February 2007, 08:59 AM
to RiKToR: i know thats strange... i used it couple times before yet with no problems, but now it gives me this with the same workflow like then. But its not by alpha for sure. I tried render with alpha, without alpha, without premultiplied aplha and allways the same. I would rather say its something like sub-pixel mapping issue or something alike, but as i said, when rendering to RPF i have sub-pixel channels on, so it shouldnt make any problems. BUT - strange is also the fact, that 3d fog, that also utilizes z-depth work fine. Ill probably have to do it like "thatoneguy" said and render out separate passes for blurry objects and objects in focus :-/

02 February 2007, 05:40 PM
Just to check but... you set your premultiplication to white if you rendered with a white background didn't you?

02 February 2007, 06:24 PM
1) Premultiplication should never be done against anything, but black.
2) Use straight Alpha instead, if available.
3) Check the tutorial here ( on alpha channels, and here ( and here ( on fixing premultiplied alphas.


02 February 2007, 04:26 PM
Its not a problem of premultiplication. I rendered also without alpha and result was the same. But at the end i gived up discreet's 3d DOF and used Sapphire's blur with my z-depth as a matte and worked great and much more faster ;-)

03 March 2007, 08:07 AM
Im having the exact same problem, ive used Combustions DOF several times over the last 5 years and never had a problem, I havent touched it in over a year and just upgraded to version 4 and im having the same problems.

03 March 2007, 05:45 PM
Yeah, i havent had any problem before either... but as i wrote before, if you use Sapphire effects, forget combustionīs DOF. And if you dont, then get them, theyre great ;-)

03 March 2007, 12:07 PM
Yes, I'd say a 3rd party DoF plugin is a must for any serious work in combustion - it's own 3d DoF operator is pretty terrible. Having said that, if you must use combustions own for whatever reason, a far quicker and easier, not to mention often better looking, method is to use compound blur. You import the scene and the zdepth. Put an invert on the zdepth, as well as a brightness and contrast. Then add a compound blur operator to the acual scene, and set the 'layer' to the brightness/contrast in the zdepth footage. Voila. Ramp up the brightness/contrast to get the right distance, and the compound blurs radius for ammount.

Note: By scene, I mean whatever it is you want to apply the DoF to.

CGTalk Moderation
03 March 2007, 12:07 PM
This thread has been automatically closed as it remained inactive for 12 months. If you wish to continue the discussion, please create a new thread in the appropriate forum.