BaseTime / CKey time granularity



  • THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED

    On 07/03/2010 at 06:20, xxxxxxxx wrote:

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

    ---------
    Hi!

    I'm using animation keys (Position x/y/z & Rotation H) that I create through some scripts and import into Cinema 4D through a plugin.
    Now that I'm pretty sure that all errors in my generation scripts are fixed, I'm having one problem:
    After importing, there are less keys in the time-line than I imported. Essentially, this appears to happen to keys, whose BaseTime is very close together (I'm talking fractions of milli-seconds).
    The reason I'm using these low values is that I'm producing 50fps(interlace) with 25frame-smb.

    It seems to me that at a certain "temporal close-ness" of CKeys, they overwrite each other. Unfortunately I couldn't find anything about it in the SDK help files or in the forum. Is there a certain minimum granularity supported by BaseTime?

    Assuming, t contains the Real value of time in seconds of the CKey I want to create, would it make a difference if I used any of these forms?:

    - BaseTime time(t);

    - BaseTime time(t*50,50); 
    (In order to avoid Cinema 4D multiplying t with 1000 and calculating Nominator/Denominator and therefore possibly messing up granularity)

    - BaseTime time(t*50*25,50*25)
    (In case Cinema 4D doesn't like a non-integer Nominator)

    Thanks for your help!

    Mike



  • THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED

    On 07/03/2010 at 13:52, xxxxxxxx wrote:

    Hm, I think I got it.... even though you may pass Real values, it effectively expects Integer values.
    With the Exception of BaseTime(Real), where it first multiplies with 1000 and then ignores the rest after the decimal point.

    I.e.:
    BaseTime(0.001)==BaseTime(1,1000)==BaseTime(1.1,1000)==BaseTime(0.0011).

    So for my scenario of 25*SMB at 50fps, I'm now working with
    BaseTime(t*25*50,25*50)  /  BaseTime(t*1250,1250)
    and no longer losing KeyFrames at import.

    Since the BaseTime constructors are accepting Real values, but the documentation doesn't state that it reduces Nominator/Denominator to integer by cutting off after the decimal point, this might be worth mentioning in the next update of the SDK documentation...

    Or am I still missing something? :-)

    Still couldn't find out what the BaseTime - NoReduce Constructor is effectively doing - would this constructor keep the decimals intact, or what is it used for?

    Thanks
    Mike


Log in to reply