Realtime Recording?



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

    On 30/11/2009 at 10:38, xxxxxxxx wrote:

    User Information:
    Cinema 4D Version:   11 
    Platform:   Windows  ;   Mac OSX  ; 
    Language(s) :     C++  ;  XPRESSO  ;

    ---------
    Hey all,

    Most of my experience is with coffee, and that experience tells me that you can't just go setting keyframes in realtime with AllocKey or similar functions.  My observation of the cappuccino tools seems to confirm this, as the keyframes come in after recording stops.

    So, basically what's the best way to go about recording data on the fly?  Does this involve writing to a file, or just storing away in containers or something? A nudge in the right direction will be extremely helpful.

    The data in question is being polled in the message member of a tag plugin when a MessageData plugin's timer goes off.  So the data is refreshed every 100ms or so.  I plan to set up some AM parameters to collect the data so it can be both keyframed and output through xpresso.

    Feel free to speak down to me:) (not, in the rude manner... I mean, feel free to patronize me with a bit of over-explanation, as I still need my hand held a bit when it comes to coding:))

    Thanks,
    kvb



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

    On 30/11/2009 at 14:03, xxxxxxxx wrote:

    Originally posted by xxxxxxxx

    Hey all,

    Most of my experience is with coffee, and that experience tells me that you can't just go setting keyframes in realtime with AllocKey or similar functions.  My observation of the cappuccino tools seems to confirm this, as the keyframes come in after recording stops.

    I would believe that the timeline is simply only refreshed after the cappuccino thread is finished but the keys are created on-the-fly while playing. It would be a waste of performance and memory to store all the states of all objects, tags etc. and process them later on. That doesn´t make sense (neither programming wise nor performance wise, allocating a key should be much faster than storing all the necessary data, having hundreds or thousands of constructor calls, memory allocations etc.).

    What I could believe is that the keys are stored during runtime and then the tracks are created afterward (maybe they are slower in generation) and keys are then inserted, but I even doubt that. At least I don´t think it´s that slow (also coz tracks only need to be created once).

    ANYWAY, with Coffee this is all a different story. Coffee is way slower in execution than C++, so that is no real comparison. So maybe with COFFEE storing allocated keys and then insert afterward would be the better way, with C++ do it on-the-fly. ;)



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

    On 30/11/2009 at 15:19, xxxxxxxx wrote:

    So, basically, the limitation in coffee is its inherent slowness (amongst other limitations) when compared to c++?  I'm glad I jumped up to c++:D  It was scary going from coffee scripts to c++ plugins, but it's not that bad with a little direction;)

    So it really isn't a matter of searching for some complicated workaround, as I figured it would; rather, it's standard animation coding, I just have to take certain things into consideration based on the application... in this case I suppose it would be when to refresh what.

    Thanks Katachi, that clears a lot of things up:)

    I'll come back after some testing... just to make sure I'm not on the path to making c4d blow up or anything:D

    kvb


Log in to reply