Houdini VOP raytracer part 6

 

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 ] >>

 

Houdini VOP raytracer part 5

Specular Hilight

A specular highlight is a bright spot of light that appears on shiny objects when illuminated. The term specular means that light is perfectly reflected in a mirror-like way from the light source to the viewer. We are going to cover two specular reflection models.

Phong reflection model.

K{\tiny spec} = \big\|R\big\| \big\|V\big\| cos^n \beta =(\hat{R} \cdot \hat{V})^n

Continue Reading →