No announcement yet.

[Plugin] OSC for UE4

  • Filter
  • Time
  • Show
Clear All
new posts

    I haven't tried it but you should be able to use a for-each loop on the pop-float node.


      Hi guys, thanks for this plugin! really helpfull!
      However I have an issue when I want to package this for a windows 32bits system : osc doesn't work anymore! "BP listening" appear but when I use TouchOSC nothing respond.
      Any idea to fix it?


        Hi [MENTION=614263]JuL17[/MENTION],

        You might find that it's that the ports are hard-wired (to 8000 I think) in the 'packaged' versions of the plugin and you'll have to change them in the source code (It's easy), or change your ports in TouchOSC.




          Hi [MENTION=4353]Dannington[/MENTION],
          You're right the ports was set to 8000 !

          I havez something else to ask you : about linking osc data to camera, how can I do it?
          My skills aren't good enough yet

          Here is my research:Click image for larger version

Name:	osc_camera.jpg
Views:	1
Size:	679.9 KB
ID:	1119046
          Last edited by JuL17; 11-28-2016, 08:22 AM.


            Hi [MENTION=614263]JuL17[/MENTION].

            I'll try to write a better response shortly - i'm quite busy today.

            You're right that you want to drive your camera's world position in this way but you're sending your camera on a diagonal path through your scene I expect.

            You need to make discrete x, y and z variables for your camera's position and only update the one you're adjusting.

            You have tx, ty and tz switches - so you need each one of them to call a 'set' on only the x, y and z variables appropriately, then i'd say you could join up those execution chains (tx, ty and tz) into a set world location based on the values of those variables.

            I'd use a 'Map-To-Range-Unclamped' node rather than your multiplier - the float output will likely produce a scalar value between 0 and 1 - if you plug that into the 'value' node, then set In Range A to 0 and Range B to 1 (the min and max for the float) - then you can set OutA and OutB to the coordinate range of your choosing - like (-1000 to 1000) - that way if you get a 0 from the float your camera will move to -1000 or if it gets 0.5 (half) it'll go to 0. Do this for each axis - you might want the mimimum range for Z to be 0, otherwise it might go through the ground.

            Also you could use a spring arm with your camera attached to produce a smooth motion when you adjust these values. In this case you move the world position of your spring arm rather than your camera.

            I'll try to post a BP grab at some point.


              I tests on 4.14 and it works just fine, except one thing:

              In the .uplugin file, the plugin is marked as disabled by default.
              Before 4.14, it was loaded anyway...
              Now, it's not anymore: if you experience strange behavior, check that the plugin is loaded in the "Plugins" window.

              I also pushed an update that make the plugin enabled by default from now on.



                Your way is perfectly fine.

                An alternative would be to use the traditional Array functions ("Data" is an array of "OscDataElem"), like that :
                Click image for larger version

Name:	OSC_Array.png
Views:	1
Size:	70.2 KB
ID:	1119097


                  Hi [MENTION=22242]monsieurgustav[/MENTION]

                  Hope you are well. Is there any reason that a long string sent into the engine would cause a crash? I'm trying to get a node.js OSC module to send in a long base64 string and it crashes the editor:

                  Assertion failed: TCString<TCharType>::Strlen(InName)<=NAME_SIZE [File:\Build\++UE4+Release-4.14+Compile\Sync\Engine\Source\Runtime\Core\Private\UObject\UnrealNames.cpp] [Line: 582]

                  Here's my string!


                  It's just a few configs and some urls.




                    I think it must be an RX buffer set to 1024 somewhere - I tried changing the global buffer but it didn't fix it.


                      OK, it totally makes sense but I haven't seen it coming.

                      The OSC plugin stores OSC strings as FName objects. (as you can see, PopString actually returns a Name value)

                      It would make sense to use FString here, but it would cause a lot of buffer copy (every Pop* function call, etc.) if used naively.
                      A less naive approach would be to store those strings in a shared container and store a pointer to it.
                      Which is basically what FName does.

                      Unfortunately, FName content is limited to 1024 characters.

                      I see 2 issues here:
                      - It will take some work to remove this limitation. Not a lot, but some.
                      - It will break old OSC related blueprints, as PopString will actually return a FString now. (instead of FName)


                        Oh well, Ive worked around it by sending multiple messages and appending them in the engine - it's not perfect but it works for me. Presumably this limit is per element? I could send several string messages in the same osc message and pop each one?

                        Thanks for the help! At least it's a known issue now.



                          Probably worth at least setting up something to catch this rather than a crash. I could imagine it could catch someone out in the future.


                            Definitely: post an issue on Github to keep track of it.
                            I'll fix de crash ASAP, then think about the best solution to fix it for good.

                            Indeed, it is a "per parameter" limitation, so you can stack up many string parameters on a single message.


                              Hi guys, I'm still looking to link a camera in unreal engine thanks to OSC.

                              I have a software that gave me the osc data:
                              Click image for larger version

Name:	touch_osc.jpg
Views:	1
Size:	90.1 KB
ID:	1121156

                              And I want to link this channels to a camera (cube in this picture) :
                              Click image for larger version

Name:	unreal_osc.jpg
Views:	1
Size:	242.5 KB
ID:	1121157

                              But I can't fin d the way to split the datas I receive.
                              Any help?


                                You need to pop each value - so add another 5 pop floats in a chain each from the output of the previous.