Cycles: Support user-defined shutter curve

Previously shutter was instantly opening, staying opened for the shutter time
period of time and then instantly closing. This isn't quite how real cameras
are working, where shutter is opening with some curve. Now it is possible to
define user curve for how much shutter is opened across the sampling period
of time.

This could be used for example to make motion blur trails softer.
This commit is contained in:
Sergey Sharybin
2015-10-27 13:16:04 +05:00
parent c07c066685
commit 6a529e14f4
6 changed files with 65 additions and 10 deletions

View File

@@ -50,6 +50,8 @@ public:
/* motion blur */
float shuttertime;
MotionPosition motion_position;
float shutter_curve[RAMP_TABLE_SIZE];
size_t shutter_table_offset;
/* depth of field */
float focaldistance;
@@ -132,7 +134,7 @@ public:
void device_update(Device *device, DeviceScene *dscene, Scene *scene);
void device_update_volume(Device *device, DeviceScene *dscene, Scene *scene);
void device_free(Device *device, DeviceScene *dscene);
void device_free(Device *device, DeviceScene *dscene, Scene *scene);
bool modified(const Camera& cam);
bool motion_modified(const Camera& cam);