Motion Blur

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


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.

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()).

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.

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


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().