Cycles: Implement rolling shutter effect
This is an attempt to emulate real CMOS cameras which reads sensor by scanlines and hence different scanlines are sampled at a different moment in time, which causes so called rolling shutter effect. This effect will, for example, make vertical straight lines being curved when doing horizontal camera pan. This is controlled by the Shutter Type option in the Motion Blur panel. Additionally, since scanline sampling is not instantaneous it's possible to have motion blur on top of rolling shutter. This is controlled by the Rolling Shutter Time slider which controls balance between pure rolling shutter effect and pure motion blur effect. Reviewers: brecht, juicyfruit, dingto, keir Differential Revision: https://developer.blender.org/D1624
This commit is contained in:
@@ -47,12 +47,28 @@ public:
|
||||
MOTION_POSITION_END,
|
||||
};
|
||||
|
||||
/* Specifies rolling shutter effect. */
|
||||
enum RollingShutterType {
|
||||
/* No rolling shutter effect. */
|
||||
ROLLING_SHUTTER_NONE = 0,
|
||||
/* Sensor is being scanned vertically from top to bottom. */
|
||||
ROLLING_SHUTTER_TOP,
|
||||
};
|
||||
|
||||
/* motion blur */
|
||||
float shuttertime;
|
||||
MotionPosition motion_position;
|
||||
float shutter_curve[RAMP_TABLE_SIZE];
|
||||
size_t shutter_table_offset;
|
||||
|
||||
/* ** Rolling shutter effect. ** */
|
||||
/* Defines rolling shutter effect type. */
|
||||
RollingShutterType rolling_shutter_type;
|
||||
/* Specifies exposure time of scanlines when using
|
||||
* rolling shutter effect.
|
||||
*/
|
||||
float rolling_shutter_duration;
|
||||
|
||||
/* depth of field */
|
||||
float focaldistance;
|
||||
float aperturesize;
|
||||
|
Reference in New Issue
Block a user