IterateModels - this function can be used to output basic information on all models in a component.
Syntax:
$IterateModels( componentGUID, anyText )
Parameters:
componentGUID - a GUID of a component: use the IterateComponents function to get GUIDs of all components (see the example below)
Available variables:
modelGUID - a GUID of a model
modelName - a name of the model
modelTrianglesCount - a number of triangles in the model
modelVerticesCount - a number of vertices in the model
Example:
$IterateComponents( $IterateModels( "$(componentGUID)", Model GUID: $(modelGUID) Model name: $(modelName) Triangles count: $(modelTrianglesCount) Vertices count: $(modelVerticesCount) ) )
ExportModels - this function can be used to output detailed information on all models in the selected component.
Syntax:
$ExportModels( noParametersJustAnyText )
Available variables:
modelName - a name of the model
modelGuid - a GUID of the model
modelTriangleCount - a number of triangles in the model
modelVertexCount - a number of vertices in the model
modelPartCount - a number of parts of the model
modelUnitSize - a size of the unit
modelUnits - the unit name
modelIsColored - true if the model is colored, otherwise false
modelIsTextured - true if the model is textured, otherwise false
Available functions:
ExportTextureInfo - information about the model's texture layers.
Syntax:
$ExportTextureInfo( noParametersJustAnyText )
Available variables:
selectedTextureLayerGuid - index value of the selected texture layer
modelTextureLayerCount - number of texture layers a model has
modelUnwrapStyle - unwrapping style
modelTextureCount - textures' count
modelTextureResolutionX - texture width
modelTextureResolutionY - texture height
modelGutterSize - charts' gutter size
modelTextureUtilization - texture utilization (with gutter)
modelOptimalTexelSize - the optimal texel size
modelTextureQuality - texture quality
modelTexelSize - a texel size
Available functions:
IterateTextureLayers - iterate through texture layers.
Syntax:
$IterateTextureLayers( noParametersJustAnyText )
Available variables:
textureLayerGuid - index value of a texture layer
ExportTextureLayerInfo - export information about the texture layer.
Syntax:
$ExportTextureLayerInfo( textureLayerGuid, anyText )
Parameters:
textureLayerGuid - index value of a texture layer
Available variables:
textureLayerGuid - index value of a texture layer
textureLayerStyle - texturing style that was used to create this texture layer
textureLayerType - type of the texture layer
textureLayerName - name of the texture layer
textureLayerPixelFormat - the pixel format of a texture layer
textureLayerHasInputLayer - if a texture layer was used, it will return value "true" (otherwise "false")
textureLayerInputLayer - image layer that was used to create a texture layer
textureLayerHasSourceModel - if texture layer was created with the Texture reprojection tool and it has an information about the source model, it will return value "true" (otherwise "false")
textureLayerSourceModelGuid - index of the source model
textureLayerHasSourceLayer - if texture layer was created with the Texture reprojection tool and it has an information about the source layer, it will return value "true" (otherwise "false")
textureLayerSourceLayerGuid - index of the source layer
textureLayerTime - time it took to calculate a texture layer
ModelStats
Syntax:
$ModelStats( modelGuid, anyText )
Parameter:
modelGuid
Available variables:
modelDepthMapsTime - depth-map computation time in seconds
modelMeshingTime - meshing time in seconds
modelPostprocessTime - post-processing time in seconds
modelColoringTime - coloring time in seconds
modelUnwrapTime - unwrapping time in seconds
ModelSettings
Syntax:
$ModelSettings( modelGuid, anyText )
Parameter:
modelGuid
Available variables:
modelQuality - a quality level
modelImageDownscaleFactor - an image downscale factor for depth maps
Example (note that ":.xf" is used to round a decimal number to x decimal places):
$ExportModels( Model name: $(modelName) Model GUID: $(modelGuid) Triangles count: $(modelTriangleCount) Vertices count: $(modelVertexCount) Parts count: $(modelPartCount) Unit size: $(modelUnitSize) Units: $(modelUnits) Colored: $(modelIsColored) Textured: $(modelIsTextured) $ExportTextureInfo( Texturing style: $(modelTextureStyle) Unwrapping style: $(modelUnwrapStyle) Textures count: $(modelTextureCount) Texture resolution: $(modelTextureResolutionX) x $(modelTextureResolutionY) Charts gutter size: $(modelGutterSize) texels Texture utilization: $(modelTextureUtilization * 100 :.0f)% Optimal texel size: $(modelOptimalTexelSize:.6f) units per texel Texture quality: $(modelTextureQuality * 100 :.0f)% Texel size: $(modelTexelSize:.6f) units per texel ) $ModelStats( "$(modelGuid)", Depth-map computation time: $(modelDepthMapsTimeStr) ($(modelDepthMapsTime)s) Meshing time: $(modelMeshingTimeStr) ($(modelMeshingTime)s) Post-processing time: $(modelPostprocessTimeStr) ($(modelPostprocessTime)s) Coloring time: $(modelColoringTimeStr) ($(modelColoringTime)s) Unwrapping time: $(modelUnwrapTimeStr) ($(modelUnwrapTime)s) Texturing time: $(modelTexturingTimeStr) ($(modelTexturingTime)s) Overall processing time: $(modelTotalTimeStr) ($(modelTotalTime)s) ) $ModelSettings( "$(modelGuid)", Quality level: $(modelQuality) Image downscale factor: $(modelImageDownscaleFactor) ) )
RenderMesh - exports an image of the model as a separate file.
Syntax:
$RenderMesh( modelGuid, “filepath”, width, height, cameraIndex ) or $RenderMesh( modelGuid, “filepath”, width, height, cameraIndex, textureLayerGuid )
Parameters:
modelGuid - index of the model
filePath - path relative to attachment folder or path in format global://globalPathToFile
width - width of the rendered image
height - height of the rendered image
cameraIndex - index of the camera from which the image will be rendered (use value -1 to render automatically from a camera that has a good overview of the model)
textureLayerGuid - index of the texture layer. This is an optional parameter, and if it is not specified and the model is textured, the texture layer is set to the selected texture layer.
RenderMeshFromCustomPositionYPR - render an image of the model from the custom position and camera rotation.
Syntax:
$RenderMeshFromCustomPositionYPR( modelGUID, "outputFile", width, height, focalLength, x, y, z, yaw, pitch, roll ) or $RenderMeshFromCustomPositionYPR( modelGUID, "outputFile", width, height, focalLength, x, y, z, yaw, pitch, roll, textureLayerGUID )
Parameters:
modelGuid - index of the model
outputFile - the full path with the format extension of the rendered image
width - width of the rendered image in pixels
height - height of the rendered image in pixels
focalLength - focal length of the rendered image
x - the X coordinate of the camera
y - the Y coordinate of the camera
z - the Z coordinate of the camera
yaw - camera's yaw rotation
pitch - camera's pitch rotation
roll - camera's roll rotation
textureLayerGUID - index of the texture layer that is going to be used in the rendered image
Example:
$IterateComponents( $IterateModels( "$(componentGUID)", $RenderMeshFromCustomPositionYPR( "$(modelGUID)", "renderMesh.png", 6000, 4000, 24, -21, 19, 17, 0, 90, 0 ) ) )
RenderMeshFromCustomPositionLookAt - render an image of the model from the custom position while looking at the custom position.
Syntax:
$RenderMeshFromCustomPositionLookAt( modelGUID, "outputFile", width, height, focalLength, x, y, z, atX, atY, atZ ) or $RenderMeshFromCustomPositionLookAt( modelGUID, "outputFile", width, height, focalLength, x, y, z, atX, atY, atZ, upX, upY, upZ ) or $RenderMeshFromCustomPositionLookAt( modelGUID, "outputFile", width, height, focalLength, x, y, z, atX, atY, atZ, upX, upY, upZ, textureLayerGUID )
Parameters:
modelGuid - index of the model
outputFile - the full path with the format extension of the rendered image
width - width of the rendered image in pixels
height - height of the rendered image in pixels
focalLength - focal length of the rendered image
x - the X coordinate of the camera
y - the Y coordinate of the camera
z - the Z coordinate of the camera
atX - the X coordinate of the position towards which the camera will be looking at
atY - the Y coordinate of the position towards which the camera will be looking at
atZ - the Z coordinate of the position towards which the camera will be looking at
upX - the X coordinate that defines the up-vector
upY - the Y coordinate that defines the up-vector
upZ - the Z coordinate that defines the up-vector
textureLayerGUID - index of the texture layer that is going to be used in the rendered image
Example:
$IterateComponents( $IterateModels( "$(componentGUID)", $RenderMeshFromCustomPositionLookAt( "$(modelGUID)", "global://D:\\Project\\Render\\renderMesh.jpg", 6000, 4000, 24, 120, 95, 25, 0, 10, 15, 0, 0, 1) ) ) )
GetNumberOfModels - returns a number of models created under a certain component.
Syntax:
GetNumberOfModels( componentGuid )
Parameters:
componentGuid - a GUID of a component
Learn how to create custom report templates
Functions sets and their functions, expressions and variables
Project information, exporter scope, and basic function set
Learn how to export information about project images
Component export functions and variables
Learn how to get information about cameras
Learn how to add custom point statics to reports
Check the list of control points and constraints functionalities
See the list of ortho projection export functions
See the list of map export functions