This software supports gradient-domain signal processing within a texture atlas. Supported applications include:

- (localized) texture smoothing and sharpening,
- vector-field visualization akin to line-integral convolution,
- computation of single-source geodesics, and
- simulation of reaction-diffusion following the Gray-Scott model.

**--in**<*input mesh and texture names*>- These two strings specify the the names of the mesh and the texture image.

The input mesh is assumed to be in PLY format, giving the set of vertices with the x-, y-, and z-coordinates of the positions encoded by the properties*x*,*y*, and*z*the set of polygons encoded by two lists. The first gives the indices of the vertices in the polygon (integers). The second gives the texture coordinates at each polygon corner (pairs of floats).

The input texture is assumed to be an image if the file extension is*png*,*jpg*, or*jpeg*, and a normal map if the extension is*normap*. - [
**--out**<*output texture*>] - This string is the name of the file to which the processed texture will be written.
- [
**--outVCycles**<*output v-cycles*>] - This integer specifies the number of v-cycles to use if the processed texture is output to a file and a direct solver is not used. The default value for this parameter is 6.
- [
**--interpolation**<*interpolation weight*>] - This floating point values gives the interpolation weight.

The default value for this parameter is 1000. - [
**--modulation**<*gradient modulation*>] - This floating point values gives the (uniform) gradient modulation.

The default value for this parameter is 1. - [
**--useDirectSolver**] - If enabled, this flag specifies that a direct solver should be used (instead of the default multigrid solver).
- [
**--jitter**] - If enabled, this flag specifies that the texture coordinates should be jittered slightly. (This is used to avoid singular situations when mesh vertices fall directly on edges in the texture grid. In such a situation, the executable will issue a warning
**"Zero row at index ..."**.)

In the interactive viewer the modulation can be set globally by dragging the slider on the top left.

The modulation can be set locally by holding the [SHIFT] key down and either dragging with the left mouse button (to smooth) or the right mouse button (to sharpen).

**--in**<*input mesh name*>- This string specifies the name of the mesh.

The input mesh is assumed to be in PLY format, giving the set of vertices with the x-, y-, and z-coordinates of the positions encoded by the properties*x*,*y*, and*z*the set of polygons encoded by two lists. The first gives the indices of the vertices in the polygon (integers). The second gives the texture coordinates at each polygon corner (pairs of floats).

- [
**--inVF**<*vector-field file*>] - This string specifies the file containing the vector-field for visualization. (If this parameter is not specified, the principal curvature direction is used.)

This file is assumed to be in binary, with the first four bytes storing an integer representing the number of vectors (this should be equal to the number of triangles in the mesh) followed by the list of vectors. The latter are encoded using double-precision floating point values and should be*8***num_triangles***dim*bytes, with*num_triangles*the number of triangles/vectors and*dim*the dimension of vector-field. (The value of*dim*is equal to two if the**--intrinsicVF**is specified an three otherwise.) - [
**--intrinsicVF**] - If enabled and a vector-field is specified, this flag indicates that the vector values are represented with two values per vector, using an intrinsic frame. Specifically, for triangle (
*v*_{0},*v*_{1},*v*_{2}), the two-dimensional coefficients (*x*,*y*) correspond to the three-dimensional tangent vector (*x*·(*v*_{1}-*v*_{0}) ,*y*·(*v*_{2}-*v*_{0}) ). - [
**--out**<*output texture*>] - This string is the name of the file to which the line-integral-convolution texture will be written.
- [
**--outVCycles**<*output v-cycles*>] - This integer specifies the number of v-cycles to use if the processed texture is output to a file and a direct solver is not used. The default value for this parameter is 10.
- [
**--licInterpolation**<*line-integral-convolution interpolation weight*>] - This floating point values gives the interpolation weight used for the line-integral-convolution.

The default value for this parameter is 10000. - [
**--sharpInterpolation**<*sharpening interpolation weight*>] - This floating point values gives the interpolation weight used for sharpening the line-integral-convolution results.

The default value for this parameter is 10000. - [
**--modulation**<*sharpening gradient modulation*>] - This floating point values gives the gradient modulation used for sharpening the line-integral-convolution results.

The default value for this parameter is 100. - [
**--width**<*output texture width*>] - This integers specifies the width of the output texture. The default value for this parameter is 2048.
- [
**--height**<*output texture height*>] - This integers specifies the height of the output texture. The default value for this parameter is 2048.
- [
**--minor**] - If enabled, this flag specifies that the directions of minimal principal curvature should be used to define the vector-field (instead of the default maximal principal curvature directions).
- [
**--useDirectSolver**] - If enabled, this flag specifies that a direct solver should be used (instead of the default multigrid solver).
- [
**--jitter**] - If enabled, this flag specifies that the texture coordinates should be jittered slightly. (This is used to avoid singular situations when mesh vertices fall directly on edges in the texture grid. In such a situation, the executable will issue a warning
**"Zero row at index ..."**.)

Hit [SPACE] to start the iterative solver or hit "+" to advance one iteration at a time.

**--in**<*input mesh name*>- This string specifies the the name of the mesh.

The input mesh is assumed to be in PLY format, giving the set of vertices with the x-, y-, and z-coordinates of the positions encoded by the properties*x*,*y*, and*z*the set of polygons encoded by two lists. The first gives the indices of the vertices in the polygon (integers). The second gives the texture coordinates at each polygon corner (pairs of floats).

