< Previous | Contents | Manuals Home | Boris FX | Next >
Mesh
Note that in a SynthEyes mesh, a vertex consists of an XYZ position, a single optional normal, a single optional UV coordinate, and a single optional per- vertex color. Incoming meshes have vertices repeated as necessary to achieve those specifications. It is common for there to be multiple vertices at a single XYZ position, with different UV coordinates or normals. See the Mesh Re-numbering section for information on how to get the original numbering back, or generate unique numbering.
SynthEyes meshes contain only triangles with edge visibility data. When quads are to be exported, they are dynamically generated from the mesh, see the Quads and Quad list section.
Note that vertex and face data is available through subroutine calls listed here (mostly for the benefit of SyPy), and also through the .vtx and .face lists, which have subsequent descriptive sections.
.AddVLink(vno, trk) Add a link between the given vertex number and tracker.
.AlignViaLinks() Aligns the mesh on the current frame via vertex links, with no scaling allowed. Returns an error message or an empty string for success.
.AlignViaLinksUniform() Aligns the mesh on the current frame via
vertex links, with uniform scaling allowed. Returns an error message or an empty string for success.
.AlignViaLinksScaled() Aligns the mesh on the current frame via
vertex links, with independent scaling on each axes allowed. Returns an error message or an empty string for success.
.ApplyCameraMap(camo) Computes and applies camera-map uv
texture coordinates for the mesh as seen from the camera camo on the current frame.
Works for normal and 360VR shots.
.backFace Backface mode selected
.bboxHigh Bounding box of the vertex coordinates: high (maximum) values.
.bboxLow Bounding box of the vertex coordinates: low (minimum) values.
.blue blue component of static color, 0..1
.ClearFaceSelect() Clear list of selected faces
.ClearIllumination() Clear illumination data from the light, so that only the static color is used.
.CheckGeoHWeights() Checks that the weights of GeoH objects
deforming this meshes all add up to 1 on each vertex; adjusts them so that is the case as needed. Returns the number of vertices modified (clipping excluded).
.ClearMeshGeometry() Remove vertices, normals, texture
coordinates, facets, vertex colors, and original numbering data from the mesh, typically before rebuilding it.
.ClearOriginalNumbers() Clear original vertex, normal, texture
numbers.
.ClearOriginalVertexNumbers() Clear the original vertex numbers.
.ClearOriginalNormalNumbers() Clear the original number numbers.
.ClearOriginalTextureNumbers() Clear the original texture numbers.
.ClearPins() Clear mesh pinning data
.ClearTexture() Clear stored mesh texture data (originally read from file, or extracted)
.ClearVtxColor() Clear vertex colors
.ClearVtxNormals() Clear vertex normals
.ClearVtxSelect() Clear list of selected vertices
.ClearVtxTexCo() Clear vertex texture coordinates
.Clone() Make a new mesh that exactly duplicates this one (change it's name!)
.color 24-bit color value
.date Date mesh was imported, if any.
.dedupeFile Deduplication file name
.dedupeState Deduplication status
.Deformed() Very large list of vectors that are the vertex locations as deformed by GeoHTracking.
Read only. Compute-intensive! The mesh's scale(svec) is already multiplied into these values.
.DeformedUS() Very large list of vectors that are the vertex locations as deformed by GeoHTracking. The mesh's scale(svec ) is not multiplied into these values (US=unscaled). This actually takes more work. Read only. Compute- intensive!
.DeformedNormals() Very large list of vectors that are smoothed
vertex normals for the GeoHTrack deformed mesh. The effect of the mesh's scale(svec) is
already included in these values. Read only. Compute-intensive!
.DeformedUSNormals() Very large list of vectors that are smoothed
vertex normals for the GeoHTrack deformed mesh. The effect of the mesh's scale(svec) is not included in these values. This actually takes more work. Read only. Compute- intensive!
.DeleteFace(fno) Delete the face (1-based)
.DeleteSelectedFaces() Delete selected faces
.DeleteSelectedVertices() Deletes the selected vertices and all faces,
links, etc that references them.
.DeleteUnusedVertices() Examines what vertices are used by the
facets, then deletes unused vertices (vertex positions, normals, colors, etc) while renumbering the facet's vertex numbers.
.EdgeAccumulator() Creates an Edge Accumulator object.
.face List of faces (new supported)
.file File name if mesh was imported (read/write)
.GeoHReplace(mto, maxdist) Replaces this current mesh with mesh mto in
the GeoH object that owns it (if any), updating the vertex weight maps of the owning object and all its children quite trickily, even if the new mesh is numbered or subdivided differently. The maxdist parameter is the maximum distance from a new vertex to the old mesh, in the mesh's coordinate system: anything greater will not be matched to the old mesh at all. This routine is the active ingredient of the "GeoH Mesh Replace" script.
.GeoVertexWeights(vno) Returns a list of the vertex weight for each
object for this particular vertex number. They will sum to one. The ordering will be the same for each vertex; the keys of the return list are the object names.
.GetFace(fno) Gets a vector containing the 1-based vertex numbers on this (1-based) face.
.GetFaceSelect(fno) Gets a 1 or 0 based on whether the face is
selected or not.
.GetFaceShow(fno) Gets the 3 bits of edge visibility data for this
face.
.GetVtx(vno) Gets the 3-D position vector of this (1-based) vertex.
.GetVtxColor(vno) Gets the RGBA color for the vertex (if present).
.GetVtxNormal(vno) Gets the normal vector of this vertex
.GetVtxSelect(vno) Gets 1 or 0 based on whether the vertex is selected or not.
.GetVtxTexCo(vno) Gets the 2-D texture coordinates of the vertex.
.green green component of static color, 0..1
.hasNormals Returns 1 if mesh has vertex normals, otherwise 0
.hasTexCos Returns 1 if mesh has texture coordinates, otherwise 0
.hasVertexColors Returns 1 if mesh has vertex colors, otherwise 0
.illumination RGB vector of the possibly-animated illuminating color of the mesh, if it has been set up (animatable).
.illumB Possibly-animated 0..1 blue component of the mesh, GenKey. When setting, set one of
.illumCam/Shot also.
.illumCam Camera (shot) associated with this illumination data, should be set whenever illumination is, in case the shot is time-shifted.
.illumColor The illumination value as a 24-bit integer color (instead of a vector).
.illumG Possibly-animated 0..1 green component of the mesh, GenKey. When setting, set one of
.illumCam/Shot also.
.illumR Possibly-animated 0..1 red component of the mesh, GenKey. When setting, set one of
.illumCam/Shot also.
.illumShot Shot associated with this illumination data, should be set whenever illumination is, in case the shot is time-shifted.
.isIlluminated Mesh has an illumination track (illumR/G/B).
.IntersectDetails(pos, dir [, viewCam]) Return a named array (list) of the results
of intersecting a world-coordinate ray from pos in the direction dir. The list consists of elements named distance, position, facetNumber, facetNormal, interpolatedNormal, and mixingCoefficients. An interpolated normal will only be available if the mesh has vertex normals, and the mesh is not deformed; otherwise, the facet normal will be returned. The interpolated normal has been interpolated from the vertex normal using the mixing coefficients (which can be
used to mix other things too). The optional viewCam argument allows for anamorphic distance compensation. If used, any pos + distance*normal result must be Decompensate()’d to find the real location causing this hit.
.IntersectDistance(pos, dir[, viewCam]) Returns the shortest distance from
world-coordinate vector pos along vector dir at which the ray intersects the mesh, or a value <0 if it does not. The optional viewCam argument allows for anamorphic distance compensation. If used, any pos + distance*normal result must be Decompensate()’d to find the real location causing this hit.
.IntersectFacet(pos, dir[, viewCam]) Returns the index of the facet that first
intersects the world-coordinate ray from vector pos along vector dir, or 0 if it does not. The optional viewCam argument allows for anamorphic distance compensation. If used, any pos + distance*normal result must be Decompensate()’d to find the real location causing this hit.
.IntersectTracker(tracker[, viewCam]) Returns the location (vector) at which a
ray from the tracker's camera through the (2D) tracker location (during the current frame) intersects the mesh, or returns a null if it does not. The optional viewCam argument allows for anamorphic distance compensation. If used, any pos + distance*normal result must be Decompensate()’d to find the real location causing this hit.
.invertNormal Inverted normals
.isDeformed Mesh is being deformed by GeoH tracking.
.isDone Mesh is done ie locked, same as .lock
.isExported Should be exported (if examined by exporter)
.isFar Mesh is 'far' (must be parented to an object)
.isSelected Mesh is selected. Use to select multiple meshes simultaneously.
.kind Kind: Box, Sphere, Guy, etc, plus Custom.
This is a human-readable version, see
.typeno for the value used by .Regenerate().
.lock Mesh is locked (same as isDone)
.nFace Number of faces. Read-only.
.nm Name of the mesh
.norm List of all vertex normals, if present. If present, you must ensure that there are always an identical number of vertices and normals.
.NSelectFace() Number of selected faces (see SelectedFace).
.NSelectVtx() Number of selected vertices (see SelectedVtx).
.nVertex Number of vertices. Read-only.
.NVLinks() The number of vertex/tracker links
.obj Object that the mesh is attached to, or zero.
Use typeof to tell what has been returned.
.opacity Opacity in perspective view, 0 .. 1
.pinCam Camera (shot) that this mesh is pinned on (if any)
.pinFlags Bit mask of which degrees of freedom are solved for during pinning. See RunPin()
.pinFrame Frame of the shot that the mesh is pinned on.
.pinShot Shot that this mesh is pinned on (if any)
.Quads() Returns a read-only list of triangles and quads for this mesh, reconstructed from
edge-hiding data. This takes some time, call it once, then use the list of quads. See Quads and Quad List below.
.ReadLidar(filename)* Reloads the mesh's geometry from the given
Lidar (.xyz) file, returning 1 on success, or 0 on failure. Includes per-vertex color if present.
.ReadMesh(filename)* Reloads the mesh's geometry from the given
file (the file extension is examined to determine its type), returning 1 on success, or 0 on failure.
.ReadOBJ(filename)* Reloads the mesh's geometry from the given
OBJ file, returning 1 on success, or 0 on failure.
.ReadSBM(filename)* Reloads the mesh's geometry from the given
SBM file, returning 1 on success, or 0 on failure.
.red red component of static color, 0..1
.Regenerate() Regenerate a built-in mesh after changing the segment counts. Uses .typeno to determine the type of mesh created, not .kind. You can use this from Sizzle or Python to create new analytic meshes.
.RunPin() Pinning algorithm is run, affecting this mesh or the shot's camera.
.scriptDefined (This entry is only a place-holder, there is no attribute with this name.) You can add new attributes to this type, see Script-Defined Attributes.
.segments Vector of grid count for regenerating mesh objects, see Regenerate() above. These are the values shown on the 3D panel with the # tool selected.
.SelectFacesFromVertices() Select faces where all 3 vertices are selected.
Clear the face selection set first.
.SelectedFace(idx) Return the 1-based face number of the (1- based) idx'th selected face (see NSelectFace).
.SelectedVtx(idx) Return the 1-base vertex number of the (1- based) idx'th selected vertex (see NSelectVtx).
.SetFace(fno, vec) Set face fno to connect the 3 vertices in vec. Write the nFace+1'th face to add a new face.
.SetFaceSelect(fno, isSel) Set face fno to be selected or not, based on isSel 1/0.
.SetFaceShow(fno, flags) Set the edge-shown flags of fno to these flags.
.SetVtx(vno, vec) Set vertex vno to the position vec. Write the nVert+1'th vertex to add a new one. Call UpdateVtxs() after changing vertex positions.
.SetVtxColor(vno, colr) Set the RGBA color of the vertex. A should
always be 255. Either all vertices should have a color, or none.
.SetVtxNormal(vno, nrm) Set the vertex normal for the vertex. Either all
vertices should have a normal, or none.
.SetVtxSelect(vno, isSel) Set whether or not the vertex is selected.
.SetVtxTexCo(vno, texco) Sets the vertex vno to have the 2D (point)
texture coordinate texco. Either all vertices should have a texture coordinate, or none. Call .UpdateTexCos() after changing any texture coordinate(s).
.shadow Cast shadows: 2, receive shadows: 1
.shadowLevel 0..1 shadow intensity (1 for full black) for this mesh when it casts a shadow (not receives). Set from the preference, per mesh.
.ShadowMapFrom(lite, minres, colr) Creates a shadow map on this mesh as
the receiver from the specific light, with shadows cast by all meshes in the scene that
can cast shadows. The texture map will have the minimum resolution on one axis. The shadow is created with the specified (24-bit) color. The shadow map is stored in the scene, use txSaveTextureToFile() as needed.
.show Show mesh in viewport. If =1, show everywhere. If =2, never shown in camera view, only shown in projection view when the view is locked to the mesh's parent. If =3, shown everywhere EXCEPT the camera view. If =0, hidden.
.showVertices Show the vertices of the mesh in all viewports, regardless of whether it is selected or there are faces, ie for lidar data.
.SubdivideEdges() Subdivide selected edges/facets.
.SubdivideFacets() Subdivide selected facets (new vertex in middle).
.svec Object scale vector
.sx,.sy,.sz Object scale factor for each coordinate axis (Read only)
.texco List of all vertex texture coordinates (u,v), if present. Call msh.texco.Update() after making changes.
.texCam The camera object from which a texture is being applied to this mesh (ie a rolling or frozen shot image)
.texFrame The frame number from which a frozen texture is being applied, -1 for a rolling texture with dynamic U/V recalculation, -2 for a rolling texture using predefined U/V coordinates, -3 for a rolling texture with predefined U/V coordinates with the green-screen portion dropped out, or -4 for a rolling texture with predefined U/V coordinates with the existing alpha channel applied.
.trans Mesh position relative its parent.
.TrkVLink(vno, shot) Find the tracker linked to the given vertex vno
on the specified shot. There can only be one tracker per vertex on a given shot, but multiple trackers, each for a different shot.
Fast, use for repeated lookups.
.txAlphaAdjust Vector of lo/gamma/high values for adjusting created alpha
.txBlockingMode Mode control for blocking other mesh textures
.txCam Camera (shot) used for texture extraction.
.txCompactImage The compact 8-bit RGB/RGBA image. This is where the image is stored when an 8-bit image is read from disk. Will return null if no compact image is present. Writing a non- image (ie null) will clear it. Either
.txCompactImage or .txImage is present, not both.
.txCompactSize Size of the compact image, if one is present.
.txCompression Compression specification for created texture
.txComputeTexture()* Extract the texture for this mesh. No
cancellation is possible during calculation. Return: 0:fail, 1:pass.
.txCreate Texture creation flag
.txFilename Texture file name
.txFilter Filtering mode for texture creation
.txFlip Texture flipping code
.txFormat Format of texture to be created
.txHasAlpha The stored texture (if any) has a relevant alpha channel, ie one that isn't all 1.0 by more than 0.5/255. Read only.
.txHasTexture A regular or compact texture is present (read only)
.txHigh Maximum texture coordinates (point).
.txIgnoreGarbage Garbage mattes should be ignored
.txImage Returns the texture image. This is the full RGB/RGBA floating-point image, typically as a result of texture extraction. Will return null if no texture image is present. Writing a non- image (ie null) will clear it. Either
.txCompactImage or .txImage is present, not both.
.txIsLit The texture is lit if present (a stored image, not a frozen or dynamic image from the shot).
.txLow Minimum texture coordinates (point).
.txReadTextureFromFile() Read the texture from disk into the scene file;
call after any change to the file name or texture placement parameters. Returns 0:fail, 1:pass
.txSaveTextureToFile() Saves the extracted texture to disk. Returns
0:fail, 1:pass
.txShot Shot used for texture extraction
.txSize Size of stored texture data on this mesh, in bytes. See also .txCompactSize
.txTiltLimit Limit value on angle of mesh to line of sight
.txUpdateAlpha() Update the extracted mesh based on modifications to automatic or painted alpha parameters.
.txWantAlpha Mode. 1: An alpha mask should be created, 0: average pixels to form an image, 2: take best pixels to form an image.
.txXRes Created or as-read X resolution
.txYRes Created or as-read Y resolution
.typeno A numeric equivalent of ".kind", this is the one used by .Regenerate().
.uniqueID A unique ID string (representing a 64-bit integer)
.Unwrap(filnm, wid, hei) Write an "unwrapped" bitmap (.bmp only)
image with the given width and height to the specified filename.
.UpdateTexCos() Call this after updating texture coordinates; it updates the bounding rectangle of the texture coordinates.
.UpdateVerticesFromLinks() Updates mesh’s vertices from links to
trackers, for unparented meshes linked to camera trackers, or parented meshes linked to trackers on the same moving object, ie situations that do not have frame-number dependencies (which the somewhat different single-argument version used by the perspective view can handle). Includes an UpdateVtxs().
.UpdateVerticesFromLinks(what) Updates mesh’s vertices from links to trackers
only on “what”, which can be a shot or a camera. The current Sizzle frame number is an implicit argument: this version accepts time-dependent links, such as updating an unparented mesh’s vertices from links to trackers on a moving object. Includes an UpdateVtxs().
.UpdateVtxs() Call this after updating vtx positions; it updates the bounding box of the texture coordinates and flushes display caches in SynthEyes. Accordingly, this should be called whenever a mesh’s geometry is changed and the user interface is observed to not immediately update.
.VerifySBM(filename) Verify that the given file's contents are
identical to what writing the mesh via WriteSBM would produce.
.VLinkTrk(idx) The tracker for the idx'th link (1..NVLinks).
Note that there can be many links associated with the same tracker, this is commonplace. There can be multiple trackers associated with the same vertex, from different shots.
See also TrkVLink.
.VLinkVtx(idx) The vertex# for the idx'th link (1..NVLinks)
.vtx List of all vertices in the mesh (new supported). After adding, removing, or changing vertex coordinates, call the UpdateVertexMaps() function if you need to subsequently use the unique-vertex functions ToUniqueVertexMap etc.
.vtxCacheFile Vertex cache (input) filename.
.vtxCacheAxisMode Either Z-Up (0) or Y-Up-Right (1). Defaults to
1, which is the common case for Filmbox exports.
.vtxCacheFrameOffset Offset applied to the SynthEyes frame
number (ignoring the effect of the Match frame numbers setting) to determine the frame number pulled from the vertex cache file.
.vtxColor List of all per-vertex colors, as RGBA data where R is the low 8 bits. Call vtxColor.Clear() to remove vertex colors. If vertex colors are present, you must ensure that there are always the same number of vertices and colors. The A field is currently required to be 255 at all times.
.WriteSBM(filename) Write the mesh's geometry as an SBM file,
returning 1 on success, or 0 on failure. See also VerifySBM.
.wtrans Mesh transform in world coordinates
.wx,.wy,.wz etc Mesh position in world coordinates, taking parent motion into account
.willDelete 1 if the object will be deleted after the script completes. Can be changed to control what will happen.
.zuptrans Relative transform .trans, always in Z-up coordinates to facilitate use with Transform.orient
.zupwtrans World transform .wtrans, always in Z-up coordinates to facilitate use with Transform.orient
.x,.y,.z, etc Mesh position relative its parent object, constant. See Transform Attributes
©2024 Boris FX, Inc. — UNOFFICIAL — Converted from original PDF.