GetDirty flags for Voronoi



  • On 08/12/2017 at 02:59, xxxxxxxx wrote:

    User Information:
    Cinema 4D Version:   R18 
    Platform:   Windows  ;   
    Language(s) :     C++  ;

    ---------
    Hello.

    I have an issue with Voronoi Fracture's cached objects.
    I have a scene with a rolling ball that once hits the ground, it will break into pieces.
    The problem is that as I render the animation in Picture viewer using my render engine, once the sphere starts breaking, I get no updated dirty flags.

    Here are the flags I check:

    voronoi_object->GetDirty(DIRTYFLAGS_MATRIX);
    voronoi_object->GetDirty(DIRTYFLAGS_CACHE);
    voronoi_object->GetDirty(DIRTYFLAGS_DATA);
      
    I would expect to get a new DIRTYFLAGS_CACHE for every frame since the cached objects inside the voronoi are scattered.
      
    How can I get the information that the voronoi's cahced objects have been modified ? (even their matrix)
      
    Thank you very much for your time.
    


  • On 13/12/2017 at 09:51, xxxxxxxx wrote:

    Hi,

    in the end the cache of the Voronoi generator itself is not dirty in such a situation. It's rather the dynamics tag affecting the generated objects afterwards.
    Unfortunately I had no real time to test this.
    So here are just a few ideas:
    Maybe you should consider something under control of a dynamics tag to always be dirty. From an optimization point of view, surely not what you want...
    Another way could be to iterate the cache and check the dirtiness  of the generated objects.
    I'm currently not sure, actually I have doubts, but maybe GetHDirty() could be put to some use.

    Sorry, to leave you with such an unspecific answer.


Log in to reply