- [
**--interpolation**<*diffusion interpolation weight*>] - This floating point values gives the interpolation weight used for diffusing the initial delta function.

The default value for this parameter is 10000. - [
**--width**<*output texture width*>] - This integers specifies the width of the output texture. The default value for this parameter is 1024.
- [
**--height**<*output texture height*>] - This integers specifies the height of the output texture. The default value for this parameter is 1024.
- [
**--useDirectSolver**] - If enabled, this flag specifies that a direct solver should be used (instead of the default multigrid solver).
- [
**--jitter**] - If enabled, this flag specifies that the texture coordinates should be jittered slightly. (This is used to avoid singular situations when mesh vertices fall directly on edges in the texture grid. In such a situation, the executable will issue a warning
**"Zero row at index ..."**.)

In the interactive viewer the source can be set by holding the [SHIFT] key down and clicking/dragging with either mouse button.

**--in**<*input mesh name*>- This string specifies the the name of the mesh.

The input mesh is assumed to be in PLY format, giving the set of vertices with the x-, y-, and z-coordinates of the positions encoded by the properties*x*,*y*, and*z*the set of polygons encoded by two lists. The first gives the indices of the vertices in the polygon (integers). The second gives the texture coordinates at each polygon corner (pairs of floats).

- [
**--out**<*output texture*>] - This string is the name of the file to which the reaction-diffusion texture will be written.
- [
**--outSteps**<*output reaction-diffusion steps*>] - This integer specifies the number of reaction-diffusion steps to be taken. The default value for this parameter is 1000.
- [
**--width**<*output texture width*>] - This integers specifies the width of the output texture. The default value for this parameter is 512.
- [
**--height**<*output texture height*>] - This integers specifies the height of the output texture. The default value for this parameter is 512.
- [
**--useDirectSolver**] - [
**--jitter**] - If enabled, this flag specifies that the texture coordinates should be jittered slightly. (This is used to avoid singular situations when mesh vertices fall directly on edges in the texture grid. In such a situation, the executable will issue a warning
**"Zero row at index ..."**.) - [
**--dots**] - If enabled, this flag specifies that the feed/kill parameters for dot-formation should be used. Otherwise, the feed/kill parameters for stripes are used.

Hit [SPACE] to start the reaction-diffusion process or hit "+" to advance one step at a time.

For testing purposes, a number of textured mapped models are provided (using the

`% Bin/*/TextureFiltering --in ../TSP.Data/David/david.ply ../TSP.Data/David/david.normap`

This opens a viewer allowing the user to prescribe both global gradient modulation weights (through the slider) and local modulation weights (through a paint-brush interface, by depressing the [SHIFT] key and dragging with the left mouse button to smooth and the right mouse button to sharpen).You can also bypass the viewer and output a globally sharpened/smoothed texture to a file:

`% Bin/*/TextureFiltering --in ../TSP.Data/Julius/julius.ply ../TSP.Data/Julius/julius.normap --out julius.smooth.normap --modulation 0 --interpolation 100`

Here a modulation weight less than 1 indicates that gradients should be dampened (resulting in smoothing) and a small interpolation weight reduces the interpolation penalty, exaggerating the smoothing.
`% Bin/*/LineIntegralConvolution --in ../TSP.Data/Fertility/fertility.ply`

This opens a viewer visualizing a vector-field by performing anisotropic diffusion to simulate line-integral-convolution. (To start the iterative solver, press the [SPACE] key.) By default, the vector-field used is defined by the (maximal) principal curvature directions.You can also explicitly prescribe the vector-field:

`% Bin/*/LineIntegralConvolution --in ../TSP.Data/Fertility/fertility.ply --inVF ../TSP.Data/Fertility/harmonic-001.vf --intrinsicVF`

(The You can also bypass the viewer and output the line-integral-convolution texture to a file:

`% Bin/*/LineIntegralConvolution --in ../TSP.Data/Hand/hand.ply --minimal --out hand.minimal.jpg`

Here a visualization of the minimal principal curvature directions is written out as a texture image.
`% Bin/*/Geodesics --in ../TSP.Data/Bunny/bunny.ply`

This opens a viewer allowing the user to prescribe the source of the geodesic by holding the [SHIFT] button and clicking on the source location with either mouse button.
`% Bin/*/ReactionDiffusion --in ../TSP.Data/Camel/camel.ply`

This opens a viewer visualizing the "stripes" reaction-diffusion process. (To start the process, press the [SPACE] key.)You can also bypass the viewer and output the reaction-diffusion texture to a file:

`% Bin/*/ReactionDiffusion --in ../TSP.Data/David/david.ply --out david.dots.jpg --dots --outSteps 2000`

Here a "dots" pattern is written out to an image. (Empirically, we have found that this reaction-diffusion process takes more steps to converge, hence the larger number of steps.)
- The Windows executables require both the
**glew**and**glut**dynamically linked libraries to run. These can be found here and should be included either in the directory with the executables, or in the directory from which the executables are run. - Compiling under Windows requires both the
**glew**and**glut**libraries. These can be found here and should be placed in the output directory for linkage.

- Added support for reaction-diffusion based on the Gray-Scott model.

This work genersouly supported by NSF grant #1422325.

HOME