### Execute graph with file:// resource parameters Source: https://docs.instamat.io/Products/InstaMAT_Pipeline Loads a Font and a Background image from the C:/ drive using the file:// prefix. The command extends the previous example by adding file-based resources as input parameters. ```text InstaMATPipeline -mode Execute -graph Text 1024 1024" -parameter FontSize 0.2 -parameter HorizontalAlignment 1 -parameter Text "\"InstaMAT\nis\namazing\"" -compositionParameter Levels Output "Luminance In" "[ 0.0 0.6 0.8 ]" -parameter Background "file://C:/Image.png" -parameter Font "file://C:/Font.ttf" ``` -------------------------------- ### VisEx parenthesis example Source: https://docs.instamat.io/Products/InstaMAT_Studio/Canvas/Visibility_Expressions Shows how to use parentheses to define logical order in a VisEx expression. Note that a space is required before and after the ( and ) characters. ```text Mode == 0 || ( Mode == 1 && StepCount > 0 ) ``` -------------------------------- ### Execute graph with composition parameter Source: https://docs.instamat.io/Products/InstaMAT_Pipeline Extends the previous example by adding a Levels composition node. The Output of the graph is connected to the RGBIn input of the Levels node, and its input parameter is set to the vector [0.0 0.6 0.8]. ```text InstaMATPipeline -mode Execute -graph Text 1024 1024 -parameter Seed 1005 -parameter FontSize 0.2 -parameter HorizontalAlignment 1 -parameter Text "\"InstaMAT\nis\namazing\"" -compositionParameter Levels Output "RGBIn" "[ 0.0 0.6 0.8 ]" ``` -------------------------------- ### VisEx combined water level and shore wetness example Source: https://docs.instamat.io/Products/InstaMAT_Studio/Canvas/Visibility_Expressions Makes a parameter visible only when both WaterLevel is greater than 0 and WaterLevelShoreWetness is greater than or equal to 0.50 (50%). ```text WaterLevel > 0.00 && WaterLevelShoreWetness >= 0.50 ``` -------------------------------- ### VisEx water level visibility example Source: https://docs.instamat.io/Products/InstaMAT_Studio/Canvas/Visibility_Expressions Makes a parameter visible when the WaterLevel parameter is greater than 0. The parameter stays invisible while WaterLevel is 0% and becomes visible as soon as the water level increases. ```text WaterLevel > 0.00 ``` -------------------------------- ### VisEx logical operator chaining examples Source: https://docs.instamat.io/Products/InstaMAT_Studio/Canvas/Visibility_Expressions Two example VisEx expressions that chain conditions with logical operators. The first combines a vector component comparison with an equality check using &&; the second uses || to allow either condition. Both are valid only when the parameter name is on the left side of the operator. ```text Resolution.X > 10 && StepCount == 5 ``` ```text Mode == 0 || Mode == 2 ``` -------------------------------- ### Load built-in MAT Library with IInstaMAT::LoadPackagesAtPath Source: https://docs.instamat.io/Products/InstaMAT_C%2B%2B_SDK Loads the built-in MAT Library from the InstaMAT Studio installation directory using IInstaMAT::LoadPackagesAtPath. The path is platform-specific (Windows vs macOS). If loading fails, an error message is printed to stderr. ```cpp #if defined(WIN32) const char *const instaMATPath = "C:\\Program Files\\InstaMAT Studio\\Environment"; #elif defined(__APPLE__) const char *const instaMATPath = "/Applications/InstaMAT Studio.app/Contents/Resources/Environment"; #endif if (instaMAT->LoadPackagesAtPath(instaMATPath, /*persistentResources:*/ true, /*systemLibrary:*/true) == 0u) { fprintf(stderr, "ERROR: Failed to load the system library from '%s'.\n", instaMATPath); } ``` -------------------------------- ### Load user package and iterate graph objects Source: https://docs.instamat.io/Products/InstaMAT_C%2B%2B_SDK Loads a user package from a file using IInstaMAT::AllocPackageFromFile, retrieves all graph objects with IInstaMAT::GetGraphObjectsInPackage, and iterates them to log graph type and name via IGraphObject::AsGraph. The three blocks are sequential steps of the same workflow: load package, get objects, iterate. ```cpp const char *const kPackagePath = "InstaMAT SDK Sample.IMP"; IGraphPackage* const graphPackage = instaMAT->AllocPackageFromFile(kPackagePath, /*persistentResources:*/ true); if (graphPackage == nullptr) { fprintf(stderr, "ERROR: Failed to load GraphPackage from path='%s'\n", kPackagePath); return; } ``` ```cpp IGraphObject** graphObjects; if (!instaMAT->GetGraphObjectsInPackage(*graphPackage, &graphObjects)) { fprintf(stderr, "ERROR: Failed to iterate GraphObjects in package.\n"); return; } ``` ```cpp for (auto it = graphObjects; *it != nullptr; it++) { IGraphObject* const graphObject = *it; if (IGraph* const graph = graphObject->AsGraph()) { fprintf(stdout, "Graph: Type=%s Name=%s\n", graph->GetGraphTypeString(), graphObject->GetName(/*friendlyName:*/ true)); } } ``` -------------------------------- ### VisEx vector component access example Source: https://docs.instamat.io/Products/InstaMAT_Studio/Canvas/Visibility_Expressions Accesses the X component of a Vector2UI32 parameter named Count. The parameter becomes visible when the X value is greater than 10. Components are accessed with .X or .Y. ```text Count.X > 10 ``` -------------------------------- ### Exclude graph from unit testing with -excludeGraph Source: https://docs.instamat.io/Products/InstaMAT_Pipeline Excludes the graph with GraphID "53e7ba3e-29ca-4673-8830-93f8307bbcc3" from unit testing. The example excludes the graph "Brick Wall Painted Red". ```text InstaMATPipeline -mode UnitTest -env "Environment/" -outputFolder "Reference/" -excludeGraph "53e7ba3e-29ca-4673-8830-93f8307bbcc3" ``` -------------------------------- ### Configure output path format with -outputPathFormat Source: https://docs.instamat.io/Products/InstaMAT_Pipeline Configures the output path format. The default format is {GRAPH.NAME}_{OUTPUT.TYPE}_{OUTPUT.NAME}.png8, where png8 indicates Normalized8 output. The example exports Pavement as a PNG with Normalized16 format using png16. ```text -outputPathFormat . ``` ```text {GRAPH.NAME}_{OUTPUT.TYPE}_{OUTPUT.NAME}.png8 ``` ```text InstaMATPipeline -mode Execute -graph "Pavement" 1024 1024 -outputPathFormat "{GRAPH.NAME}_{OUTPUT.NAME}.png16" ``` -------------------------------- ### Get Machine Key with InstaMATPipeline -machineKey Source: https://docs.instamat.io/KnowledgeBase/KB0029 Use this command to output the machine key of the target machine to the console. This is required for offline authorization. Note that you do not require InstaMAT Pipeline license entitlements to authorize via Pipeline. ```bash InstaMATPipeline -machineKey ``` -------------------------------- ### Initialize InstaMAT SDK with GPU backend Source: https://docs.instamat.io/Products/InstaMAT_C%2B%2B_SDK Initializes the InstaMAT SDK with GPU backend and no plugins. If initialization fails, an error message is printed to stderr. The SDK is hardware-accelerated and executes on the graphics card; a software backend fallback is available on Windows if no GPU is present. ```cpp if (!instaMAT->Initialize(IInstaMAT::BackendTypeGPU, IInstaMAT::BackendFlagNoPlugins)) { fprintf(stderr, "ERROR: Failed to initialize InstaMAT.\n"); } ``` -------------------------------- ### Execute graph with CPU backend using -software Source: https://docs.instamat.io/Products/InstaMAT_Pipeline Executes a graph using the CPU execution backend on machines without a graphics card. The -software argument enables CPU execution instead of GPU. ```text InstaMATPipeline -software -mode Execute -graph "ArcPavement" 1024 1024 ``` -------------------------------- ### Create or load a package with -mode Package Source: https://docs.instamat.io/Products/InstaMAT_Pipeline Generates a package named 'TestPackage.IMP' in the directory 'C:\Packages'. If a package exists at the specified path, it is loaded instead. ```text InstaMATPipeline -mode Package "/Packages/TestPackage.IMP" ``` -------------------------------- ### Authorize InstaMAT machine with AuthorizeMachine Source: https://docs.instamat.io/Products/InstaMAT_C%2B%2B_SDK Authorize the workstation using your license credentials. If authorization fails, an error is printed and the function returns. On success, the current license information and host authorization status are printed to stdout. ```cpp if (!instaMAT->AuthorizeMachine("username", "password")) { fprintf(stderr, "ERROR: Failed to acquire license:\n%s\n", instaMAT->GetAuthorizationInformation()); return; } // output current license information to console fprintf(stdout, "%s\n", instaMAT->GetAuthorizationInformation()); fprintf(stdout, "Is host authorized: %s\n", instaMAT->IsHostAuthorized() ? "YES" : "NO"); ``` -------------------------------- ### Generate License File with InstaMATPipeline -authorizeKey Source: https://docs.instamat.io/KnowledgeBase/KB0029 Use this command on an internet-connected machine to request a license file for the specified machine key. Replace , , , and with your details. The is the name and location where InstaMAT will generate the license file; an absolute or relative path can be provided. ```bash InstaMATPipeline -authorizeKey ``` -------------------------------- ### Execute Voronoi with folder structure in -outputPathFormat Source: https://docs.instamat.io/Products/InstaMAT_Pipeline Executes the Voronoi graph and uses a format string to automatically create a folder structure. The format string includes the graph category and name as folders, plus date, output name, and resolution in the filename. ```text InstaMATPipeline -mode Execute -graph "Voronoi" 2048 2048 -outputPathFormat "Export/{GRAPH.CATEGORY}/{GRAPH.NAME}/{YEAR}{MONTH}{DAY}{OUTPUT.NAME}_{FORMAT.WIDTH}x{FORMAT.HEIGHT}.png8" ``` -------------------------------- ### Execute a graph with IElementExecution (Step 7) Source: https://docs.instamat.io/Products/InstaMAT_C%2B%2B_SDK Step 7 of the InstaMAT SDK tutorial: execute a graph without changing its parameters. Locate the 'Voronoi' graph from the built-in library using IInstaMAT::GetGraphByName, allocate an IElementExecution session (GPU-bound, use only on the thread that initialized the SDK), create a grayscale permutation via IElementExecution::CreateInstance, set the output format to 1024x1024 with Normalized16, and run with a progress delegate that can abort by returning false. Each step prints an error to stderr on failure. ```cpp const char* const kTestGraphName = "Voronoi"; IGraph* const graph = instaMAT->GetGraphByName(kTestGraphName, 0u); if (graph == nullptr) { fprintf(stderr, "ERROR: Failed to get graph with name='%s'\n", kTestGraphName); } ``` ```cpp std::unique_ptr> execution(instaMAT->AllocElementExecution(), [instaMAT](IElementExecution* ptr) { instaMAT->DeallocElementExecution(ptr); }); if (execution == nullptr) { fprintf(stderr, "ERROR: Failed to allocate element execution\n"); } ``` ```cpp const bool createGrayscalePermutation = true; if (!execution->CreateInstance(*graph, createGrayscalePermutation ? ElementExecutionFlags::GrayscalePermutation : ElementExecutionFlags::None)) { fprintf(stderr, "ERROR: Failed to instance graph in execution session with name='%s'\n", graph->AsObject()->GetName(/*friendlyName:*/ true)); } ``` ```cpp execution->SetFormat(1024u, 1024u, ElementExecutionFormat::Normalized16); ``` ```cpp const auto fnProgressDelegate = [](const IGraph& graph, const float progress) -> bool { fprintf(stdout, " > Progress for %s : %.2f%%\n", graph.AsObject()->GetName(/*friendlyName:*/ true), progress * 100.0f); return true; }; if (!execution->Execute(fnProgressDelegate)) { fprintf(stderr, "ERROR: Failed to execute graph in execution session with name='%s'\n", graph->AsObject()->GetName(/*friendlyName:*/ true)); } ``` -------------------------------- ### Generate documentation with InstaMATPipeline Source: https://docs.instamat.io/Products/InstaMAT_Pipeline Generates markdown documentation for all packages. The -env argument is required to load library packages and ensure dependencies are loaded correctly. The optional -outputFolder specifies a custom output folder, and -excludeCategory can be used to skip graphs from a specified category. ```text InstaMATPipeline -mode GenerateDocumentation -env "Environment/" -outputFolder "Documentation/" ``` -------------------------------- ### Request license file with InstaMATPipeline -authorizeKey Source: https://docs.instamat.io/Products/InstaMAT_Pipeline Requests a license file for the specified machine key and writes it to the given filename. Use on an internet-connected machine to create a license file for offline activation. ```text InstaMATPipeline -authorizeKey ``` -------------------------------- ### Load InstaMAT SDK with INSTAMAT_DLOPEN Source: https://docs.instamat.io/Products/InstaMAT_C%2B%2B_SDK Load the InstaMAT SDK dynamic library using the platform-agnostic macros INSTAMAT_DLOPEN and INSTAMAT_DLSYM. Requires including on Windows or on macOS. The code checks the DLL handle and retrieves the GetInstaMAT function pointer, printing an error if the API version is invalid. ```cpp #if defined(WIN32) INSTAMAT_DLHANDLE dllHandle = INSTAMAT_DLOPEN(TEXT(INSTAMAT_LIBRARY_NAME)); #else INSTAMAT_DLHANDLE dllHandle = INSTAMAT_DLOPEN(INSTAMAT_LIBRARY_NAME); #endif InstaMAT::IInstaMAT *instaMAT = nullptr; if (dllHandle != nullptr) { fprintf(stdout, "Loaded InstaLOD Library\n"); pfnGetInstaMAT pGetInstaMAT = (pfnGetInstaMAT)INSTAMAT_DLSYM(dllHandle, "GetInstaMAT"); if (!pGetInstaMAT(INSTAMAT_API_VERSION, &instaMAT)) { fprintf(stderr, "ERROR: Failed to get InstaMAT SDK API. Invalid SDK version?\n"); return; } } ``` -------------------------------- ### Authorize InstaMAT Pipeline with InstaMATPipeline -authorize Source: https://docs.instamat.io/KnowledgeBase/KB0029 Use this command to authorize a workstation with InstaMAT Pipeline. Replace and with your actual license information. After execution, the workstation is authorized for use with InstaMAT. ```bash InstaMATPipeline -authorize ``` -------------------------------- ### Generate previews for a specific category with InstaMATPipeline Source: https://docs.instamat.io/Products/InstaMAT_Pipeline Generates previews for items in the "Materials/Bricks/Stone" category and writes them to a folder named "Previews". Uses the -category argument to filter the category. ```text InstaMATPipeline -mode GeneratePreviews -OutputFolder "/Previews" -category "Materials/Bricks/Stone" ``` -------------------------------- ### Execute Mesh UV Unwrap with -outputMeshFormat .obj Source: https://docs.instamat.io/Products/InstaMAT_Pipeline Executes the Mesh UV Unwrap graph and outputs the resulting mesh as an OBJ file. The -outputMeshFormat parameter overrides the default FBX format with the specified file extension. ```text InstaMATPipeline -mode Execute -graph "Mesh UV Unwrap" 1024 1024 -parameter Mesh "file://C:/SM_Game_MilitaryCrate_Target.fbx" -outputMeshFormat .obj ``` -------------------------------- ### Generate previews with InstaMATPipeline Source: https://docs.instamat.io/Products/InstaMAT_Pipeline Runs InstaMAT Pipeline in GeneratePreviews mode to generate and write image previews to disk. The -category and -excludeCategory arguments can be used to determine which categories to generate previews for. ```text InstaMATPipeline -mode GeneratePreviews -OutputFolder ``` -------------------------------- ### Execute unit tests with InstaMATPipeline Source: https://docs.instamat.io/Products/InstaMAT_Pipeline Executes unit tests for all packages in the specified environment. Compares generated textures with reference counterparts pixel by pixel and logs detailed statistics to the console. ```text InstaMATPipeline -env "Environment/" -mode UnitTest ``` -------------------------------- ### Initialize InstaMAT authorization Source: https://docs.instamat.io/Products/InstaMAT_C%2B%2B_SDK Initialize the licensing subsystem before using any public InstaMAT API methods. This step can be skipped if using a custom SDK build with customized licensing. On failure, the error message is printed to stderr. ```cpp if (!instaMAT->InitializeAuthorization("InstaMATSDK", nullptr)) { fprintf(stderr, "ERROR: Failed to initialize authorization module:\n%s\n", instaMAT->GetAuthorizationInformation()); } ``` -------------------------------- ### Generate reference images with InstaMATPipeline Source: https://docs.instamat.io/Products/InstaMAT_Pipeline Generates reference images for all packages in the InstaMAT Pipeline folder. Specify the environment with -env to ensure dependencies are met, and the output folder with -outputFolder . ```text InstaMATPipeline -mode UnitTest -env "Environment/" -outputFolder "Reference/" ``` -------------------------------- ### Include InstaMATAPI.h Source: https://docs.instamat.io/Products/InstaMAT_C%2B%2B_SDK Include the InstaMAT SDK header file in your C++ source file. This is required before loading the SDK's dynamic library. ```cpp #include "InstaMATAPI.h" ``` -------------------------------- ### List all graphs in a package with -graphSearch * Source: https://docs.instamat.io/Products/InstaMAT_Pipeline Queries all graphs in the package 'Noise' by passing the package path and using '*' as the query. Search results are output in JSON format. ```text InstaMATPipeline -mode Search "Environment/Packages/noise/Noise.IMP" -graphSearch * ``` -------------------------------- ### Generate Visual Studio project files with CMake Source: https://docs.instamat.io/Products/InstaMAT_C%2B%2B_SDK Generates Visual Studio project files for the InstaMAT SDK Sample Application. Run these commands in the InstaMATSDKSample directory. Requires CMake 3.5 or higher. ```bash mkdir build cd build cmake -G "Visual Studio 17 2022" ``` -------------------------------- ### Execute built-in graph Pavement Source: https://docs.instamat.io/Products/InstaMAT_Pipeline Executes the built-in graph Pavement at 1024x1024. No package filepath is needed because the graph is part of the included InstaMAT Pipeline library. ```text InstaMATPipeline -mode Execute -graph "Pavement" 1024 1024 ``` -------------------------------- ### Generate HTML unit test output with InstaMATPipeline Source: https://docs.instamat.io/Products/InstaMAT_Pipeline Creates a unit test output in the UnitTestOutput/ directory as an HTML file with previews and detailed test results. ```text InstaMATPipeline -env "Environment/" -mode UnitTest -HTMLOutput "UnitTestOutput/" ``` -------------------------------- ### Ingest License File with InstaMATPipeline -ingestLicense Source: https://docs.instamat.io/KnowledgeBase/KB0029 Use this command on the target machine to ingest the generated license file into the InstaMAT licensing system. Replace with the path to the license file. After execution, the workstation is fully activated. ```bash InstaMATPipeline -ingestLicense ``` -------------------------------- ### Execute Voronoi with InstaMAT Variables in -outputPathFormat Source: https://docs.instamat.io/Products/InstaMAT_Pipeline Executes the Voronoi graph and uses a format string with InstaMAT Variables to name the output file. The format string writes the current date, graph name, output name, and resolution into the filename. ```text InstaMATPipeline -mode Execute -graph "Voronoi" 2048 2048 -outputPathFormat "Export/{YEAR}{MONTH}{DAY}{GRAPH.NAME}_{OUTPUT.NAME}_{FORMAT.WIDTH}x{FORMAT.HEIGHT}.png8" ``` -------------------------------- ### Add a resource to a package with -package Resource Add Source: https://docs.instamat.io/Products/InstaMAT_Pipeline Adds the resource 'CarHood.fbx' to the package 'TestPackage.IMP'. Resources can be added, updated, or deleted using the -package Resource modifier with Add, Delete, or Update. ```text InstaMATPipeline -mode Package "/Packages/TestPackage.IMP" -package Resource Add "/Models/CarHood.fbx" ``` -------------------------------- ### Uninstall InstaMAT Studio on Linux with dnf Source: https://docs.instamat.io/Products/InstaMAT_Studio/Installation Uninstalls InstaMAT Studio on Linux via the system package manager. Run this command after quitting the app. User configuration and logs under ~/.config/InstaMAT and ~/.cache/InstaMAT are not removed. ```bash sudo dnf remove instamat-studio ``` -------------------------------- ### Execute graph from external package with pattern Source: https://docs.instamat.io/Products/InstaMAT_Pipeline Executes the graph Aged Golden Icon from an external package. The second command uses a file pattern (Aged*) to match the graph name, as packages typically contain only a few graphs. ```text InstaMATPipeline -mode Execute "Environment/Packages/Materials/AgedGoldenInstaMAT.IMP" -graph "Aged Golden Icon" 1024 1024" ``` ```text InstaMATPipeline -mode Execute "Environment/Packages/Materials/AgedGoldenInstaMAT.IMP" -graph "Aged*" 1024 1024 ``` -------------------------------- ### Execute Gradient Radial with absolute -outputPathFormat Source: https://docs.instamat.io/Products/InstaMAT_Pipeline Executes the Gradient Radial graph and writes its single output to an absolute path using -outputPathFormat. The format string determines the output directory, file naming, extension, and texture format. ```text InstaMATPipeline -mode Execute -graph "Gradient Radial" 1024 1024 -outputPathFormat "C:/Textures/Radial Gradient.png8" ``` -------------------------------- ### Execute PointCloud Shape Generator with -outputPointCloudFormat .ply Source: https://docs.instamat.io/Products/InstaMAT_Pipeline Executes the PointCloud Shape Generator graph and outputs the resulting point cloud as a PLY file. The -outputPointCloudFormat parameter sets the file format; PLY is the default. ```text InstaMATPipeline -mode Execute -graph "PointCloud Shape Generator" 1024 1024 -outputPointCloudFormat .ply ``` -------------------------------- ### Execute graph with multiple -parameter arguments Source: https://docs.instamat.io/Products/InstaMAT_Pipeline Executes the graph 'Text' with customized Seed, FontSize, HorizontalAlignment, and Text parameters. The Seed value must be an integer in the range [0...100000]. Enumeration values like HorizontalAlignment are passed as integers (1 corresponds to Center). ```text InstaMATPipeline -mode Execute -graph Text 1024 1024 -parameter Seed 1005 -parameter FontSize 0.2 -parameter HorizontalAlignment 1 -parameter Text "\"InstaMAT\nis\namazing\"" ``` -------------------------------- ### Execute Gradient Radial with relative -outputPathFormat Source: https://docs.instamat.io/Products/InstaMAT_Pipeline Executes the Gradient Radial graph and writes its output to a relative path. If the Export/ directory does not exist, InstaMAT Pipeline creates it. ```text InstaMATPipeline -mode Execute -graph "Gradient Radial" 1024 1024 -outputPathFormat "Export/Radial Gradient.png8" ``` -------------------------------- ### Export graph output images to PNG using IGraph::GetParameterCount Source: https://docs.instamat.io/Products/InstaMAT_C%2B%2B_SDK Iterates over the output parameters of a graph instance and writes each image output to a PNG file. Requires a previously executed graph (from Step 7) and an instaMAT context. Uses IGraph::GetParameterCount and IGraph::GetParameterAtIndex to enumerate outputs, then allocates an image sampler and calls WritePNG with 16-bit depth and no dithering. Prints a success message to stdout or an error to stderr on failure. ```cpp for (uint32 outputParameterIndex = 0u; outputParameterIndex < execution->GetInstance()->GetParameterCount(IGraph::ParameterTypeOutput); outputParameterIndex++) { const IGraphVariable* const variable = execution->GetInstance()->GetParameterAtIndex(outputParameterIndex, IGraph::ParameterTypeOutput); // NOTE: for instances in element graphs, all AtomImage* types get automatically converted to ElementImage* types if (variable->GetVariableTypeValue() == IGraphVariable::TypeElementImage || variable->GetVariableTypeValue() == IGraphVariable::TypeElementImageGray) { if (IImageSampler* const imageSampler = execution->AllocImageSamplerForOutputParameter(*variable, variable->GetColorSpaceTypeValue() == IGraphVariable::ColorSpaceTypeSRGB)) { const String outputName = graph->AsObject()->GetName(/*friendlyName:*/ true) + String(".") + variable->AsObject()->GetName(/*friendlyName:*/ true) + String(".png"); if (imageSampler->WritePNG(outputName.c_str(), /*bpp:*/ 16u, /*allowDithering:*/ false)) { fprintf(stdout, "Wrote output image to path='%s'\n", outputName.c_str()); } else { fprintf(stderr, "ERROR: Failed to write output image to path='%s'\n", outputName.c_str()); } instaMAT->DeallocImageSampler(imageSampler); } } } ``` -------------------------------- ### Run InstaMATPipeline in UnitTest mode Source: https://docs.instamat.io/Products/InstaMAT_Pipeline Runs the unit test mode of InstaMATPipeline. This is the base command for executing unit tests on Element graphs. ```text InstaMATPipeline -mode UnitTest ``` -------------------------------- ### Execute graph with output template using -exportTemplate Source: https://docs.instamat.io/Products/InstaMAT_Pipeline Executes a graph with a custom output template. The -exportTemplate argument can be placed before or after -graph, but must be after -mode Execute. ```text InstaMATPipeline -mode Execute "Test.IMP" -graph "Test" 1024 1024 -exportTemplate "/Output Templates/Test Template.json" ``` -------------------------------- ### Configure INSTAMAT_PATH in InstaMATSDKSample.cpp Source: https://docs.instamat.io/Products/InstaMAT_C%2B%2B_SDK Sets the INSTAMAT_PATH define in InstaMATSDKSample.cpp to locate the built-in MAT Library. Required for the sample application to execute; if not set correctly, the sample will not run. ```cpp #define INSTAMAT_PATH "C:\\Program Files\\InstaMAT Studio" ``` -------------------------------- ### Execute mode and -graph argument Source: https://docs.instamat.io/Products/InstaMAT_Pipeline Sets the application mode to Execute and configures the graph name and output size. The -mode argument is required, and the filename is optional when the graph is in the InstaMAT Pipeline library. ```text InstaMATPipeline -mode Execute ``` ```text -graph ``` -------------------------------- ### Set execution format with -executionType Source: https://docs.instamat.io/Products/InstaMAT_Pipeline Sets the execution format with -executionType. The first command executes Moisture at 2048x2048 with FullRange32 (32-bit full range). The second executes at 512x512 with Normalized16 (16-bit normalized). Without -outputPathFormat, the graph executes at 32-bit but uses the default output format, resulting in an 8-bit output texture file. ```text InstaMATPipeline -mode Execute -graph "Moisture" 2048 2048 -executionType "FullRange32" ``` ```text InstaMATPipeline -mode Execute -graph "Moisture" 512 512 -executionType "Normalized16" ``` -------------------------------- ### Update package meta data with -package MetaData Update Source: https://docs.instamat.io/Products/InstaMAT_Pipeline Adds two meta data entries to the package: 'Author' set to 'InstaMaterial GmbH' and 'BuildDate' set to the current date using the Windows-specific %DATE% variable. Meta data can be added, updated, or deleted with the -package MetaData argument. ```text InstaMATPipeline -mode Package "/Packages/TestPackage.IMP" -package MetaData Update "Author:InstaMaterial GmbH" -package MetaData Update "BuildDate:%DATE%" ``` -------------------------------- ### Execute graph with -outputFilter Source: https://docs.instamat.io/Products/InstaMAT_Pipeline Executes the 'Mesh Bake' graph with output filtering. The -outputFilter pattern '*Tangent*;*Ambient*' generates only outputs containing 'Tangent' or 'Ambient' (e.g., Tangent Space Normal and Ambient Occlusion). Multiple filters are separated by semicolons. ```text InstaMATPipeline -mode Execute -graph Mesh Bake 1024 1024 -parameter "SourceMesh" "file://C:/SM_Game_MilitaryCrate_1mio.fbx" -parameter "TargetMesh" "file://C:/SM_Game_MilitaryCrate_Target.fbx" -outputFilter "*Tangent*;*Ambient*" ``` -------------------------------- ### Execute grayscale permutation with -grayscale Source: https://docs.instamat.io/Products/InstaMAT_Pipeline Executes the grayscale permutation of the graph 'Blue Noise'. If the graph is not grayscale permutable, the -grayscale argument is ignored and the colored version is executed. ```text InstaMATPipeline -mode Execute -graph "Blue Noise" 1024 1024 -grayscale ``` -------------------------------- ### Generate HTML unit test output with custom template Source: https://docs.instamat.io/Products/InstaMAT_Pipeline Generates HTML unit test output using a custom HTML template as the basis for the page. ```text InstaMATPipeline -env "Environment/" -mode UnitTest -HTMLOutput "UnitTestOutput/" -HTMLTemplate "Template/InstaMAT.html" ``` -------------------------------- ### Deauthorize InstaMAT Pipeline with InstaMATPipeline -deauthorize Source: https://docs.instamat.io/KnowledgeBase/KB0029 Use this command to deauthorize a machine using InstaMAT Pipeline. Replace and with your license information. Note that deauthorization takes up to 24 hours to complete; the seat/node remains locked until the cycle finishes. ```bash InstaMATPipeline -deauthorize ``` -------------------------------- ### Display graph info with -mode Info -graphInfo Source: https://docs.instamat.io/Products/InstaMAT_Pipeline Displays information about a graph object from the library or an InstaMAT package. The graph name is passed after -graphInfo; here the 'Text' graph from the InstaMAT library is queried. Output is in a readable, easily parsed format. ```text InstaMATPipeline -mode Info -graphInfo Text ``` -------------------------------- ### Add composition node with -compositionParameter Source: https://docs.instamat.io/Products/InstaMAT_Pipeline Automatically generates a composition node (e.g., Levels) to modify the graph output. Connects the OutputParameter of the executed graph to the image input of the composition node and sets its InputParameter to the given value. ```text -compositonParameter ``` -------------------------------- ### Delete a resource from a package with -package Resource Delete Source: https://docs.instamat.io/Products/InstaMAT_Pipeline Deletes the resource 'CarHood.fbx' from the package 'TestPackage.IMP' using the Delete modifier. ```text InstaMATPipeline -mode Package "/Packages/TestPackage.IMP" -package Resource Delete "/Models/CarHood.fbx" ``` -------------------------------- ### Set graph parameter with -parameter Source: https://docs.instamat.io/Products/InstaMAT_Pipeline Sets a graph input parameter when executing a graph through InstaMAT Pipeline. The ParameterValue must be JSON-formatted; scalars like 94, 94.83, true, and false are passed directly, vectors as JSON arrays, and strings as native JSON strings with escaped quotes. ```text -parameter ``` -------------------------------- ### Search graphs by query and category Source: https://docs.instamat.io/Products/InstaMAT_Pipeline Searches for all graphs matching 'Blend' in the 'Image' category. The category is specified as an additional argument after the query. ```text InstaMATPipeline -mode Search -graphSearch Blend Image ``` -------------------------------- ### String value with newlines for -parameter Source: https://docs.instamat.io/Products/InstaMAT_Pipeline Shows the string value represented by the JSON string "\"InstaMAT\nis\namazing\"" used in the -parameter argument. The string contains newline characters that must be escaped in the command line. ```text InstaMAT is amazing ``` -------------------------------- ### Search graphs by name with -graphSearch Source: https://docs.instamat.io/Products/InstaMAT_Pipeline Searches the library for graphs matching the name 'Ambient Occlusion'. Quotes are required because the graph name contains whitespace. ```text InstaMATPipeline -mode Search -graphSearch "Ambient Occlusion" ``` -------------------------------- ### Delete package meta data with -package MetaData Delete Source: https://docs.instamat.io/Products/InstaMAT_Pipeline Deletes the 'Author' meta data entry from the package using the Delete modifier. ```text InstaMATPipeline -mode Package "/Packages/TestPackage.IMP" -package MetaData Delete "Author:InstaMaterial GmbH" ``` === COMPLETE CONTENT === This response contains all available snippets from this library. No additional content exists. Do not make further requests.