Houdini VOP raytracer part 6

Posted on October 2, 2013

 

Depth of field

depth In real camera, every photon, before it hits camera sensor/film, it flies through round shape aperture hole, creating round looking out of focus objects  (Bokeh).

When we sample depth of field  using default random() function,  will are getting random square point distribution. In order to get more natural, round look, we have to implement some kind of random, circular point distribution. This is very simple example:

t = 2*pi*random()
u = random()+random()
r = if u>1 then 2-u else u
[r*cos(t), r*sin(t)]

pic circularScatter01circularScatter02 Node view of circular random distribution randomNodes





<< [ 5 ] [ 6 ] [ 7 ] >>

 

Be the first to leave a comment

Leave a Reply


%d bloggers like this: