2D graphics help required for new Composit node

Compiling, libraries, modules, coding guidelines and porting

Moderators: jesterKing, stiv

Post Reply
dogobe
Posts: 0
Joined: Sun Sep 18, 2005 12:31 am

2D graphics help required for new Composit node

Post by dogobe » Thu Mar 02, 2006 8:46 pm

Hi,

I am in the process of writing a depth of field composit node and need some help to improve the result.

Firstly I have implemented a lens blur that can be adjusted to allow luminance to take more/less effect, blur amount can be adjusted, etc. Happy with the results.

I am having difficulty smoothing the masks required to composite the effect. Basically each pixel in render falls in to one of these three categories background, foreground and focus area. Pixels in the foreground and background have a blur value based on the z value.

Pixels in the foreground/focus area 'sit' over the background - no fine blend/anti alias is available - a pixel is in the foreground or in the background producing jagged results. I guess in a nut shell I can't over sample to finer define the mask.

Can anyone suggest a couple of filters I can use to do this? e.g. one to over blur the mask and one to receed/tune the blur to remove the jagged edges. Or is there another method I should be looking in to?

If we can figure this out we could get results every bit as good as http://www.richardrosenman.com/dofpro.htm with the advantage of being able to have value inputs for focal point/depth for animation.

many thanks,
p

Caronte
Posts: 76
Joined: Wed Oct 16, 2002 12:53 am
Location: Valencia-Spain-Europe

Re: 2D graphics help required for new Composit node

Post by Caronte » Fri Mar 03, 2006 11:08 am

dogobe wrote:If we can figure this out we could get results every bit as good as http://www.richardrosenman.com/dofpro.htm with the advantage of being able to have value inputs for focal point/depth for animation.
I can't help you, but want to say thi's the better 2D dof I have seen until now :shock:
Caronte.
"Some Day, All Will Be Digital"
http://www.nicodigital.com

jesterKing
Site Admin
Posts: 207
Joined: Fri Oct 18, 2002 12:48 pm
Location: Finland

Post by jesterKing » Fri Mar 03, 2006 11:44 am

You might want to join #blendercoders - there you might be able to get faster responses :)

/Nathan

simonharvey
Posts: 0
Joined: Tue May 18, 2004 8:11 am

Post by simonharvey » Fri Mar 03, 2006 10:16 pm

Hi,
Pixels in the foreground/focus area 'sit' over the background - no fine blend/anti alias is available - a pixel is in the foreground or in the background producing jagged results. I guess in a nut shell I can't over sample to finer define the mask.
I am trying to understand the finer points of your dilemma. Is it possible to post a sample of these artifacts using photobucket.com (or any other image hosting service) so I can get a better idea of what you are facing?

Kind Regards
Simon Harvey

dogobe
Posts: 0
Joined: Sun Sep 18, 2005 12:31 am

Post by dogobe » Sat Mar 04, 2006 11:25 am

Basically it's smoothing jagged edges without being able to supersample.

I think I my have found a solution using adaptive postfiltering as written up by lau - http://www.ee.ust.hk/course/elec532/Pro ... 193041.pdf . The paper explains exactly the type of problem I am having - if anyone knows of other suitable methods please let me know.

I'll do some work on this over the weekend and see if I can get some meaningful results - I am hopeful :)

jesterKing: thanks but IRC is not really an option for me.

Post Reply