Skip to content

Perforce Version Control

Perforce Helix Core manages Blender assets, materials and 3D models used in the animation.

I tried to manage assets via Git LFS before but it was too complicated and not ideal. Learning about Perforce and having the possibility to use it for free was a great discovery.

  • Server: Helix Core with SSL encryption on port 1666
  • Depot Structure: Organized marble_music project hierarchy, having only dev and prod branches.
  • Client Workspaces: P4V visual client, installed on the Windows machine for asset management. This is where I can easily visualize file changes, branches, and history.
  • Integration: Automated sync with rendering pipeline, via Airflow tasks.

Workflow Integration

All assets are stored and shared via SMB server mounted on the Proxmox host, which is also accessible by the Kubernetes cluster nodes via Persistent Volumes using the SMB/CIFS drivers. It can also be mounted by any other VMs that need access to the 3D assets: very flexible, but still not good for concurrency

Development Workflow

  1. Sync: Pull latest assets from depot
  2. Edit: Modify 3D models and scenes
  3. Submit: Push changes with descriptions
  4. Review: Peer review of asset changes

Branching Strategy

  • Main Branch: Production-ready assets
  • Development: Work-in-progress features

Integration with Pipeline

The first step on Airflow DAG is to sync the latest assets from Perforce before rendering begins.

There is container created specifically to run this task, fetched from Gitlab container registry.

def sync_perforce_assets():
    """Sync latest assets from Perforce before rendering"""
    p4_client = P4Client()
    p4_client.sync('//depot/marble_music/...')
    return "Assets synced successfully"

This is the Perforce P4V client running on Windows, showing the marble_music depot with its organized folder structure.

Perforce P4V client with marble music depot

These are branches and versioning of assets within the Perforce depot, demonstrating how different versions of 3D models and textures are managed effectively.

Asset versioning and branch management

Security & Access Control

User Permissions

I created separate users with specific permissions to control access to the Perforce server. Like one being the artist user, which only has write access to the marble_music dev depot. The other being able to checkout from prod during the pipeline process.

Improvements planned

  • Implement finer-grained access controls for different asset types.
  • Set up automated backups of the Perforce server for disaster recovery, following what is already done for other VMs in the homelab.
  • Add local DNS names for easier access to the Perforce server within the home lab network.
  • Add monitoring and uptime alerts following the same approach used for other services in the homelab.