GPUOpen-LibrariesAndSDKs / RadeonProRenderSDK

AMD Radeon™ ProRender is a powerful physically-based path traced rendering engine that enables creative professionals to produce stunningly photorealistic images.
https://gpuopen.com/radeon-prorender-suite/
Other
220 stars 46 forks source link

Camera differences in full spectrum rendering #18

Closed jrz371 closed 3 years ago

jrz371 commented 3 years ago

Hi,

I've noticed the camera behaves differently in full spectrum rendering versus the ultra rendering modes. The camera setup follows the same code paths on my end but I get vastly different rendering results. The image seems horizontally stretched. Is this a known issue or do I need to setup the cameras differently between the two modes?

Hybrid Ultra

bsavery commented 3 years ago

off the top of my head I know we don't support the camera shift for hybrid. Do you have a simple code snippet for what you're doing in the camera export?

jrz371 commented 3 years ago

Sure! Here's our camera setup.

Rpr.Check(Rpr.CameraSetFocalLength(camera, (float)viewInfo.Viewport.Camera35mmLensLength));

Rpr.Check(Rpr.CameraLookAt(camera, (float)position.X, (float)position.Y, (float)position.Z,
                                     (float)target.X, (float)target.Y, (float)target.Z,
                                     (float)up.X, (float)up.Y, (float)up.Z));

Rpr.Check(Rpr.CameraSetNearPlane(camera, (float)near));

Rpr.Check(Rpr.CameraSetFarPlane(camera, (float)far));
RichardGe commented 3 years ago

Hi @jrz371 , are you using rprCameraSetSensorSize ? I advise you to update it each time the framebuffer size changes, it helps both plugins to keep the same aspect ratio.

jrz371 commented 3 years ago

Thanks!

Setting that seems to have resolved it. It is a bit odd though. The frame buffers are the same size each time. It seems like the hybrid render either has different defaults, or calculate it differently when not explicitly set.

bsavery commented 3 years ago

Maybe the default should be set the same for hybrid and Northstar/Tahoe @RichardGe