Live Data into C4D



  • On 28/07/2014 at 16:47, xxxxxxxx wrote:

    Does anyone have suggestions as to how I would bring in live data to C4D? Software is being written for me to receive the data in any format. What's the best one I should use? I was looking at making a OSC server and receiving floats through it. Thoughts?

    (The data will be sent from an external software, and will need to move objects in cinema in realtime)



  • On 28/07/2014 at 19:52, xxxxxxxx wrote:

    Python networking is a good way to communicate with cinema. A simple Google search will get you started.



  • On 28/07/2014 at 20:11, xxxxxxxx wrote:

    I've looking into Socket networking. Couldn't quite figure out how it refreshes. Is it a ping in ms?



  • On 29/07/2014 at 03:54, xxxxxxxx wrote:

    what do you mean by "refresh"?



  • On 29/07/2014 at 04:36, xxxxxxxx wrote:

    i would write a external python script which is able to create an xml file.

    in c4d just intrepret the xml file on frame load.

    done



  • On 29/07/2014 at 04:52, xxxxxxxx wrote:

    which would be slow due to hard-drive read/write latency, and more troublesome if two-sided
    communication is required. XML is also not always the best format of choice :)

    Best,
    -Niklas



  • On 29/07/2014 at 05:02, xxxxxxxx wrote:

    jupp but has the benefit of an log file ;)



  • On 29/07/2014 at 05:52, xxxxxxxx wrote:

    2 sided communication isn't required. But we will be sending a large amount of data (floats, ints). I'm not sure how well an XML will work with reading all that information on each frame refresh.

    Does anyone have experience with Python networking? Possibly posting a sample of how it would read data? Also, what I meant by refresh was that the data will be changing constantly though the external software. Will that refresh the python network each time the frame changes?

    Thanks,
    Joe



  • On 29/07/2014 at 10:16, xxxxxxxx wrote:

    This is where I got started: https://docs.python.org/2/library/socket.html#example

    The example will work in cinema and I highly recommend learning how to run code within a thread otherwise cinema will lock up.


Log in to reply