www.schorsch.com

Radiance 3.5 User Manual

Contact | Sitemap | Search

pdfblur (1)

NAME

pdfblur - generate views for depth-of-field blurring

SYNOPSIS

pdfblur aperture distance nsamp viewfile

DESCRIPTION

Pdfblur takes the given viewfile and computes nsamp views based on a focus distance of distance and an aperture diameter of aperture (both in world coordinate units). When rendered and averaged together, these views will result in a picture with the specified depth of field. Either pinterp(1) or rpict(1) may be called to do the actual work. (The given viewfile must also be passed on the command line to the chosen renderer, since pdfblur provides supplemental view specifications only.)
For pinterp, feed the output of pdfblur to the standard input of pinterp and apply the -B option to blur views together. In most cases, a single picture with z-buffer is all that is required to get a satisfactory result, though the perfectionist may wish to apply three pictures arranged in a triangle about the aperature, or alternatively apply the -ff option together with the -fr option of pinterp. (The latter may actually work out to be faster, since rendering three views takes three times as long as a single view, and the -fr option will end up recomputing relatively few pixels by comparison.)
To use pdfblur with rpict, apply the -S option to indicate a rendering sequence, and set the -o option with a formatted file name to save multiple output pictures. When all the renderings are finished, combine them with the pcomb(1) program, using appropriate scalefactors to achieve an average. Note that using rpict is MUCH more expensive than using pinterp, and it is only recommended if the scene and application absolutely demand it (e.g. there is prominent refraction that must be modeled accurately).
For both pinterp and rpict, the computation time will be proportional to the number of views from pdfblur. We have found a nsamp setting somewhere between 5 and 10 to be adequate for most images. Relatively larger values are appropriate for larger aperatures.

EXAMPLES

To use pinterp to simulate an aperture of 0.5 inches on a lens focused at a distance of 57 inches:
rpict -vf myview -x 640 -y 480 -z orig.zbf scene.oct > orig.pic
pdfblur 0.5 57 8 orig.pic | pinterp -B -vf orig.pic -x 640 -y 480 orig.pic orig.zbf > blurry.pic
To use rpict exclusively to do the same:
pdfblur .5 57 5 myview | rpict -S 1 -vf myview -x 640 -y 480 -o view%d.pic scene.oct
pcomb -s .2 view1.pic -s .2 view2.pic -s .2 view3.pic -s .2 view4.pic -s .2 view5.pic > blurry.pic

AUTHOR

Greg Ward

BUGS

This program really only works with perspective views.

SEE ALSO

pcomb(1), pinterp(1), pmblur(1), rcalc(1), rpict(1), vwright(1)
http://www.schorsch.com/en/software/rayfront/manual/htmlman/pdfblur.html
Copyright © 2004-2020 schorsch.com