User Tag List

Page 1 of 5 123 ... LastLast
Results 1 to 40 of 180

Thread: [Plugin] OSC for UE4

  1. #1
    0

    [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. #2
    0
    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

  3. #3
    0
    Samaritan
    Join Date
    Mar 2014
    Posts
    139
    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

  4. #4
    0
    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 Images Attached Images   

  5. #5
    0
    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!

  6. #6
    0
    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

  7. #7
    0
    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/questions/28239/potential-bug-packaging-settings.html

  8. #8
    0
    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 Images Attached Images     

  9. #9
    0
    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.

  10. #10
    0

    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 Images Attached Images   

  11. #11
    0

    You're welcome !
    Have fun !

  12. #12
    0
    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.

  13. #13
    0
    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!

  14. #14
    0
    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?

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

  16. #16
    0
    Supporter
    Join Date
    Nov 2014
    Posts
    1

    Could not compile

    I could not compile the plugin. My UE4 version is 4.5.1 How could I solve this?

    Name:  ps.png
Views: 8015
Size:  6.2 KB

  17. #17
    0
    I hate necro'ing threads, and I'm half expecting to get no reply...

    But I've got the OSC plugin built and working in 4.5.1. I can create my blueprint, and use onOSCReceived. However, all the projects using the plug-in seem to spontaneously crash (or worse, not open at all) when an OSC stream is active. No error message, just instant CTD.

    Sometimes, it'll run the print command, then crash. Other times it just disappears without a trace - making it intensely hard to troubleshoot...

    Any ideas?
    Latest Company Showreel
    https://vimeo.com/outpostvfx/spring17

  18. #18
    0
    Quote Originally Posted by pantopan View Post
    Oh, I've found what was wrong. UE4Editor process itself blocks specified port for listening.
    Did you find a workaround? I'm having the same issue.

  19. #19
    0
    Hey,

    I'm getting an error when I try to recompile for 4.6. The error is "error C1083: Cannot open include file: 'Settings.h' No such file or directory'

    I can't find a settings.h in the OSC plugin directory. Anybody deal with this?


    Edit: looks like the big change between 4.5 and 4.6 is in how settings are registered by the plugin; lines 24 - 36 in OscModule are where the plugin is breaking.
    Last edited by Kazhiim; 12-10-2014 at 11:27 PM.

  20. #20
    0
    If anybody is curious, I made the changes necessary to get this working with 4.6. I'm not familiar with using git, so send me a message if you want the plugin.

  21. #21
    0
    Hi Kazhiim,
    Too bad, I think we fixed the 4.6 the same day! Next time, do not hesitate to send me an email with your zipped sources (or create a pull request on GitHub)
    Anyway, the GitHub version works with 4.6 now.
    Cheers

  22. #22
    0
    Quote Originally Posted by Crow87 View Post
    I hate necro'ing threads, and I'm half expecting to get no reply...

    But I've got the OSC plugin built and working in 4.5.1. I can create my blueprint, and use onOSCReceived. However, all the projects using the plug-in seem to spontaneously crash (or worse, not open at all) when an OSC stream is active. No error message, just instant CTD.

    Sometimes, it'll run the print command, then crash. Other times it just disappears without a trace - making it intensely hard to troubleshoot...

    Any ideas?

    Hi, sorry for the delay, it looks like the "listening thread" feature of the forum does not work very well...

    I've seen many crashes in the editor, using the OSC plugin or not.
    I had no crash involving specifically the OSC plugin in the call stack recently, though.
    Do you still experiencing those crashes?

    Still, I tend to log massively. I suspect it might be an issue...
    Try to comment the LOG calls and see if it changes anything.

  23. #23
    0
    Quote Originally Posted by monsieurgustav View Post
    Hi Kazhiim,
    Too bad, I think we fixed the 4.6 the same day! Next time, do not hesitate to send me an email with your zipped sources (or create a pull request on GitHub)
    Anyway, the GitHub version works with 4.6 now.
    Cheers
    Haha, fantastic! I don't know C++, so it was like patching a tire when I've never touched a car.

  24. #24
    0
    Hmm: I'm getting a weird error where OSC will fail to bind the port I need it to listen to. Both ports 9001 and 8000 work in PIE and simulate, but only occasionally work when I compile or play in a standalone window.

  25. #25
    0
    Hey everbody,
    first of all thanks to monsieurgustav for this great plugin.
    After some problem I also get it to run.
    My problem is that I need a way to cast the values from the class blueprint to the level blueprint.
    Is there a simple way to do that?

    Sorry if this is a silly question but I'm totally new to UE4.

  26. #26
    0
    Nevermind,
    I do it with an event dispatcher now. At it works fine.
    I also didn't figured out how to use the address filter within the plugin nodes, so i compare the address string with an EqualString node followed by a Branch to exec the event.
    Class Blueprint:
    Name:  classBP.png
Views: 7772
Size:  301.4 KB

    Level Blueprint
    Name:  levelBP.png
Views: 7805
Size:  240.8 KB
    Last edited by Method_Uli; 01-18-2015 at 12:48 PM.

  27. #27
    0
    Quote Originally Posted by pantopan View Post
    Oh, I've found what was wrong. UE4Editor process itself blocks specified port for listening.
    I had the same problem. port 8000 works fine in the editor but not anymore when it's packed.
    Now I'm using port 7777 and it works also when packed to a standalone *.exe in 4.6 and 4.7. I'm not sure about it, but I've read it somewhere that the 7777 is a standard Networking-port for multiplayer.
    So it should be open for sure.

  28. #28
    0
    Hum... Address filtering is not implemented, yet...
    (I really should remove it for now...)

    I usually uses a "Switch On Name" node to perform the message routing.

    I have no problem using port 8000. If one of you finds the deep reason of that problem, I'd really like to know !

  29. #29
    0
    Quote Originally Posted by tomtong View Post
    I could not compile the plugin. My UE4 version is 4.5.1 How could I solve this?

    Name:  ps.png
Views: 8015
Size:  6.2 KB
    IT seems I am having the same difficulty with this step using version 4.6.1

    The compile fails every-time.
    I have double checked the instructions several times I am not sure what error I am making.

    Does anyone have a quick solution to this problem?

    Thanks,

    Eric
    Last edited by grizfb75; 02-09-2015 at 08:12 PM.

  30. #30
    0
    Quote Originally Posted by catalejo View Post
    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
    Never mind to my previous problem. I found this solution, I must have missed it earlier when I was reading the thread. Problem solved. Thanks catalejo

    Eric

  31. #31
    0
    With your instructions we've managed to build on Windows, but not OSX.
    We tried both just putting the OSC folder in plugins and creating dummy code rebuilding in xcode etc. tried on 4.5.1 4.6.1 and 4.7 (preview) changing the versions in both the discriptor and the cpp for every permutation. We tried on osx 10.10.2 and 10.9.4.
    http://pastebin.com/Xmg92BC5
    this is the log for 4.5 with the dummy code method.

    Thank you very much

    ATK!

  32. #32
    0

    Issue with latest release (early Feb.)?

    I haven't been able to build the latest release in OS X either (the early February changes tagged with "in editor, listen port only during play/simulate").

    My builds from the previous release still work fine in 4.6 or 4.7 but the newest code isn't working for me either (OS X 10.10.2, 4.6 or 4.7)

    Quote Originally Posted by atk.io View Post
    With your instructions we've managed to build on Windows, but not OSX.
    We tried both just putting the OSC folder in plugins and creating dummy code rebuilding in xcode etc. tried on 4.5.1 4.6.1 and 4.7 (preview) changing the versions in both the discriptor and the cpp for every permutation. We tried on osx 10.10.2 and 10.9.4.
    http://pastebin.com/Xmg92BC5
    this is the log for 4.5 with the dummy code method.

    Thank you very much

    ATK!

  33. #33
    0
    Samaritan
    Join Date
    Mar 2014
    Posts
    139
    I tried changing the code for the version 4.6 to 4.7 but no success on the compile... any chance MonsieurGustav could update this marvel

    edit:
    Ok so I was able to make it work this way... I did change the references in the code from 40600 to 40700. Then made a brand new project on 4.7 and did the generate code, and refresh steps after placing the code in the plugins folder and it compiled... then took the binaries generated and put them in my original project... but it looks like things have changed on 4.7 and the plugin does not work the same. The option for adding an OSC component in a blueprint is gone, but the node for adding it at runtime is still there, so still works... but yes maybe the code has to be looked up/modified so we get the old options back maybe?
    Last edited by catalejo; 02-25-2015 at 02:59 PM.

  34. #34
    0
    Supporter
    Join Date
    Mar 2015
    Posts
    7

    Compile in MAC OSX 10.9.5 Unreal 4.7

    Quote Originally Posted by catalejo View Post
    I tried changing the code for the version 4.6 to 4.7 but no success on the compile... any chance MonsieurGustav could update this marvel

    edit:
    Ok so I was able to make it work this way... I did change the references in the code from 40600 to 40700. Then made a brand new project on 4.7 and did the generate code, and refresh steps after placing the code in the plugins folder and it compiled... then took the binaries generated and put them in my original project... but it looks like things have changed on 4.7 and the plugin does not work the same. The option for adding an OSC component in a blueprint is gone, but the node for adding it at runtime is still there, so still works... but yes maybe the code has to be looked up/modified so we get the old options back maybe?
    Thanks Catalejo,
    I´m started with Unreal 4.7 today so I´m a little confused in how to compile this awesome plugin.

    Did you made it work on Mac or Windows?
    I´m having errors in compilation

    Here are my steps:

    1. Change the fowling line of code in OSC.h
    #define OSC_ENGINE_VERSION 40700

    2. Create a new C++ Project

    3. Xcode opens automatically, and change to Editor build (near the play-Build icon) and change build for profiling (Product-Build for->profiling)

    4. Create a Plugins folder in the root project folder and copy the OSC folder to into it.

    5. Return to the unreal and make a File->Refresh Xcode Project

    6. Return to Xcode, and compile it

    7. Compilation errors

  35. #35
    0
    Same thing here, working on mac and 4.7. We would really appreciate to have an update because our team is stuck without the plugin!

  36. #36
    0
    Samaritan
    Join Date
    Mar 2014
    Posts
    139
    Hey Grifu

    It looks like those steps should do the trick, one thing is that there was more than one line of code with the 40700 reference, i did find I think I 2 more on other places, sorry do not remember where. I am running on windows...
    But I still think that the code has to be looked up, because some of the functionality is gone, the OSC receive component cannot be added as a permanent component .... it can only be done with a add osc receive node in the eventgraph... anyways, Maybe monsieurgustav is just busy... but it would be nice to see this updated.

  37. #37
    0
    Supporter
    Join Date
    Mar 2015
    Posts
    7
    Castalejo, like you said, there are two more files that makes reference to the editor version, but we should not change them because it´s to check older editor versions. For instance, to use the settings.h instead of the ISettingsSection.h

    I´m getting errors when compiling in the core unreal files:

    UnrealTypeTraits.h
    /Users/Shared/UnrealEngine/4.7/Engine/Source/Runtime/Core/Public/Templates/UnrealTypeTraits.h:203:17: error: incomplete type 'OscReceiverInputKey' used in type trait expression
    /Users/Shared/UnrealEngine/4.7/Engine/Source/Runtime/Core/Public/Templates/UnrealTypeTraits.h:444:35: error: no type named 'ConstPointerType' in 'TCallTraits<OscReceiverInputKey>'
    /Users/Shared/UnrealEngine/4.7/Engine/Source/Runtime/Core/Public/Templates/UnrealTypeTraits.h:449:33: error: incomplete type 'OscReceiverInputKey' used in type trait expression
    /Users/Shared/UnrealEngine/4.7/Engine/Source/Runtime/Core/Public/Templates/UnrealTypeTraits.h:450:32: error: incomplete type 'OscReceiverInputKey' used in type trait expression
    /Users/Shared/UnrealEngine/4.7/Engine/Source/Runtime/Core/Public/Templates/UnrealTypeTraits.h:459:28: error: incomplete type 'OscReceiverInputKey' used in type trait expression


    and in Array.h
    /Users/Shared/UnrealEngine/4.7/Engine/Source/Runtime/Core/Public/Containers/Array.h:578:3: error: no matching function for call to 'DestructItems'


    It seems to be something to do with the OscReceiverInputKey

  38. #38
    0
    Hi guys !

    The thread subscribing functionality of the forum does not work perfectly. I've just found out your problem on MacOSX...

    I strongly encourage you to post an "issue" on the Github, when you are confident it is a bug.
    https://github.com/monsieurgustav/UE4-OSC/issues

    Back on the issue, I'll fix it ASAP, but I don't have much time right now...
    Probably next week.

    In the mean time, pulling the penultimate commit should work on OSX.

  39. #39
    0
    Supporter
    Join Date
    Mar 2015
    Posts
    7
    Thanks Monsieur Gustav for your great contribution!

    tried the penultimate commit with no luck!
    I´m not sure what is the problem, I just receive some errors in the OSCReceiverInputKey when compiling, but if I find it I´ll post it as an "issue" in on the Github!

  40. #40
    0
    Supporter
    Join Date
    Mar 2015
    Posts
    3
    Hi Everybody,

    I get a problem when I try to add the "Refresh visual studio project stage". This is the message I get:

    Failed to generate project files. Log output:
    Running D:/Epic Games/4.7/Engine/Binaries/DotNET/UnrealBuildTool.exe -projectfiles -project="C:/Users/Administrator/Documents/Unreal Projects/gardentoy_test/gardentoy_test.uproject" -game -rocket -progress
    Discovering modules, targets and source code for game...
    UnrealBuildTool Exception: System.Exception: Could not find token at index 0
    bij fastJSON.JsonParser.NextTokenCore()
    bij fastJSON.JsonParser.ParseValue()
    bij fastJSON.JSON.ToObject(String json, Type type)
    bij fastJSON.JSON.ToObject[T](String json)
    bij UnrealBuildTool.Plugins.LoadPluginDescriptor(FileInfo PluginFileInfo, LoadedFromType LoadedFrom)
    bij UnrealBuildTool.Plugins.FindPluginsRecursively(String PluginsDirectory, LoadedFromType LoadedFrom, List`1& Plugins)
    bij UnrealBuildTool.Plugins.DiscoverAllPlugins()
    bij UnrealBuildTool.RulesCompiler.FindAllRulesSourceFiles(RulesFileType RulesFileType, List`1 AdditionalSearchPaths)
    bij UnrealBuildTool.ProjectFileGenerator.DiscoverTargets()
    bij UnrealBuildTool.ProjectFileGenerator.AddProjectsForAllTargets(List`1 AllGames, ProjectFile& EngineProject, Dictionary`2& GameProjects, Dictionary`2& ProgramProjects, HashSet`1& TemplateGameProjects)
    bij UnrealBuildTool.ProjectFileGenerator.GenerateProjectFiles(String[] Arguments, Boolean& bSuccess)
    bij UnrealBuildTool.UnrealBuildTool.GenerateProjectFiles(ProjectFileGenerator Generator, String[] Arguments)
    bij UnrealBuildTool.UnrealBuildTool.Main(String[] Arguments)

    This is all pretty new to me, but would be great if someone could help

    best

    wim

Page 1 of 5 123 ... LastLast

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •