Cycles: object motion blur enabled, so in addition to camera motion, moving

objects in the scene will also cause motion blur.

This change does come with a bit of a slow down to the CPU rendering kernel even
with motion blur disabled, due to extra overhead in handling of object matrices.
It's a few percentages on simpler scenes, not so noticeable on more complex ones.
With motion blur enabled rendering is of course also slower as would be expected,
though from testing especially GPU rendering handles it quite well.

This does not support motion blur from deforming objects yet, only translation,
scale and rotation. Deformation blur is probably for another release.
This commit is contained in:
Brecht Van Lommel 2012-10-16 10:48:19 +00:00
parent 0ee9f123b2
commit 7521ce083d
3 changed files with 3 additions and 3 deletions

@ -131,7 +131,7 @@ class CyclesRender_PT_light_paths(CyclesButtonsPanel, Panel):
class CyclesRender_PT_motion_blur(CyclesButtonsPanel, Panel):
bl_label = "Camera Motion Blur"
bl_label = "Motion Blur"
bl_options = {'DEFAULT_CLOSED'}
def draw_header(self, context):

@ -73,7 +73,7 @@ __device_inline void shader_setup_from_ray(KernelGlobals *kg, ShaderData *sd,
/* matrices and time */
#ifdef __OBJECT_MOTION__
if(sd->flag & SD_OBJECT_MOTION) {
sd->ob_tfm = object_fetch_transform_motion(kg, sd->object, time, &sd->ob_itfm);
sd->ob_tfm = object_fetch_transform_motion(kg, sd->object, ray->time, &sd->ob_itfm);
}
else {
sd->ob_tfm = object_fetch_transform(kg, sd->object, OBJECT_TRANSFORM);

@ -109,7 +109,7 @@ CCL_NAMESPACE_BEGIN
#define __BACKGROUND_MIS__
#define __AO__
#define __CAMERA_MOTION__
//#define __OBJECT_MOTION__
#define __OBJECT_MOTION__
#endif
//#define __SOBOL_FULL_SCREEN__