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.
Long name (short name) | Argument Types | Properties | |
---|---|---|---|
camera (cam) | PyNode | ||
|
|||
fileFormat (ff) | unicode | ||
|
|||
filename (fn) | unicode | ||
|
|||
filterSize (fs) | float | ||
|
|||
filterType (ft) | int | ||
|
|||
flipU (fu) | bool | ||
|
|||
flipV (fv) | bool | ||
|
|||
ignoreMirroredFaces (imf) | bool | ||
|
|||
ignoreTransforms (it) | bool | ||
|
|||
mapHeight (mh) | int | ||
|
|||
mapMaterials (mm) | bool | ||
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) | unicode | ||
|
|||
mapSpace (sp) | unicode | ||
|
|||
mapWidth (mw) | int | ||
|
|||
maxSearchDistance (msd) | float | ||
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) | float | ||
|
|||
overscan (os) | int | ||
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) | unicode | ||
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) | int | ||
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) | float | ||
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) | bool | ||
|
|||
source (s) | unicode | ||
|
|||
sourceUVSpace (sus) | unicode | ||
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) | int | ||
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) | unicode | ||
|
|||
targetUVSpace (tus) | unicode | ||
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) | bool | ||
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) | unicode | ||
|
Derived from mel command maya.cmds.surfaceSampler
Example:
import pymel.core as pm
# Generate an object space normal map of a cube onto a sphere called test.dds
pm.surfaceSampler( mapOutput='normal', filename='C:/test', fileFormat='dds', source='pCube1', target='pSphere1', uv='map1' )