Announcement

Collapse
No announcement yet.

[Plugin] OSC for UE4

Collapse
X
  • Filter
  • Time
  • Show
Clear All
new posts

  • [Plugin] OSC for UE4

    I released my OSC plugin here:
    https://github.com/monsieurgustav/UE4-OSC

    It receives and sends OSC messages in Blueprints.
    It manages any number of float, integer, bool and string parameters.

    Works in 4.4 and 4.5.
    Tested on Windows and MacOSX.


    Follows https://forums.unrealengine.com/showthread.php?6353

  • #2
    Hi Guillaume, first of all thanks a lot for your contribution! I'm more on the creative coding/generative design side of things and getting osc support into the engine is super important to have access to all sorts of data. Unfortunately i didn't manage to install the plugin. I'm running Engine Version 4.5.0 and copied the OSC folder into my project as described by you and the engine trys to compile it, but fails just stating that it could not be compiled. Do i miss something here? Do i need the Git-Source to compile, and how would i need to setup that?

    Thanks again

    Comment


    • #3
      Hi Madsim
      I ran into the same problem, it is a matter of the order on how you do it: first you need visual studio on windows or xcode on mac installed... then open your project (without the plugin installed). once it is open go to menu/file and do "add code to project" this will open visual studio or x code, name your class whatever. Then copy the OSC folder in the plugins folder on the root of your project and do "Refresh Visual Studio project" also under file. Then build from visual studio... viola

      Comment


      • #4
        Hi monsieurgustav !

        first, thanks for your great plugin ! Importing OSC to unreal engine is awesome, I used to play with osc using Unity, vvvv and puredata (ie here : https://vimeo.com/99187646 ) and having it working also on ue4 is great !

        Anyway, i'm here also because i got some problems making it communicate properly with the outside, and as I'm new to Unreal Engine, I'm a bit lost. so I installed your plugin, compiled it and everything seems to work well inside ue4 (i can access it in blueprints, open your examples and everything) but the fact is I can't make it send or receive anything from another application, so in fact i didn't manage to establich communication with the outside.

        For the moment i'm trying to send a simple constant float from UE4 to VVVV. I'm pretty sure the vvvv part (osc receiver part) is ok as i'm used to vvvv. So the problem must come from my use of your OSC plugin in UE4, and as i'm new to ue4, i'm not surprised .

        so here is what i did (I also join a screenshot of my blueprint, and the vvvv part, if it can help).

        - i'm sending and receiving on the 6670 (so i changed the port in the OscSettings.cpp, and check if the host was local/127.0.0.1 ) and saved the cpp file.
        - in UE4 i created a class blueprint with some simple elements in it (not related to the osc anyway) and made a simple sending patch as in your example.
        - i'm sending and receiving on the osc address "/bubu" so I added a string variable into the blueprint containing this value and linked it into the adress pin of the sender.

        I import the blue print into my scene and I hit play obut nothing seems to arrive to VVVV.

        Do u have any idea of what i did wrong ?
        Attached Files

        Comment


        • #5
          Hi catalejo, thanks for the hints! It eventually worked for me that way, but i had to create a new project as my old one was created in 4.4.0 and won't compile the plugin in 4.5.0. Well thats on Unreal's side i guess! Anyhow, i have the same problems as crasse. I send the data out of processing, managed to find the default port 8000 in the config and can't send or receive data either ... I saw that the plugin is writing some logs but couldn't see them in the console inside the editor, any guess how to find the logs? Maybe that would help?

          Thanks for the help so far!

          Comment


          • #6
            Hi !

            First, you can read the plugin's logs in the "Output Log" window in the editor. They are prefixed with "LogOSC". That may be your starting point.

            Also, keep in mind that a machine cannot have several applications listening simultaneously to the same port.
            So, crasse, if both UE4 and VVVV are listening to the port 6670, one of them will fail.
            (also, there is no need to recompile the source to change the parameters: you can do it in the "Edit/Project Settings/Osc" editor)

            I remember I once had an issue when sending to 127.0.0.1. Then, I set the explicit address (192.168.0.10 in my own case) and it worked.
            Today, 127.0.0.1 works for me though. (try to get the latest sources)

            Finally, try to use an OSC monitor tool to debug your OSC messages. It's useful to know if messages are received on the expected machine/port.
            http://www.kasperkamperman.com/blog/osc-datamonitor/ works fine.
            On MacOSX, you can also use Osculator.

            I hope that helps !
            Guillaume

            Comment


            • #7
              One more thing that I've just figured out...

              The plugin settings in your "Project Settings" window are not used when packaging the project.
              "Default" settings are. (have a look at DefaultEngine.ini and DefaultEditor.ini at the project root)
              Then, you must put your plugin settings to the default settings. (click the "Set as Default" button)

              See the answer in this post for details:
              https://answers.unrealengine.com/que...-settings.html

              Comment


              • #8
                Hi there !

                Thanks for your help Guillaume Thanks to that, I finally managed to make Unreal Engine send a list of 2 floats to vvvv and that's great !.

                Now that it works in this way, i try the opposite way as I planned in the beginning of this exercise, I'm trying to send floats from vvvv into Ue4, and still, i Don't get it to work, I put a print string on my osc receiver chain output, and nothing come from it.

                Here is what I did :

                - I'm trying to send a float from vvvv, on port 8001 (vvvv listener is on port 8000 so there is no conflict), address "/b a b a" (with no space between letters, this forum seems to have rules that don't allow to write this particular word as it should be, anyway) and IP 127.0.0.1 ( 127.0.0.1 works for me, as it works for sending data from unreal engine to vvvv, it should works also in the opposite way).
                I tested the vvvv part by making a OSC loop inside vvvv, and it can receive what is send, so no problem there. I also monitored it using OSC Data Monitor, i put a screenshot of it (great tool by the way ! ) and it works.

                (of course I close OSC data monitor before testing the Unreal Engine listener part to prevent listening conflict)

                and I set my osc settings as default settings, as you said.

                So then I configured the osc listener into Ue4 but didn't get it to work. I joined screenshots of my patch and OSC settings and configuration I did, I think it's more clear than explaining it by words

                also I got another question : what is the use of the Address output pin on the OSCreceiver component node in Unreal Engine ?

                again thanks a lot for your help !
                Attached Files

                Comment


                • #9
                  I think you must connect the "OnOscReceived" out exec pin to the "PrintString" exec pin.

                  "OnOscReceived" is an event, quite like the "tick" event.
                  It's exec pin triggers when the event happens (a message is received).

                  "Address" pin gives you the address ("/b a b a") part of the received message.
                  "Data" gives the parameters.

                  Comment


                  • #10
                    worked ! thanks , in fact the problem came from the fact that I triggered the execution of the print string from the Event Begin play node and not from the OscOnReceived node, For the moment I'm not quite aware of the logic behind this behavior in the blueprint (as I thought the white links where neutral triggers, but seems not to be in this case) but i'll read some more documentation about it !

                    Thanks again for you're awesome plugin and help provided here !
                    Attached Files

                    Comment


                    • #11

                      You're welcome !
                      Have fun !

                      Comment


                      • #12
                        Hey all, just a quick note: i got it to work, too and i really like the way the blueprints work. Great job Guillaume! Thanks again.

                        Comment


                        • #13
                          Hello. I've installed Visual Studio in order to compile this plugin, but Visual Studio is crashing immediately after startup. I've unistalled and installed again to no effect. The posts I've read online about that kind of problem could only be resolved by re-installing Windows. Before I have to do that and re-install all my applications, just to compile this plugin (I've no immediate use for Visual Studio for anything else):

                          Has anybody compiled it successfully for UE 4.5.1? Can you share it?

                          Thank you in advance!

                          Comment


                          • #14
                            Hi!
                            I have problems with packaging a project. Everything works in editor window (sometimes editor crashes after a couple of launches, it seems that some thread continues working after stopping the game), but when I launch a standalone or packaged .exe, osc receiver is just not working. I use Cinder for sending messages and Visual Studio 2013 for building C++ UE4.5.1 project. I've tried both 127.0.0.1 and explicit local network IP, as well as different ports. Saving a port in the plugin settings as default is not working for me. I've also tried all build environments (debuggame, debuggame editor, development, etc). Has anybody similar problem solved?

                            Comment


                            • #15
                              Oh, I've found what was wrong. UE4Editor process itself blocks specified port for listening.

                              Comment

                              Working...
                              X