Maxon Developers Maxon Developers
    • Documentation
      • Cinema 4D Python API
      • Cinema 4D C++ API
      • Cineware API
      • ZBrush Python API
      • ZBrush GoZ API
      • Code Examples on Github
    • Forum
    • Downloads
    • Support
      • Support Procedures
      • Registered Developer Program
      • Plugin IDs
      • Contact Us
    • Categories
      • Overview
      • News & Information
      • Cinema 4D SDK Support
      • Cineware SDK Support
      • ZBrush 4D SDK Support
      • Bugs
      • General Talk
    • Unread
    • Recent
    • Tags
    • Users
    • Login

    Motion Blur

    SDK Help
    0
    4
    799
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • H
      Helper
      last edited by

      On 11/01/2018 at 08:49, xxxxxxxx wrote:

      Hello,

      I looked at the NodeData::CopyTo() Manual and it says that CopyTo() is only needed if internal data is not stored in the element's BaseContainer. In that forum post you linked they mention class-level variables needing to be copied by implementing CopyTo(). I have no class-level variables, all of my data is stored inside the element's BaseContainer,.

      Johan H.

      1 Reply Last reply Reply Quote 0
      • H
        Helper
        last edited by

        On 12/01/2018 at 03:51, xxxxxxxx wrote:

        Hi Johan,

        Yes the issue isn't related to the implementation of NodeData::CopyTo().

        In the code you posted, the distance vector is always incremented for each call of Execute() so you're relying on the scene execution mechanism.
        Execute() may be called several times for the same frame, the current frame mayb not be the next of the previous executed one etc.

        It's better to use the current time given from the passed BaseDocument* doc (with BaseDocument.GetTime()).

        1 Reply Last reply Reply Quote 0
        • H
          Helper
          last edited by

          On 31/01/2018 at 09:42, xxxxxxxx wrote:

          Hello Yannick,

          I understand that I want to use BaseDocument.GetTime() to get the current time. My question still is that when I run a render with Sub-Frame Motion Blur the Basecontainer containing the vector is not updated each time Execute() is run. If Execute() is being called five times between frames than I would expect that the vector values would have increased five times. Instead the vector is only increased once.

          Thanks for the reply.

          Johan H.

          1 Reply Last reply Reply Quote 0
          • H
            Helper
            last edited by

            On 02/02/2018 at 11:08, xxxxxxxx wrote:

            Hi,

            As I already explained you shouldn't rely directly on the execution and render of a scene. This can be quite complex and the order of operations isn't guaranteed.

            If you're really interested on calculating a value based on sub-frame motion blur, then you should use the time value given by doc->GetTime().Get().

            1 Reply Last reply Reply Quote 0
            • First post
              Last post