| 1 | greg | 1.5 | .\" RCSid "$Id: pdfblur.1,v 1.4 2005/01/18 03:59:40 greg Exp $" | 
| 2 | greg | 1.1 | .TH PDFBLUR 1 1/24/96 RADIANCE | 
| 3 |  |  | .SH NAME | 
| 4 |  |  | pdfblur - generate views for depth-of-field blurring | 
| 5 |  |  | .SH SYNOPSIS | 
| 6 |  |  | .B pdfblur | 
| 7 |  |  | .B aperture | 
| 8 |  |  | .B nsamp | 
| 9 |  |  | .B viewfile | 
| 10 |  |  | .SH DESCRIPTION | 
| 11 |  |  | .I Pdfblur | 
| 12 |  |  | takes the given | 
| 13 |  |  | .I viewfile | 
| 14 |  |  | and computes | 
| 15 |  |  | .I nsamp | 
| 16 | greg | 1.3 | views based on an aperture diameter of | 
| 17 | greg | 1.1 | .I aperture | 
| 18 | greg | 1.3 | (in world coordinate units) and a focal distance equal to the length of the | 
| 19 |  |  | .I \-vd | 
| 20 |  |  | view direction vector. | 
| 21 | greg | 1.1 | When rendered and averaged together, these views will result in | 
| 22 |  |  | a picture with the specified depth of field. | 
| 23 |  |  | Either | 
| 24 |  |  | .I pinterp(1) | 
| 25 |  |  | or | 
| 26 |  |  | .I rpict(1) | 
| 27 |  |  | may be called to do the actual work. | 
| 28 |  |  | (The given | 
| 29 |  |  | .I viewfile | 
| 30 |  |  | must also be passed on the command line to the chosen renderer, since | 
| 31 |  |  | .I pdfblur | 
| 32 |  |  | provides supplemental view specifications only.)\0 | 
| 33 |  |  | .PP | 
| 34 |  |  | For | 
| 35 |  |  | .I pinterp, | 
| 36 |  |  | feed the output of | 
| 37 |  |  | .I pdfblur | 
| 38 |  |  | to the standard input of | 
| 39 |  |  | .I pinterp | 
| 40 |  |  | and apply the | 
| 41 |  |  | .I \-B | 
| 42 |  |  | option to blur views together. | 
| 43 |  |  | In most cases, a single picture with z-buffer is all that is required | 
| 44 |  |  | to get a satisfactory result, though the perfectionist may wish to | 
| 45 |  |  | apply three pictures arranged in a triangle about the aperature, or | 
| 46 |  |  | alternatively apply the | 
| 47 |  |  | .I \-ff | 
| 48 |  |  | option together with the | 
| 49 |  |  | .I \-fr | 
| 50 |  |  | option of | 
| 51 |  |  | .I pinterp. | 
| 52 |  |  | (The latter may actually work out to be faster, since rendering | 
| 53 |  |  | three views takes three times as long as a single view, and the | 
| 54 |  |  | .I \-fr | 
| 55 |  |  | option will end up recomputing relatively few pixels by | 
| 56 |  |  | comparison.)\0 | 
| 57 |  |  | .PP | 
| 58 |  |  | To use | 
| 59 |  |  | .I pdfblur | 
| 60 |  |  | with | 
| 61 |  |  | .I rpict, | 
| 62 |  |  | apply the | 
| 63 |  |  | .I \-S | 
| 64 |  |  | option to indicate a rendering sequence, and set the | 
| 65 |  |  | .I \-o | 
| 66 |  |  | option with a formatted file name to save multiple output | 
| 67 |  |  | pictures. | 
| 68 |  |  | When all the renderings are finished, combine them with the | 
| 69 |  |  | .I pcomb(1) | 
| 70 |  |  | program, using appropriate scalefactors to achieve an average. | 
| 71 |  |  | Note that using | 
| 72 |  |  | .I rpict | 
| 73 |  |  | is MUCH more expensive than using | 
| 74 |  |  | .I pinterp, | 
| 75 |  |  | and it is only recommended if the scene and application | 
| 76 |  |  | absolutely demand it (e.g. there is prominent refraction that | 
| 77 |  |  | must be modeled accurately). | 
| 78 |  |  | .PP | 
| 79 |  |  | For both | 
| 80 |  |  | .I pinterp | 
| 81 |  |  | and | 
| 82 |  |  | .I rpict, | 
| 83 |  |  | the computation time will be proportional to the number of views from | 
| 84 |  |  | .I pdfblur. | 
| 85 |  |  | We have found a | 
| 86 |  |  | .I nsamp | 
| 87 |  |  | setting somewhere between 5 and 10 to be adequate for most images. | 
| 88 |  |  | Relatively larger values are appropriate for larger aperatures. | 
| 89 | greg | 1.3 | .PP | 
| 90 |  |  | The | 
| 91 |  |  | .I \-pd | 
| 92 |  |  | option of | 
| 93 |  |  | .I rpict | 
| 94 |  |  | may be used instead or in combination with or instead of | 
| 95 |  |  | .I pdfblur | 
| 96 |  |  | to blur depth-of-field. | 
| 97 |  |  | If used in combination, | 
| 98 |  |  | it is best to set the | 
| 99 |  |  | .I \-pd | 
| 100 |  |  | option to the overall | 
| 101 |  |  | .I aperture | 
| 102 |  |  | divided by | 
| 103 |  |  | .I nsamp | 
| 104 |  |  | to minimize ghosting in the output. | 
| 105 | greg | 1.5 | .PP | 
| 106 |  |  | To simulate a particular camera's aperture, divide the focal length of | 
| 107 |  |  | the lens by the f-number, then convert to the corresponding | 
| 108 |  |  | world coordinate units. | 
| 109 |  |  | For example, if you wish to simulate a 50mm lens at f/2.0 in | 
| 110 |  |  | a scene modeled in meters, then you divide 50mm by 2.0 to get 25mm, | 
| 111 |  |  | which corresponds to an effective aperture of 0.025 meters. | 
| 112 | greg | 1.1 | .SH EXAMPLES | 
| 113 |  |  | To use | 
| 114 |  |  | .I pinterp | 
| 115 |  |  | to simulate an aperture of 0.5 inches on a lens focused at a | 
| 116 |  |  | distance of 57 inches: | 
| 117 |  |  | .IP "" .2i | 
| 118 |  |  | rpict -vf myview -x 640 -y 480 -z orig.zbf scene.oct > orig.pic | 
| 119 |  |  | .br | 
| 120 |  |  | pdfblur 0.5 57 8 orig.pic | pinterp -B -vf orig.pic -x 640 -y 480 | 
| 121 |  |  | orig.pic orig.zbf > blurry.pic | 
| 122 |  |  | .PP | 
| 123 |  |  | To use | 
| 124 |  |  | .I rpict | 
| 125 |  |  | exclusively to do the same: | 
| 126 |  |  | .IP "" .2i | 
| 127 |  |  | pdfblur .5 57 5 myview | rpict -S 1 -vf myview -x 640 -y 480 | 
| 128 |  |  | -o view%d.pic scene.oct | 
| 129 |  |  | .br | 
| 130 |  |  | pcomb -s .2 view1.pic -s .2 view2.pic -s .2 view3.pic -s .2 | 
| 131 |  |  | view4.pic -s .2 view5.pic > blurry.pic | 
| 132 |  |  | .SH AUTHOR | 
| 133 |  |  | Greg Ward | 
| 134 |  |  | .SH BUGS | 
| 135 |  |  | This program really only works with perspective views. | 
| 136 |  |  | .SH "SEE ALSO" | 
| 137 | greg | 1.4 | pcomb(1), pinterp(1), pmblur(1), pmdblur(1), rcalc(1), rpict(1), vwright(1) |