Run the Solution

Now that we have the necessary applications built, we can explore how to stream the USD Viewer application into the web client.

Hardware-accelerated GPU Scheduling

On Windows computers there is a setting that controls how GPU resources are provided to applications. Follow the instructions to turn off Hardware accelerated GPU scheduling in Stream on a Workstation to ensure USD Viewer can utilize the GPU even when it is not in focus.

Run Headless

Kit applications can run headless. There is no difference in its capabilities in headless mode and the startup procedure of the streaming solution remains the same.

Windows

Run the application bat file with the -no-window argument. You can find the bat file in the project’s _build\[platform]\release directory.

my_company.my_usd_viewer.kit.bat -no-window

Linux

Run the application sh file with the -no-window argument. You can find the sh file in the project’s _build\[platform]\release directory.

my_company.my_usd_viewer.kit.sh -no-window

Reset User Settings

As you iterate on USD Viewer, you may change settings in the various “Settings” sections. Some settings persist in a user settings file and may override your new settings. To clear the user settings, you can run the application with a –reset-user argument.

Windows

You can find the bat file in the project’s _build\[platform]\release directory.

my_company.my_usd_viewer.kit.bat -reset-user

Linux

You can find the sh file in the project’s _build\[platform]\release directory.

my_company.my_usd_viewer.kit.sh -reset-user

Peer-to-Peer Streaming

For peer-to-peer streaming of the samples in this example, you can use either a single workstation or stream from one workstation to another.

Single Workstation

The samples in this example are configured to run on a single workstation. To run the solution:

  1. Start USD Viewer by using the repo launch command in the project root.

  2. Wait for the USD Viewer viewport to display in black.

  3. Start the web client by using the npm run dev command in the project root.

  4. Copy the URL that displays in the command prompt window and paste it in your Chrome or Edge browser.

Note

This example provides a peer-to-peer streaming solution. One USD Viewer can be streamed to one client. If you open many browser tabs, then only one can use the streamed application at any given time.

One Workstation to Another

Streaming from one PC to another is easily accomplished by editing the server address in the web client’s stream.config.json file. In the example below, the default 127.0.0.1 IP address has been replaced with 192.168.50.88, which is the IP address of the computer running the Kit application:

This snippet is written in JSON
{
"$comment": "source can be either 'gfn' or 'local'",
"source": "local",
"gfn": {
   "$comment": "Required props if source is set to 'gfn'.",
   "catalogClientId": "",
   "clientId": "",
   "cmsId":
},
"local": {
   "$comment": "Required props if source is set to 'local'.",
   "server": "192.168.50.88"
}
}

You will also need to ensure that the two devices can access each other over the network. If you cannot get the stream to work, and it worked when you ran both clients on the same computer, then the problem is most likely due to a network access problem. Please contact your IT administrator to resolve this issue.

Other than the IP address configuration, the startup procedure and functionality is the same as is described in Single Workstation.