# Frame Recorder background color?

**URL:** <https://forum.aousd.org/t/frame-recorder-background-color/2374>\
**Category:** USD\
**Created:** [April 14, 2025, 5:01pm UTC](https://forum.aousd.org/t/frame-recorder-background-color/2374 "2025-04-14T17:01:21Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![berengard](https://sea2.discourse-cdn.com/flex016/user_avatar/forum.aousd.org/berengard/32/882_2.png) [@berengard](https://forum.aousd.org/u/berengard)\
**Post date:** [April 14, 2025, 5:01pm UTC](https://forum.aousd.org/t/frame-recorder-background-color/2374/1 "2025-04-14T17:01:22Z")

</div>

Hello everyone!

I’m having an issue I wasn’t able to find an answer under any USD docs.  
I have a Frame Recorder code that uses the default Hdstorm plugin with OpenGL context to render png images of a stage, but the images are RGBA and if there’s only a few prims, the background is black with alpha=0.0.

I looked into render settings, render products but couldn’t find how do I set it so it renders a different color background with no alpha (RGB)?  
Does anyone know the general answer to this?

```auto
glWidget = self.createOpenGLContext()

rendererPluginId = UsdAppUtils.rendererArgs.GetPluginIdFromArgument('') or ''
frameRecorder = UsdAppUtils.FrameRecorder(rendererPluginId, True)

frameRecorder.SetImageWidth(imgWidth)
frameRecorder.SetComplexity(1.0)
frameRecorder.SetCameraLightEnabled(True)
frameRecorder.SetColorCorrectionMode("sRGB")
frameRecorder.SetIncludedPurposes([])
frameRecorder.SetDomeLightVisibility(True)

isRecorded = frameRecorder.Record(stage, camera, frame, fullPath)

```

Thanks for your help!  
-Sergey.

---

<div class="post-metadata">

**Author:** ![spiff](https://sea2.discourse-cdn.com/flex016/user_avatar/forum.aousd.org/spiff/32/22_2.png) [@spiff](https://forum.aousd.org/u/spiff)\
**Post date:** [April 15, 2025, 11:09pm UTC](https://forum.aousd.org/t/frame-recorder-background-color/2374/2 "2025-04-15T23:09:42Z")

</div>

Hi @berengard , there’s currently no way to do this in a renderer-agnostic fashion without some code changes.

The good news is that UsdImagingGLEngine (used by frameRecorder) _does_ provide configuration for renderer-agnostic “clear color” that works with at least Storm and HdPrman; this is the mechanism usdview uses to allow you to select from a palette of background colors.

But there needs to be an enhancement to frameRecorder itself to allow you to specify an RGBA on the command line and funnel it through to the engine. We’re not sure when we could get to that, but if someone wants to submit a PR, we can provide some pointers, if needed.

Thanks!  
–spiff

---

<div class="post-metadata">

**Author:** ![berengard](https://sea2.discourse-cdn.com/flex016/user_avatar/forum.aousd.org/berengard/32/882_2.png) [@berengard](https://forum.aousd.org/u/berengard)\
**Post date:** [April 17, 2025, 12:05am UTC](https://forum.aousd.org/t/frame-recorder-background-color/2374/4 "2025-04-17T00:05:18Z")

</div>

Hi Sebastian,

Thank you for the thorough explanation.

I decided that I might come back to this in the future, but for now I’m just gonna create a plane with a certain color material and place it under the camera prim at its far clipping plane point.  
Not really a solution, but good enough for now. 🙂

Thanks again!  
-Sergey
