GafferCycles icon indicating copy to clipboard operation
GafferCycles copied to clipboard

aperturesize, resolution, viewplane, shuttertime fixes

Open murraystevenson opened this issue 6 years ago • 0 comments

Hey Alex,

I took a closer look at the CameraAlgo behaviour and have come up with the following changes:

  • ccam->aperturesize changed to radius rather than width. This matches the Blender camera conversion logic and visually matches GafferArnold.
  • ccam->resolution changed to use camera->renderResolution() as this returns the resolution as modified by Gaffer's resolutionMultiplier plug.
  • ccam->viewplane.top and .bottom now inverted so camera aperture offsets in Y apply in the correct direction, we also need this flipped for eventual overscan support.
  • ccam->motion_position logic updated to work based on relative shutter times, as camera->getShutter() returns absolute shutter values. With this, camera blur works as expected. Cycles seems fine with receiving either a positive or negative shuttertime so I simplified the logic a bit.

The behaviour of these changes has been visually compared with GafferArnold and the results look good to me.

M

murraystevenson avatar Nov 18 '19 04:11 murraystevenson