Hydra Multiple Viewports

I am using UsdImagingGLEngine to render a USD stage.

What is the best practice in Hydra to render multiple viewports?
Each viewport can have a different camera, different resolution, but every viewport must be rendering to the same USD stage.

Do I need to use multiple engine instances for this? Or there is a better approach.

Thanks,
Miquel

I think the answer probably depends on what render delegate you’re using. If you are using Storm (or something similar where the render is very fast and the cost of changing the view is very small) then you can probably use the same UsdImagingGLEngine object for all viewports.

But if the render delegate does progressive updates over a longer period of time, you probably want a separate UsdImagingGLEngine per viewport so all viewports can render at the same time.

Or, as Houdini does, you may choose to only allow one non-OpenGL-style viewport with a long running progressive render, and all other viewports share a second UsdImagingGLEngine using an OpenGL-style delegate.

1 Like