Go to: Synopsis. Return value. Related. Flags. MEL examples.

Synopsis

surfaceSampler [-camera name] [-fileFormat string] [-filename string] [-filterSize float] [-filterType uint] [-flipU boolean] [-flipV boolean] [-ignoreMirroredFaces boolean] [-ignoreTransforms boolean] [-mapHeight uint] [-mapMaterials boolean] [-mapOutput string] [-mapSpace string] [-mapWidth uint] [-maxSearchDistance linear] [-maximumValue linear] [-overscan uint] [-searchCage string] [-searchMethod uint] [-searchOffset linear] [-shadows boolean] [-source string] [-sourceUVSpace string] [-superSampling uint] [-target string] [-targetUVSpace string] [-useGeometryNormals boolean] [-uvSet string]

surfaceSampler is undoable, NOT queryable, and NOT editable.

Maps surface detail from a source surface to a new texture map on a target surface. Both objects must be selected when the command is invoked, with the source surface selected first, and the target last.

Return value

None

Related

convertSolidTx

Flags

camera, fileFormat, filename, filterSize, filterType, flipU, flipV, ignoreMirroredFaces, ignoreTransforms, mapHeight, mapMaterials, mapOutput, mapSpace, mapWidth, maxSearchDistance, maximumValue, overscan, searchCage, searchMethod, searchOffset, shadows, source, sourceUVSpace, superSampling, target, targetUVSpace, useGeometryNormals, uvSet
Long name (short name) Argument types Properties
-camera(-cam) name create
Specify the camera to use for camera specific lighting calculations such as specular highlights or reflections.
-fileFormat(-ff) string createmultiuse
The image format as a file extension (e.g. "dds"). This must be included once for every output map specified.
-filename(-fn) string createmultiuse
The filename to use when creating the map. This must be included once for every output map specified.
-filterSize(-fs) float create
The filter size to use in pixels. Larger values (e.g. over 2.0) will produce smoother/softer results, while values closer to 1.0 will produce sharper results.
-filterType(-ft) uint create
The filter type to use. 0 is a Guassian filter, 1 is a triangular filter, 2 is a box filter.
-flipU(-fu) boolean create
Flip the U coordinate of the generated image.
-flipV(-fv) boolean create
Flip the V coordinate of the generated image.
-ignoreMirroredFaces(-imf) boolean create
Stops reverse wound (i.e. mirrored) faces from contributing to the map generation.
-ignoreTransforms(-it) boolean create
Controls whether transforms are used (meaning the search is performed in worldspace), or not (meaning the search is performed in object space).
-mapHeight(-mh) uint createmultiuse
Pixel width of the generated map. This must be included once for every output map specified.
-mapMaterials(-mm) boolean createmultiuse
Where appropriate (e.g. normal maps), this controls whether the material should be included when sampling the map attribute. This must be included once for every output map specified.
-mapOutput(-mo) string createmultiuse
Specifies a new output map to create. One of "normal", "displacement" "diffuseRGB", "litAndShadedRGB", or "alpha"
-mapSpace(-sp) string createmultiuse
The space to generate the map in. Valid keyword is "object". Default is tangent space. This must be included once for every output map specified.
-mapWidth(-mw) uint createmultiuse
Pixel width of the generated map. Some output image formats require even or power of 2. This must be included once for every output map specified.
-maxSearchDistance(-msd) linear createmultiuse
Controls the maximum distance away from a target surface that will be searched for source surfaces. A value of 0 indicates no limit. When generated maps include artifacts from the "other side" of an object, try setting this value to a distance approximately equal to the radius of the object. If this flag is included, it must be included once for every target.
-maximumValue(-max) linear createmultiuse
The maximum value to include in the map. This allows control of how floating point values (like displacement) are quantised into integer image formats.
-overscan(-os) uint create
The number of additional pixels to render around UV borders. This will help to minimise texel filtering artifacts on UV seams. When mipmaps are going to be generated for the texture a higher value may be necessary (in addition to a filterSize greater than 1).
-searchCage(-sc) string createmultiuse
Specifies a search envelope surface to use as a search guide when looking for source surfaces. If this flag is included, it must be included once for every target.
-searchMethod(-sm) uint create
Controls the search method used to match sample points on a target surface to points on the sources. 0 is closest to envelope, 1 is prefer any intersection inside envelope to intersections outside it, and 2 is only use intersections inside envelope.
-searchOffset(-so) linear createmultiuse
Specifies a fixed offset from a target surface to use as the starting point when looking for source surfaces. This value is only used when no search cage is specified for a given target. If this flag is included, it must be included once for every target.
-shadows(-sh) boolean createmultiuse
Where appropriate (e.g. lit and shaded), this controls whether shadows are included in the calculation. Currently only depth map shadows are supported.
-source(-s) string createmultiuse
Specifies a surface to use as a sampling source
-sourceUVSpace(-sus) string createmultiuse
Specifies that the transfer of data between the surfaces should be done in UV space and specifies the name of the UV set on the source surface(s) that should be used as the transfer space.
-superSampling(-ss) uint create
Controls the number of sampling points calculated for each output value. The algorithm will use 2 ^ n squared samples for each point (so a value of 0 will use a single sample, while a value of 3 will calculate 64 samples for each point).
-target(-t) string createmultiuse
Specified a surface to sample output information for.
-targetUVSpace(-tus) string createmultiuse
Specifies that the transfer of data between the surfaces should be done in UV space and specifies the name of the UV set on the target surface(s) that should be used as the transfer space.
-useGeometryNormals(-ugn) boolean create
Controls whether geometry or surface normals are used for surface searching. Using geometry normals will ensure a smooth mapping but can introduce distorted mappings where there are large distances between the source and target surfaces. Surface normals can introduce overlapping or discontinuous mappings, but does allow map distortion to be influenced by surface normal direction.
-uvSet(-uv) string createmultiuse
The name of the UV set to use when creating output maps. If this flag is included, it must be included once for every target.

Flag can appear in Create mode of command Flag can appear in Edit mode of command
Flag can appear in Query mode of command Flag can be used more than once in a command.

MEL examples

// Generate an object space normal map of a cube onto a sphere called test.dds
surfaceSampler -mapOutput "normal" -filename "C:/test" -fileFormat "dds" -source pCube1 -target pSphere1 -uv "map1";