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/render
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/render')
-rw-r--r--source/blender/render/intern/source/convertblender.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/source/blender/render/intern/source/convertblender.c b/source/blender/render/intern/source/convertblender.c
index eb0a13b3942..759b0737c01 100644
--- a/source/blender/render/intern/source/convertblender.c
+++ b/source/blender/render/intern/source/convertblender.c
@@ -4501,7 +4501,7 @@ static void add_render_object(Render *re, Object *ob, Object *par, DupliObject *
ParticleSystem *psys;
int show_emitter, allow_render= 1, index, psysindex, i;
- index= (dob)? dob->index: 0;
+ index= (dob)? dob->persistent_id[0]: 0;
/* the emitter has to be processed first (render levels of modifiers) */
/* so here we only check if the emitter should be rendered */
@@ -4900,7 +4900,7 @@ static void database_init_objects(Render *re, unsigned int renderlay, int nolamp
if (dob->type != OB_DUPLIGROUP || (obr=find_dupligroup_dupli(re, obd, 0))) {
mult_m4_m4m4(mat, re->viewmat, dob->mat);
/* ob = particle system, use that layer */
- obi= RE_addRenderInstance(re, NULL, obd, ob, dob->index, 0, mat, ob->lay);
+ obi= RE_addRenderInstance(re, NULL, obd, ob, dob->persistent_id[0], 0, mat, ob->lay);
/* fill in instance variables for texturing */
set_dupli_tex_mat(re, obi, dob);
@@ -4927,7 +4927,7 @@ static void database_init_objects(Render *re, unsigned int renderlay, int nolamp
if (dob->type != OB_DUPLIGROUP || (obr=find_dupligroup_dupli(re, obd, psysindex))) {
if (obi == NULL)
mult_m4_m4m4(mat, re->viewmat, dob->mat);
- obi= RE_addRenderInstance(re, NULL, obd, ob, dob->index, psysindex++, mat, obd->lay);
+ obi= RE_addRenderInstance(re, NULL, obd, ob, dob->persistent_id[0], psysindex++, mat, obd->lay);
set_dupli_tex_mat(re, obi, dob);
if (dob->type != OB_DUPLIGROUP) {