docs.unity3d.com
Version: 

    Docker image

    General Information

    Pixyz SDK is cloud-ready. Unity Cloud currently uses Pixyz-based Docker images for its automatic CAD and 3D transformation pipelines, including thumbnail generation, GLB web-previews, metadata extraction, file conversions, 3D data streaming, and more.

    As a standalone toolkit, Pixyz SDK is available for on-premise (local) or VPC deployments for Unity external customers who cannot leverage Unity Cloud online services.

    Get Started

    The Pixyz SDK Docker image is available on Docker Hub.

    A floating license server is required to run the Pixyz SDK Docker container.

    Set Up the License Server

    The license server must be running on the network and accessible from the container. Ports 27000 to 27010 must be opened.

    License server installation guides:

    • Windows
    • Linux

    Get the SDK Docker Container

    docker pull pixyzinc/sdk:2024.2.1.3
    

    Install License

    A license file must be mounted (with write permission) to /usr/share/PixyzSDK/licenses/pixyz.lic for the container to run.

    Create the pixyz.lic file with the following content:

    <?xml version="1.0" encoding="utf-8" ?>
    <license product="PixyzSDK">
      <version/>
      <validity start="" end=""/>
      <customer>
        <company/>
        <name/>
        <email/>
        <site/>
        <phone/>
      </customer>
      <floatting>True</floatting>
      <server>
        <port>27000</port>
        <host>##YOUR_SERVER_IP_OR_HOSTNAME###</host>
        <flexLM>True</flexLM>
      </server>
      <machine/>
    </license>
    

    Replace ##YOUR_SERVER_IP_OR_HOSTNAME### with the IP address or hostname of the license server.

    Configure License Server

    Use the following code at the top of your datap reparation script to configure the license server:

    import pxz
    from pxz import core
    
    # init Pixyz
    pxz.initialize()
    
    # print Pixyz version
    print(core.getVersion())
    
    # set log level to INFO so you can see the logs in the console
    core.configureInterfaceLogger(True, True, True)
    core.addConsoleVerbose(core.Verbose.INFO)
    
    # if no license is found, try to configure a license server
    if not core.checkLicense():
        core.configureLicenseServer("company-server-hostname", 27000, True)
    
    # add all tokens
    for token in pxz.core.listTokens():
        try:
            core.needToken(token)
        except:
            pass
    
    # use io.importScene to import a file and enjoy :)
    

    Replace company-server-hostname with the IP address or hostname of the license server.

    You can alternatively require tokens individually. For example:

    pxz.core.needToken("PixyzSDK")
    pxz.core.needToken("IO")
    pxz.core.needToken("Script")
    pxz.core.needToken("PxzImport")
    pxz.core.needToken("PxzExport")
    pxz.core.needToken("ImportBundle0")
    pxz.core.needToken("ImportBundle1")
    pxz.core.needToken("ImportBundle2")
    pxz.core.needToken("ImportBundle3")
    pxz.core.needToken("ExportBundle0")
    pxz.core.needToken("ExportBundle1")
    pxz.core.needToken("ExportBundle2")
    pxz.core.needToken("Algo")
    pxz.core.needToken("Process")
    pxz.core.needToken("AllFormats")
    pxz.core.needToken("ScenarioProcessor")
    

    For more detailed information on licensing, please refer to the licensing documentation.

    GPU Requirement

    Some Pixyz algorithms require a GPU to run. More information.

    The GPU must be allocated to the container if you intend to use these algorithms.

    Run Your Data Preparation Scripts

    The Pixyz SDK is located at /opt/pixyz in the container. Its entrypoint is designed to automatically initialize Pixyz SDK and run the provided Python script path.

    Locally

    export LIC_FILE=/path/to/your/pixyz.lic
    export FILES_DIR=/path/to/your/cad_files
    export SCRIPTS_DIR=/path/to/your/dataprep_scripts
    
    docker run \
      -d --rm \
      --name=pixyz_sdk \
      --runtime=nvidia \
      --gpus all \
      -e NVIDIA_VISIBLE_DEVICES=all \
      -e NVIDIA_DRIVER_CAPABILITIES=all \
      -e DISPLAY=$DISPLAY \
      -v /usr/share/vulkan/icd.d/nvidia_icd.json:/usr/share/vulkan/icd.d/nvidia_icd.json \
      -v /tmp/.X11-unix:/tmp/.X11-unix \
      -v $LIC_FILE:/usr/share/PixyzSDK/licenses/pixyz.lic \
      -v $FILES_DIR:/files \
      -v $SCRIPTS_DIR:/scripts \
      pixyzinc/sdk:2024.2.0.52 /scripts/myconvertionscript.py /files/myfiletoconvert.obj
    

    To improve the performance of the container, you can use the --cpus ##NUMBER## and --memory ##VALUE## flags.

    Running in the Cloud

    The Docker container is compatible with all cloud providers.

    When running with Kubernetes with GPU:

    • The NVIDIA drivers must be provided on the node.
    • The NVIDIA daemonset must be deployed (e.g., on Azure).

    Unity Cloud Transformations and Asset Manager

    Subscribe now on unity.com.

    Version 2024.2.2.3
    • Legal
    • Privacy Policy
    • Cookies
    • Do Not Sell or Share My Personal Information
    • Your Privacy Choices (Cookie Settings)
    "Unity", Unity logos, and other Unity trademarks are trademarks or registered trademarks of Unity Technologies or its affiliates in the U.S. and elsewhere (more info here). Other names or brands are trademarks of their respective owners.
    Generated by DocFX.