• Isadora
  • Get it
  • Forum
  • Help
  • ADD-ONS
  • Newsletter
  • Impressum
  • Dsgvo
  • Impressum
Forum

Navigation

    • Register
    • Login
    • Search
    • Categories
    • Recent
    • Popular
    • Tags

    How to Generate a Word Cloud from Chat

    How To... ?
    glsl shader text draw zoomosc virtual theatre javascript
    4
    4
    384
    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.
    • Woland
      Woland Tech Staff last edited by

      I'm working on a project where I need to parse Zoom chat (which I do using ZoomOSC) and then create a word cloud in real tme based on the most-often mentioned words.

      Currently, I'm thinking of using Javascript to do the parsing, but the tricky thing is creating a video output with it. My current method is to have the Javascript count words, and then output the following to a Text Draw actor for each word:

      1. A font size based on the number of times a word has been detected.
      2. A random x+y location (built off the center/starting word to ensure it groups like a wordcloud but making sure that the words don't overlap)
      3. A random rotation (either 0, 90, or 180 degrees)
      4. A color (sent as an hue value of 0-360 scaled from the least mentions (min) to most mentions (max) so there are more colors present depending on how many words are detected.)

      I'm just a bit unsure about this solution because it means I'm limited to a pre-determined number of words (because there needs to be a Text Draw actor for each word).

      I'm wondering if maybe there's a way to do it with a GLSL shader so that I'm not limited to the number of Text Draw actors that I pre-create, but I'm not well-enough versed in GLSL Shaders to know if it's an advisable solution.

      Any thoughts?

      TroikaTronix Technical Support
      New Support Ticket Link: https://support.troikatronix.com/support/tickets/new
      TroikaTronix Support Policy: https://support.troikatronix.com/support/solutions/articles/13000064762
      TroikaTronix Add-Ons Page: https://troikatronix.com/add-ons/

      | Isadora 2.6.1 + 3 | Mac Pro (Late 2013), macOS 10.14.6, 3.5GHz 6-core, 1TB SSD, 64GB RAM, Dual AMD FirePro D700s | Macbook Pro (Retina, 15", Mid 2015), macOS 10.11.4, 2.8GHz Intel Core i7, 16GB RAM, Intel Iris Pro 1536 MB |

      liminal_andy Juriaan 2 Replies Last reply Reply Quote 2
      • liminal_andy
        liminal_andy @Woland last edited by

        @woland if we did not need to vary the sizes I could imagine a 26 layer image (one for each letter in the english alphabet) where words are formed by setting a spot in the checkerboard to display its letter or alpha, allowing you to only need 26 Text draws. you could get the rotation to work with this as well, but the size variations break the system down. Still, I wonder if there is a way to be character centric versus word centric.

        Andy Carluccio
        Zoom Video Communications, Inc.
        www.liminalet.com

        [R9 3900X, RTX 2080, 64GB DDR4 3600, Win 10, Izzy 3.0.8]
        [...also a bunch of hackintoshes...]

        1 Reply Last reply Reply Quote 1
        • Juriaan
          Juriaan Tech Staff @Woland last edited by

          @woland

          Personally, I think you are on the right track by limiting the number of words that you use to generate the image.. It only adds a lot of chaos to the image if you decide to go higher than 30 words.. If you also add movement / make other words bigger then others / add color then I think you have plenty of elements to generate a stunning image.

          Isadora 3.1.1, Dell XPS 17 9710, Windows 10
          Interactive Performance Designer, Freelance Artist, Scenographer, Lighting Designer, TroikaTronix Community moderator
          Always in for chatting about interaction in space / performance design. Drop me an email at hello@juriaan.me

          DusX 1 Reply Last reply Reply Quote 1
          • DusX
            DusX Tech Staff @Juriaan last edited by

            You may also want to find a monospace font to use, this way you can calculate the space required for the word, since each letter will take up equal space. That should allow for a grid like layout to become possible. Rotation will be another monster.

            Troikatronix Technical Support

            • New Support Ticket Link: https://support.troikatronix.com/support/tickets/new
            • Isadora Add-ons: https://troikatronix.com/add-ons/
            • My Add-ons: https://troikatronix.com/add-ons/?u=dusx

            Running: Win 10 64bit, i7-8750H, M.2 PCIe SSD's, 16gb DDR4-2666, nVidia GTX 1070 | located in Ontario Canada.

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