ptrender - renders a point cloud file into an image file
SYNOPSIS
ptrender [options] pointcloudfile channelname
imagefile
DESCRIPTION
ptrender turns any channel of a point cloud file
into a 2D image by either projecting it onto a uv set
(stored in the point cloud itself) or by splatting the
points given the camera matrix stored in the point cloud
file.
In order to use ptrender to unwrap a function onto
a parameterization, the point cloud file must contain u, v
coordinates stored in the P value - in other words, the
bake3d call used to generate the point cloud should
look something like:
bake3d(bakefile, "pointcloud", point(u, v, 0), ...
ptrender can then map any channel into the plane
[0,1]x[0,1] by reprojecting every single sample into the
corresponding pixel.
ptrender can also be told to reproject samples in
the space of a camera. The camera used will be the same one
stored in the point cloud file (which typically will also be
the rendering camera used during the generation of the point
cloud file in the first place). Hence in this case the
bake3d call used to generate the point cloud should
use a position value visible from the camera, which may be
as simple as just P itself:
bake3d(bakefile, "pointcloud", P, ...
Several algorithms are provided for the splatting process
itself. Diffusion algorithms are provided which are very
robust in cases of sampling that can have widely different
densities with no particular structure; also, the hole
filling used takes care of cases where leaking of black
samples can happen if the parameterization has
discontinuities (by simply filling in the gutter with
samples from neighboring pixels). For camera based
projections a Z based splat and an area estimation algorithm
based on point sizes are also provided.
ptrender supports multiple output formats via the
same display
driver system used by prman.
OPTIONS
- -depth depth
-
Specifies the bit depth of the output image. Valid
arguments to this option are: byte,
short, and float. Note that depending
on the choice of display driver this option may be ignored
or overridden. If not specified, the default depth is
"byte".
- -dspy driver
-
Use the specified display driver. This determines the
format of the output file. If not specified, the default
driver used is TIFF.
- -dspyargs arguments
-
Passes the specified arguments to the display driver. The
arguments must be a single string which contains a
parameter list with inline declarations, exactly as would
appear in the RIB stream. In other words, it should
contain values that look exactly like what can be passed
on the Display line in a RIB file. As an example, here is
a valid command line which sets three parameters known to
the TIFF driver:
ptrender -dspy tiff -dspyargs '"float[2] origin" [10.0 256] "float[2] OriginalSize" [1024 1024] "string compression" ["zip"]' \
sphere.ptc Ct sphere.tif
-
Note the usage of single quotes to protect the double
quotes and square braces contained with the argument
string from being parsed by the shell.
- -project mode
-
Controls whether to use uv or camera based projection.
Valid arguments to this option are: uv and
camera. If uv projection is used, the point cloud
file must contain u, v coordinates stored in the P value,
and the points will be projected onto the plane
[0,1]x[0,1] using those coordinates.
If camera projection is used, the points will be projected
to the image plane using the world to NDC space
transformation stored in the point cloud file. If not
specified, the default projection mode is uv.
- -size width height
-
Controls the format of the output image. If not specified,
the default size is 512 x 512.
- -splat mode
-
Determines the algorithm used to splat points onto the
image plane. Valid choices are:
- none: points are drawn as single pixels
directly on the image plane, left over areas are left
black
- diffusion: points are drawn as single
pixels are drawn directly on the image plane, left over
areas are filled in using diffusion
- smooth: like diffusion, except
that a filter kernel is also applied
- zsplat: points are splatted with precedence
based on their z values. The size of the splat will be
determined via the radii stored in the point cloud
file. This splat mode is most useful when used with the
camera projection mode
- area: points are drawn as rectangles on the
image plane with their area determined by their radii
stored in the point cloud file
If not specified, the default splat mode is "smooth".
- -verbose
-
Turns on verbose output. Off by default.
Pixar Animation Studios
(510) 752-3000 (voice)
(510) 752-3151 (fax)
Copyright © 1996-
Pixar. All rights reserved.
RenderMan® is a registered trademark of Pixar.
|