Contour Output Shaders
Contour output shaders are called after the regular image has
been computed.
Contours Only
The contour output shader contour_only generates a contour
image with a given background color in the color frame buffer,
discarding the rendered color image.
contour_only
"contour_only" (
color "background",
boolean "glow",
boolean "maxcomp")
- background
- is the background color (default black).
- glow
- if set to on, makes all contours become darker and
more transparent near their edges, creating a glow effect.
- maxcomp
- if set to on, specifies that when a contour is over
another contour, the maximum of the two colors (in each color band)
should be used. If maxcomp is not specified (or set off),
normal alpha compositing is used.
Composited Contours
This contour output shader generates a contour image composited
over the rendered color image.
contour_composite
"contour_composite" (
boolean "glow",
boolean "maxcomp")
- glow
- if set to on, makes all contours become darker and
more transparent near their edges, creating a glow effect.
- maxcomp
- if set to on, specifies that when a contour is over
another contour, the maximum of the two colors (in each color band)
should be used. If maxcomp is not specified (or set off),
normal alpha compositing is used.
PostScript Contours
The contour output shader contour_ps creates PostScript code
with black contours. The PostScript code can be written to a file
with a separate output statement that specifies the file type
ps. This shader does not touch the rendered color frame
buffer.
contour_ps
"contour_ps" (
integer "paper_size",
scalar "paper_scale",
scalar "paper_transform_b",
scalar "paper_transform_d",
boolean "title",
boolean "landscape",
vector "ink_stroke_dir",
scalar "ink_min_frac",
string "file_name"
)
- paper_size
- is an integer, with 0 indicating "letter" size, 1 indicating
"executive", 2 indicating "legal", 3-6 indicating "a3", "a4", "a5",
"a6", 7-9 indicating "b4", "b5", "b6", and 10 indicating
"11x17".
- paper_scale
- scales the PostScript output. The default is 1.
- paper_transform_b
paper_transform_d
- transform the Postscript coordinates according to the matrix
where b and d are the parameters paper_transform_b
and paper_transform_d. This allows compensation of printers that
print with a slight skew.
- title
- if set to on, determines whether a title (consisting
of file name and frame number) and a frame around the image are
written.
- landscape
- if set to on, makes the output be in landscape mode
rather than portrait mode.
- ink_stroke_dir
- if set no a non-zero vector, makes the thickness of each
contour line segment depend on its orientation; this gives an ink
pen look. The contour lines are widest in the stroke
direction.
- ink_min_frac
- specifies how thin the "ink look" contour lines should be
(relative to the maximum thickness) in directions perpendicular to
ink_stroke_dir.
- file_name
- specifies the name of the PostScript file that the contours are
written to.
For example, to get a PostScript file in A4 paper size with full
scale, use the following statements in the camera definition:
output "contour,rgba" "contour_ps" (
"paper_size" 4,
"paper_scale" 1.0,
"paper_transform_b" 0.0,
"paper_transform_d" 1.0,
"title" on,
"landscape" on,
"file_name" "contourimage.ps"
)
Copyright (©) 1986-2009 by
mental images GmbH