vps->doc is changed on every Execute [SOLVED]



  • On 23/12/2016 at 07:12, xxxxxxxx wrote:

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

    ---------
    Hello.

    When I try to render a scene in IRR (with my render engine), I use the document inside VideoPostStruct variable of Execute call. 
    The problem is that the pointer of that document is changed in every Execute call. 
    That means I cannot detect the object changes from one document to another since the object pointers change as well.

    On the other hand, rendering in Picture Viewer N frames (IRR is disabled), I get the same pointer for 
    vps->doc and it's easy for me to detect object changes from one document to another.

    Is there anything I can do to be able to detect document changes in IRR between Execute calls, so I can pass the updated data in my render engine ?

    Thank you very much for your time.



  • On 27/12/2016 at 08:51, xxxxxxxx wrote:

    Hi Peterakos, thanks for writing us.

    With reference to your question, the IRR uses a temporary copy of the currently active scene which, and as you reported it's unlikely to remain the same across multiple calls of the VideoPostData::Execute() method.
    That said there's no single way to detect changes occurring between Execute calls and relying on the IRR automatism might result more complex than implementing a custom scene change queue and feed the renderer only with those changes occurred. In this case since you're not provided with a VolumeData representation you must access the caches of generators and deformers manually.

    Best, Riccardo


Log in to reply