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
    • Recent
    • Tags
    • Users
    • Login

    Live Data into C4D

    Scheduled Pinned Locked Moved PYTHON Development
    9 Posts 0 Posters 696 Views
    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 Offline
      Helper
      last edited by

      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)

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

        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.

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

          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?

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

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

            what do you mean by "refresh"?

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

              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

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

                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

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

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

                  jupp but has the benefit of an log file 😉

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

                    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

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

                      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.

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