I created a custom preview/thumbnail renderer for the editor a while ago, which means I create a Preview Scene for the rendering. And I noticed that HDRP seems to do some sort of initialization affter the loop where a scene is rendered for the first time finishes. This means I have to force an initial ‘empty’ render, and then wait until the next frame, to then do the renders for them to be correct. It also does things like reset the intensity of the light to 10,000 when it initializes, causing the lighting to blow out in the render.
So I guess what I am really wondering is, what exactly is it doing, and is there a way I can force trigger it?
Some effects require one frame to work like dynamic exposure or SSR. If you don’t need those for the preview, I’d suggest to disable them.
For the exposure, you can use add a volume component in your preview scene and override it to fixed (that will work if you have fixed light intensity in your preview).
Hey thanks for the reply, and the additional info. But what I am refering to is the data setup in the scene, like how it automatically adds the HDAdditionalXData components, and adjusts their default settings. That is what is causing me issues currently.
I may be wrong but I think we don’t add AdditionalCameraData ourselves if the camera doesn’t have one, except if it’s a probe camera. Instead, we use the default one here:
There is also the InitDefaultHDAdditionalCameraData function that inits some stuff but it’s not much, most of the default values are hardcoded in the component.
When you open the camera inspector though we also create HDAdditionalCamera data, so even if it wasn’t there before, it is when you click on it: