Dependancy missing while building depsgraph for particle systems.
fix: adding a relation texture->particles when texture has animation data.
Note: I don't have commit access, please proceed with the commit. Thanks
Differential D7573
Fix T76251: Animated procedural texture does not influence particle system Authored by Luc Revardel (lrevardel) on Apr 30 2020, 11:00 AM.
Details Dependancy missing while building depsgraph for particle systems. Note: I don't have commit access, please proceed with the commit. Thanks
Diff Detail
Event TimelineComment Actions This seems a bit weird. Mind set should be: the particle system depends on the texture. So relations builder shouldn't go deeper into texture to build relations for particles. There seems already be relations from texture's ANIMATION to texture's GENERIC_DATABLOCK. This yields the following relations chain: Texture ANIMATION -> Texture GENERIC_DATABLOCK -> particle_settings_reset_key. If i'm reading this patch correct, then what it does is that if texture is animated then there will be an explicit relation Texture GENERIC_DATABLOCK -> particle_settings_eval_key. Which seems to be redundant since there is already a relation from particle_settings_reset_key to particle_settings_eval_key.
Comment Actions
By this I assume you mean the builder should not inspect the texture at all, i.e should not call "check_id_has_anim_component(&mtex->tex->id)" Note that removing the flag RELATION_FLAG_FLUSH_USER_EDIT_ONLY from: add_relation(texture_key,
particle_settings_reset_key,
"Particle Texture",
RELATION_FLAG_FLUSH_USER_EDIT_ONLY);fixes the problem but has slow performances. I'll check your comment in details, thanks for the time spent to explain. Comment Actions
fixing Sergey's comment regarding unused variable. Here's my understanding of the issue: This chain should trigger in the case of T76251 issue, however it does not due to RELATION_FLAG_FLUSH_USER_EDIT_ONLY flag used to setup Texture_GENERIC_DATABLOCK -> particle_settings_reset_key. So we have 2 options: fps comparison using file & PC setup from T76251: Comment Actions Ah, yes, the reset is only to happen on user edits, while eval should happen on regular texture update as well. Intuitively this should work, but particles code is hard to predict. Does this P1358 fix the issue?
Particle builder should not check this. Texture builder is allowed to check the texture its building :) Comment Actions Yes, P1358 works pefectly, same fps as what I posted. I thought we cannot add some kind of "parralel" path between texture and particle settings. Still a lot to understand there ! I hope the depsGraph documentation that you're currently working on (as I understand based on devs weekly report) will put some light upon all this ;-) BTW, let me know your preferred approach to commit this, since I don't have commit access, you might want to commit the change directly. Comment Actions Seems safe enough. If it was a dependency between e.g. an object and a particle system it would be more tricky, but between a texture and a particle system is relatively safe I guess. | ||||||||||