Best on-demand rendering approach (for OpenUSD) on Google Cloud?

I am generating USD (now OpenUSD) scenes in Google Cloud and was looking to render them on-demand. (UE can open USD files, so I assume I would have to write a simple script to automate the loading and rendering.) Ideally I would use something like Google Cloud Run - pay for resources on demand. The Unreal Engine build in the marketplace did not seem to support that. An alternative is I write code to unpause a server instance, perform a render, then pause it again.

Is there a better approach?

There are a number of approaches you could take for this, and maybe some existing render farm solutions that I’m not familiar with. You’d likely want to unpause a server or develop a solution with containers.

One thing to be aware of with your experiments is that every installation of Unreal Engine also comes with UnrealEditor-Cmd.exe, which is the headless version of the engine. You can create a python script to load a level, import a USD file, and render. Assuming you have such a script, here’s a Powershell script to launch the editor and run that.


RunEditor.ps1

#Setup variables

$engine = "C:\Program Files\Epic Games\UE_5.X\Engine\Binaries\Win64\UnrealEditor-Cmd.exe"

$project = "C:\MyFolder\MyProject.uproject"

$script = "C:\MyFolder\MyScript.py"

#Start headless editor with specified script. Backtick ` used to preserve quotes in argument list.

Start-Process $engine -ArgumentList "`"$project`" -run=pythonscript -script=`"$script`""
1 Like

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.