Unreal Engine OSC data stream

Hello there !

I’d like to connect Touchdesigner and Unreal Engine via OSC.
I managed to received data from Unreal to Touch, but I can’t receive data from Touch to Unreal. I’ve attached my blueprint setup, my port is identical on both side, I’ve tried with localhost and 127.0.0.1 ip adress, still no sign of data in Unreal.

I would gladly appreciate some help if someone already tried this !

Cheers

1 Like

Hey there.

I have done a bit of work in this space using the native UE OSC plugin that has recently gotten much better than it was in the past. The issue I am seeing is in your unreal blueprint, and since this is a TD forum I don’t want to muddy the waters too much as I’m sure there are answers in the UE forums.

That being said, I found 2 things you must do with UE4’s OSC to get it working solidly.

  1. Make sure to provide a name for the server you create in that last argument of Create OSCServer.

  2. Store the server in a blueprint variable. The return value you get from Create OSC Server should get put into a set node for this variable ( which should be of type OSCServer Object) after creation, then you can bind the event. This must be done because UE4 memory garbage collection is pretty hardcore and will wipe your server out if it isn’t in a variable pretty quickly.

Let me know if that helps, i just peeked at my test files and I’m pretty sure this is what you need. From there I would suggest using OSC Dats instead of CHOPs to transmit the data since you get more control over the message format that way.

1 Like

Hi archo-p, thank you for taking the time !

I’ve tried what you said, but unfortunatly I still have the same result, I’ve attached my new blueprint setup.
Also thank you for the tips on OSC Dat !

UPDATE : I tested this setup with Unreal Engine 4.25 and it works. So apparently it’s a bug on 4.26 prev 3

Hi ttstreet !

I’m struggling with the same issue as you, but I’ve only been using unreal for a short while, and even though i’ve gotten other applications to work with OSC in touch, I can’t make touchdesigner work… Would you be comfortable with sharing your unreal setup ? The last post you made is a huge help, but it would be amazing to fiddle with an already working setup

-K

@KristofferMoth I noticed that @ttstreet found it works in 4.25 but not in 4.26. What version are you using?

@ben

I got it working late last night ! Kinda confused how, but now it works consistently. I restarted the router and completely shut off firewall, the software had permissions to go through before, but that seemed to do something

1 Like

Hi @KristofferMoth, sorry for the late reply, did you get it working on Unreal 4.26 ?

hi @ttstreet !

No worries, I cant make it work in 4.26. But its running now in 4.25, My knowledge in unreal is a bit limited, but I’ve got a setup now where i can control single parameters in unreal, directly from Touchdesigner, works very smooth and solid

1 Like

Alright, so we are pretty much at the same stage. From there splitting your OSC signal to assign it in different part of Unreal is fairly straight forward

@ttstreet

Speaking about that, I’m actually struggling a bit with the logic of splitting the osc signal. I want to control the different rotation axis’ on a cube (example) but do you have any pointers on how to split the data ? Does the parameters in Touchdesigner need to be named appropriately and then reference in unreal ?

I’m very new to blueprints so it’s a slow process when tackling these small and probably obvious steps

Here is the setup I use to get RGB value and assign them to material parameter

I’m not sure it’s the most efficient way to do it but I assume you could adapt that easily to XYZ axis !
Names in Touchdesigner doesn’t needs to match Unreal’s naming, as long as you only want to get values I guess.

@ttstreet @kristofferMoth I’ve been down this rabbit hole as well, I’ve updated to 4.26 for ndi but my osc has completly stoped working as of mid december. 4.25 still works, have yall had any more progress on this?

I havn’t get the chance to try 4.26 again. I would post my setup if I get it to work.

Hello ! Facing the same problem here, looks like the problem come from the fact that Touch Designer is sending OSC Bundle, so we have to use OSC Bundle event receiver to make it work, I’ve tried to make it work but i’m stuck at the point that I can’t get some information from the event that is trigerred from UE
Here is my setup :

2 Likes

Wich version UE are u ? In my experience, OSC only works on 4.25. :frowning:

I’m on 4.26 and had the same issue, both with the Bundle & Message settings… I then tried TouchOSC and it works perfectly fine with 4.26 (both on Msg and Bundle mode), but of course it’s no use for this specific project of mine. So I doubt that 4.26 has any issues receiving OSC messages/bundles. I hope some of us can come up with a solution soon.

EDIT: Acted too soon to post. I did some troubleshooting on the OSC messages in Protokol and it turns out that I have the OSC Out CHOP settings wrong (it was sending the whole pack at once and not incrementally). I set the Data Format to “Sample” and now I got something, but I can’t pick the messages out of the Bundle. When I print the messages on the screen, they print blank. I can print the IP address, it prints OK, but not the messages themselves… Still working on it, will check back if I find a solution.

1 Like

thanks a lot, waiting for you news

Hello.

Has anyone tested the OSC Client in Unreal Engine?

I want to send data from UE4, to Touch, but it seems it has the same problem, as the server - it stops after 20-30 seconds.

I tried to give the client a name, and set it to a variable as suggested for the server, but it doesn’t seem to work.

I watched a tutorial, where people restart the OSC server manually inside the blueprint, but that doesn’t seem to apply to the OSC Client.

I am a UE4 Newbie, and I can’t seem to find anything on their forums about the issue.

Unreal Engine is v 4.25

Here is the blueprint:

Sorry Again for posting this in TD forum, but I’m more used to TD than UE.

Thanks in advance to anyone that can help.

Hi everyone, looks like a solution to this was found, and that 4.26 is more picky about the channel names it needs sent to it. See post here: RESOLVED: Chop OSC doesn't work with the epic plugins of Unreal 4.26 (found a solution with osc dat)

2 Likes

If you send the data from TD to chataign ( or possibly any another kind of “bridge” and then to UE4 // UE 5 it works out of the box.