diff options
author | Brecht Van Lommel <brechtvanlommel@gmail.com> | 2014-03-29 16:03:46 +0400 |
---|---|---|
committer | Brecht Van Lommel <brechtvanlommel@gmail.com> | 2014-03-29 16:03:46 +0400 |
commit | 99f59930885ed69890967f8864a3aa0626249d86 (patch) | |
tree | b6f8dcc40c294077d585639e701f7fdf9b6c0dcb /intern/cycles/blender/blender_sync.h | |
parent | 934767cf7f51ae82224138de2ffcafe7bae2b8fa (diff) |
Cycles code refactor: improve vertex motion attribute storage and export.
This now supports multiple steps and subframe sampling of motion.
There is one difference for object and camera transform motion blur. It still
only supports two steps there, but the transforms are now sampled at subframe
times instead of the previous and next frame and then interpolated/extrapolated.
This will give different render results in some cases but it's more accurate.
Part of the code is from the summer of code project by Gavin Howard, but it has
been significantly rewritten and extended.
Diffstat (limited to 'intern/cycles/blender/blender_sync.h')
-rw-r--r-- | intern/cycles/blender/blender_sync.h | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/intern/cycles/blender/blender_sync.h b/intern/cycles/blender/blender_sync.h index 205761ad302..9c4175ef690 100644 --- a/intern/cycles/blender/blender_sync.h +++ b/intern/cycles/blender/blender_sync.h @@ -71,7 +71,7 @@ private: /* sync */ void sync_lamps(bool update_all); void sync_materials(bool update_all); - void sync_objects(BL::SpaceView3D b_v3d, int motion = 0); + void sync_objects(BL::SpaceView3D b_v3d, float motion_time = 0.0f); void sync_motion(BL::SpaceView3D b_v3d, BL::Object b_override, void **python_thread_state); void sync_film(); void sync_view(); @@ -81,12 +81,13 @@ private: void sync_nodes(Shader *shader, BL::ShaderNodeTree b_ntree); Mesh *sync_mesh(BL::Object b_ob, bool object_updated, bool hide_tris); - void sync_curves(Mesh *mesh, BL::Mesh b_mesh, BL::Object b_ob, int motion); - Object *sync_object(BL::Object b_parent, int persistent_id[OBJECT_PERSISTENT_ID_SIZE], BL::DupliObject b_dupli_object, Transform& tfm, uint layer_flag, int motion, bool hide_tris); + void sync_curves(Mesh *mesh, BL::Mesh b_mesh, BL::Object b_ob, bool motion, int time_index = 0); + Object *sync_object(BL::Object b_parent, int persistent_id[OBJECT_PERSISTENT_ID_SIZE], BL::DupliObject b_dupli_ob, + Transform& tfm, uint layer_flag, float motion_time, bool hide_tris); void sync_light(BL::Object b_parent, int persistent_id[OBJECT_PERSISTENT_ID_SIZE], BL::Object b_ob, Transform& tfm); void sync_background_light(); - void sync_mesh_motion(BL::Object b_ob, Mesh *mesh, int motion); - void sync_camera_motion(BL::Object b_ob, int motion); + void sync_mesh_motion(BL::Object b_ob, Object *object, float motion_time); + void sync_camera_motion(BL::Object b_ob, float motion_time); /* particles */ bool sync_dupli_particle(BL::Object b_ob, BL::DupliObject b_dup, Object *object); @@ -109,6 +110,7 @@ private: id_map<ParticleSystemKey, ParticleSystem> particle_system_map; set<Mesh*> mesh_synced; set<Mesh*> mesh_motion_synced; + std::set<float> motion_times; void *world_map; bool world_recalc; |