Set up P4 Render

You must integrate P4 Search with P4 Render. P4 Render is a service that processes 3D assets from P4 Search's render queue and creates a preview of the image.

The P4 Render service is in Technology Preview. Features offered in Technology Preview are experimental and not guaranteed to always work as expected. If you have feedback and functionality suggestions, email techpreview@perforce.com.

Overview

P4 Render is a service that processes 3D assets from P4 Search's render queue and creates a preview of the image. The previews are stored in the P4 Server as an attribute on the asset's versioned revision file. The previews can then be used by P4 Search for Artificial Intelligence (AI) tagging and for generating thumbnail or blur images.

The P4 Render service uses background processes, called workers, to poll the render queue in P4 Search. You can have multiple workers to help manage the render queue load. P4 Render can be installed on multiple hosts.

System diagram

The following diagram shows how P4 Render integrates with P4 Search and P4 Server.

Helix Render service

When an asset is submitted and is suitable for rendering, P4 Search adds it to the render queue. Workers poll the P4 Search render queue looking for a new asset to process. When a worker finds a new asset to process, the worker fetches the asset and associated texture files from P4 Server by using the p4 print command. The worker then renders the 3D asset files to produce a preview file in JPEG format (and, optionally, in GLB format). These generated files are then added back to P4 Server as binary attributes using p4 attributes on the 3D asset's revision (with the attribute names 'preview' and 'model').

The update to the asset revision's attributes triggers a further re-index of the asset now using the rendered preview for thumbnail, blur, and AI detection.

 

Requirements

If you are upgrading to P4 Search 2025.1, you must also upgrade to P4 Render 2025.1.

The P4 Render requirements for P4 Search are:

  • Each instance of P4 Render needs at least 4GB of memory and a single CPU.

  • The host system must support Docker, and the user deploying the Docker container must have permissions to access Docker. For more information about Docker, see:

  • (Optional) A 3D graphics card to improve render performance.

  • P4 Render requires the P4 Search Index user to use an all-hosts ticket.

  • P4 Render requires P4 Server 2024.1 or later.

    Ensure that the trait.storagedepot.min configurable in the P4 Server is set to a value of 1024:

    p4 configure set trait.storagedepot.min=1024

    For more information about trait.storagedepot.min configurable, see Configurables reference in the P4 Server Administration Documentation.

  • Skeleton (rigging) support in P4 DAM requires P4 Render 2025.1.

Install P4 Render

P4 Render is provided as a P4 Render Docker image.

Deploy as a local render service

To launch P4 Render with Docker, run the following Docker commands on your local host:

  1. Fetch the P4 Render Docker container:

    docker pull perforce/helix-render

  2. Run the P4 Render service, providing the X-Auth-Token and the IP address of P4 Search:

    docker run --restart always -d perforce/helix-render python3 /opt/perforce/helix-render/src/preview_generator.py -m worker -S http://<p4-search-url>:1601 -x <X-Auth-Token>

You can run multiple instances with one command. For example, run 10 instances:

for i in {1..10}; do docker run --restart always -d --name "${i}_render" artifactory.bnr.perforce.com/helix-p4search-dev/helix-render python3 /opt/perforce/helix-render/src/preview_generator.py -m worker -S http://<p4-search-url>:1601 -x <X-Auth-Token>; done

The following flags are available for preview_generator.py:

preview_generator.py (-m|-S|-x|-i)
	Optional:
		-m / --mode		The mode to run the preview generator(worker, lamda)
		-S / --p4searchURL	URL of the queue
		-x / --xAuth		Token for connecting to p4search
		-i / --ignoreSSL	Skip certificate check on p4search

Next step

Configure the P4 Render service for P4 Search. See Rendering configuration.

For more information about the render queue API endpoints, see Access the Swagger REST API .