Announcement

Collapse
No announcement yet.

[Plugin] OSC for UE4

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

    #91
    I feel stupid for asking, but can someone please direct me on how to do this from scratch. I've set the port and am sending Osc messages to it but it does not get into ue4. I have an OSC event reader so I know it sending. I'd app feciste any help at all.


    Best regards,
    Lumli

    Comment


      #92
      I'll help where I can.

      You need to make a blueprint and add an OscReceiver component to that blueprint. (Edit your new blueprint, top left click add component)

      Now - at begin play you can add a target to that component - drag the component from the top left onto the blueprint - then you have a reference to it. Drag off the component to add the new target or alternatively bind an event to it. This is important - I found it difficult to understand what binding meant when I first started with UE.

      Drag off of the little red square and start typing 'custom event' When you make this you're making an execution chain which will fire whenever an OSC command is received.

      To check it's all working, add a print command to this custom event - now when you run it you'll get a 'Hello' or whatever whenever you receive a command.

      If you've made the blueprint as an actor, make sure you add it to your level.

      If it's not working, check your IP addresses and ports. Then possibly check your firewall.

      Dan

      Comment


        #93
        Hi, I've got a weird problem and hope to fix it cuz I'm stucked !

        I'm Using Wekinator to send OSC messeges to UE4 . But inside ue4 when I want to listen to the float output it's fixed to the first osc message at the Begining of Play .

        Here's the simple blueprint to view the osc messege :

        Click image for larger version

Name:	Capture.JPG
Views:	1
Size:	54.2 KB
ID:	1099982

        I get the correct OSC messeges when listening with OSC Monitor , but in ue4 as I said It stucks to a fixed Value and gets the same value all the time !
        ALLLESSS.com

        Comment


          #94
          Is it definitely a float you're expecting? I've got a debug switch on my exec path which uses the Text Format node to display all of the potential data - something like:

          'Message sent to {add} - Str:{st} - Int:{In} - Float:{Fl} - Bool:{Bl}'

          Copy this into a text format node then connect all of the OSC Pop types and address, and connect it to a print node.

          Also - Shouldn't you have something connected to the 'bind to' little red box on the received node?

          Dan

          Comment


            #95
            Hello,

            Thank you very much monsieurgustav for this plugin. It has been working great for my project. I do have two questions that I wonder if you or someone else here could help me answer:

            1. How can I receive OSC messages in the BluePrints of more than one Actor? It seems that it's only possible to have one instance of the OscReceiverComponent (I guess it binds to the incoming port and won't let another instance bind?). What would be the best way to get OSC data forwarded to different Actors?

            2. I understand that it is a Preview version, but I'm not able to get incoming OSC messages when using UE4 4.11 (preview 5). It seems that something crashes since the second time I play my project I get this on the output log:

            LogStats:Warning: MetaData mismatch. Did you assign a stat to two groups? New //STATGROUP_Threads//OSCListener///Thread_23b8_0///####STATCAT_Advanced#### old //STATGROUP_Threads//OSCListener///Thread_2914_0///####STATCAT_Advanced####

            I'm using this version due to the improvements in VR performance.

            Thank you again!

            Comment


              #96
              Hi !

              1- There should not be any limitation in the number of receivers (either actor or component)... The incoming port is listened and all the messages are routed to all receivers.
              Did you experience differently?

              2- Please, log an issue on the GitHub for the 4.11 support.
              The warning you see has been there for a long time, I doubt it is suddenly a cause for a crash.


              Cheers
              Guillaume

              Comment


                #97
                Is it possible to receive from two different ports rather than just one?

                Comment


                  #98
                  No, it's not possible.

                  What use case would it be?

                  Comment


                    #99
                    Originally posted by hcenteno View Post
                    Hello,

                    Thank you very much monsieurgustav for this plugin. It has been working great for my project. I do have two questions that I wonder if you or someone else here could help me answer:

                    1. How can I receive OSC messages in the BluePrints of more than one Actor? It seems that it's only possible to have one instance of the OscReceiverComponent (I guess it binds to the incoming port and won't let another instance bind?). What would be the best way to get OSC data forwarded to different Actors?

                    2. I understand that it is a Preview version, but I'm not able to get incoming OSC messages when using UE4 4.11 (preview 5). It seems that something crashes since the second time I play my project I get this on the output log:

                    LogStats:Warning: MetaData mismatch. Did you assign a stat to two groups? New //STATGROUP_Threads//OSCListener///Thread_23b8_0///####STATCAT_Advanced#### old //STATGROUP_Threads//OSCListener///Thread_2914_0///####STATCAT_Advanced####

                    I'm using this version due to the improvements in VR performance.

                    Thank you again!
                    Thank you Guillaume,

                    In the past (with UE4 4.9) I've tried several times to use more than one OscReceiverComponent and incoming messages stopped working but for some reason now that I tried again it worked (with UE4 4.10).

                    I logged the 4.11 issue on GitHub.

                    Cheers!

                    Hector

                    Edit: Let me know if I can help in any way to figure out the 4.11 problem.

                    Comment


                      If you have some coding skill, the code is not hard to understand:
                      - a thread listen the port and stack incoming messages in a buffer.
                      - the main thread reads the buffer, forward the messages individually to every receiver, empties the buffer.

                      Any info about where is goes wrong is helpful !

                      Comment


                        Originally posted by monsieurgustav View Post
                        If you have some coding skill, the code is not hard to understand:
                        - a thread listen the port and stack incoming messages in a buffer.
                        - the main thread reads the buffer, forward the messages individually to every receiver, empties the buffer.

                        Any info about where is goes wrong is helpful !
                        Hello again,

                        I'm debugging with VS and it seems that in UE4.11 UOscDispatcher::Callback never gets called. I'll be posting any other findings in the GitHub issue: https://github.com/monsieurgustav/UE4-OSC/issues/21

                        Cheers!

                        Comment


                          Hi Monsieurgustav.

                          Thanks for the latest update to the plugin!

                          I didn't have much time to test it, but i replaced my timer/stack osc sender with the bundle sender and it works a treat - the system actually feels more stable to me now as before there was a tiny delay between message sends which was visible on my controller. So thanks!

                          FYI, it works on mac an pc.

                          Comment


                            Also - is there a simple way to add an IP address to the OnOSCRecieved event? I have to configure 2 iPads to send to the engine' IP address, which is inescapable, but i'd like to have a button on my touchosc controller which sends 'I am Ipad One', which the engine would get and use the incoming IP address to create an outgoing one? I don't know what's reported when an OSC message is sent or if the UDP can report this information.

                            Do you have a tip jar so I can send you a contribution - beer money!

                            Dan

                            Comment



                              I don't have a tip jar, and have no plan to open one. I don't really need the money (at least, it is not the reason why I maintain the plugin) and I do not spend much time on the project (few hours a week/month).
                              But I really like a text or video of your project/work in progress!


                              About the "From IP Address" value, it should be totally doable.
                              As usual: file an issue on the GitHub for it!

                              Comment


                                Done - it feels wrong to bring it up as an 'Issue' though.

                                Comment

                                Working...
                                X