optix denoiser input buffer questions

The docs say that the main input buffer should be in gamma 2.2 space, but I’m wondering about the specifics for the albedo and normal buffers…

  1. Should the albedo buffer be supplied in linear space or be gamma corrected also.
  2. Should the normal buffer contain the expanded normals, i.e. in a [-1, 1] range (as opposed to being scaled and biased into a [0, 1] range)?

Thanks for any info.

Mark

The albedo buffer is in linear space.
The normals are simply the world space normals. Miss events have a null-vector as normal.
(EDIT: No, correct is camera space normals. See below.)

Look for this GTC 2018 presentation https://2018gputechconf.smarteventscloud.com/connect/sessionDetail.ww?SESSION_ID=152926 once it becomes available on http://on-demand-gtc.gputechconf.com/gtcnew/on-demand-gtc.php for changes in the upcoming OptiX version.

Thanks for the answer and links.

I found this in the docs for what the normal buffer should contain:

This buffer is expected to contain the surface normals of the primary hit in camera space. The camera space is assumed to be right handed such that the camera is looking down the negative z axis, and the up direction is along the y axis. The x axis points to the right.

This is a little more specific than simply supplying world space normals. My question is, does it matter? Should we expect better results by supplying normals in the coordinate system specified above.

I stand corrected. That also makes more sense.

This means that the world space normal needs to be transformed by the inverse camera orientation.
For the usual pinhole camera that would be a projection of the world space normal onto a basis built from the unnormalized U, V and -W vectors.
(Negative W because the OptiX pinhole camera is defined as left-handed system.)
The result should look like a normal map without scale and bias then.

That said, the OptiX DL Denoiser currently gains little from providing the normal buffer!
It’s much more effective to provide the noisy beauty buffer and the albedo buffer.
That’s also the reason why I didn’t notice my error. I wasn’t expecting dramatic changes.

Adding another link.
These are the two GTC 2018 presentations which explain current and new OptiX features including changes in the denoiser.
https://2018gputechconf.smarteventscloud.com/connect/sessionDetail.ww?SESSION_ID=152416
https://2018gputechconf.smarteventscloud.com/connect/sessionDetail.ww?SESSION_ID=152926
The presentations are available for GTC attendees when logged in to that site already and become available publicly later on the on-demand-gtc link given in the thread above.