Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBrecht Van Lommel <brechtvanlommel@pandora.be>2012-11-08 20:35:28 +0400
committerBrecht Van Lommel <brechtvanlommel@pandora.be>2012-11-08 20:35:28 +0400
commit863291bc8e44eaed79946706b417944cdf9dfa4f (patch)
tree68f6b1b859f41871de053c953ebd7d6fdfdb43fd /source/blender/makesdna/DNA_object_types.h
parente73408f2474f7e6d9f1ff880f7f07c678f28e0ce (diff)
Fix #33113: cycles not rendering motion blur correct with dying particles.
There were a bunch of other issues with dupli motion blur and syncing, the problem being that there was no proper way to detect corresponding duplis between frames or updates. As a solution, a persistent_id was added to the DupliObject. It's an extension of the previous index value, with one index for each dupli level. This can be used to reliably find matching dupli objects between frames. Works with nested duplis, multiple particle systems, etc.
Diffstat (limited to 'source/blender/makesdna/DNA_object_types.h')
-rw-r--r--source/blender/makesdna/DNA_object_types.h17
1 files changed, 7 insertions, 10 deletions
diff --git a/source/blender/makesdna/DNA_object_types.h b/source/blender/makesdna/DNA_object_types.h
index 29f6499986c..89328c33674 100644
--- a/source/blender/makesdna/DNA_object_types.h
+++ b/source/blender/makesdna/DNA_object_types.h
@@ -297,22 +297,19 @@ typedef struct ObHook {
typedef struct DupliObject {
struct DupliObject *next, *prev;
struct Object *ob;
- unsigned int origlay;
- int index;
+ unsigned int origlay, pad;
float mat[4][4], omat[4][4];
float orco[3], uv[2];
short type; /* from Object.transflag */
char no_draw, animated;
- /* Lowest-level particle index.
- * Note: This is needed for particle info in shaders.
- * Otherwise dupli groups in particle systems would override the
- * index value from higher dupli levels. Would be nice to have full generic access
- * to all dupli levels somehow, but for now this should cover most use-cases.
- */
- int particle_index;
- int pad;
+ /* persistent identifier for a dupli object, for inter-frame matching of
+ * objects with motion blur, or inter-update matching for syncing */
+ int persistent_id[8]; /* MAX_DUPLI_RECUR */
+
+ /* particle this dupli was generated from */
+ struct ParticleSystem *particle_system;
} DupliObject;
/* **************** OBJECT ********************* */