Announcement

Collapse
No announcement yet.

[Plugin] OSC for UE4

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

  • replied
    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.
    Hum.


    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)

    Leave a comment:


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

    Leave a comment:


  • replied
    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!

    V2hhdCUyMGlzJTIweW91ciUyMGZhdm91cml0ZSUyMHR5cGUlMjBvZiUyMGJpc2N1aXQ/XypfdW5kZWZpbmVkXypfbnVsbF8qX251bGxfKl9udWxsXypfdW5kZWZpbmVkXypfdW5kZWZpbmVkXypfdW5kZWZpbmVkXypfdW5kZWZpbmVkXypfNF9TUExJVF9fL19FbGVtZW50MF8qXyJodHRwOi8vNjUubWVkaWEudHVtYmxyLmNvbS81ZmIyNTQ4OTNkNTE1ZTQwYTY1ZWFjNmRhNjZkNzZjZi90dW1ibHJfaW5saW5lX216ZG96ZHhIVm4xc254emN3LmpwZyJfKl8lQzIlQTAlQzIlQTBDdXN0YXJkJTIwQ3JlYW0lQzIlQTAlQzIlQTBfKl9fKl9fL19FbGVtZW50MV8qXyJodHRwczovL21vcm5pbmdiaXNjdWl0bG92ZS5maWxlcy53b3JkcHJlc3MuY29tLzIwMTIvMDgvMjAxMjA4MTEtMTMyNzQyLmpwZyJfKl8lQzIlQTAlQzIlQTBDaG9jb2xhdGUlMjBEaWdlc3RpdmUlQzIlQTAlQzIlQTBfKl9fKl9fL19FbGVtZW50Ml8qXyJodHRwOi8vd3d3LmhpbGxiaXNjdWl0cy5jb20vMjEtMjMtYmlzY3VpdC1pbWFnZS9oaWxsLWdpbmdlci1udXRzLTE1MGcuanBnIl8qXyVDMiVBMCVDMiVBMEdpbmdlciUyME51dCVDMiVBMCVDMiVBMF8qX2NlbnRlciBjZW50ZXJfKl9fL19FbGVtZW50M18qXyJodHRwOi8vd3d3LmNvbmZlY3Rpb25lcnluZXdzLmNvbS92YXIvcGxhaW5fc2l0ZS9zdG9yYWdlL2ltYWdlcy9wdWJsaWNhdGlvbnMvZm9vZC1iZXZlcmFnZS1udXRyaXRpb24vY29uZmVjdGlvbmVyeW5ld3MuY29tL21hbnVmYWN0dXJlcnMvYnVydG9uLXMtYmlzY3VpdHMtbmVlZHMtc2hvcHBpbmctc3ByZWUtdG8tc3RheS1jb21wZXRpdGl2ZS1zYXlzLWFuYWx5c3QvODU4MzIxNS0xLWVuZy1HQi9CdXJ0b24tcy1CaXNjdWl0cy1uZWVkcy1zaG9wcGluZy1zcHJlZS10by1zdGF5LWNvbXBldGl0aXZlLXNheXMtYW5hbHlzdC5qcGciXypfJUMyJUEwJUMyJUEwSmFtbWllJTIwRG9kZ2VyJUMyJUEwJUMyJUEwXypfXypfX1NQTElUX1JlczJfZF9CYXNlIFZvdGVfZF80MF9kXzMwX2RfMjBfZF8xMF9sX1JlczNfZF9NZW5fZF8xMF9kXzIwX2RfMzBfZF80MF9sX1JlczRfZF9Xb21lbl9kXzI1X2RfMzVfZF8yOV9kXzExX2xf

    It's just a few configs and some urls.

    Cheers!

    Dan

    Leave a comment:


  • replied
    [MENTION=525802]Narcyssus[/MENTION]

    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

    Leave a comment:


  • replied
    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.

    Leave a comment:


  • replied
    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.

    Leave a comment:


  • replied
    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.

    Leave a comment:


  • replied
    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.

    Best!

    Dan

    Leave a comment:


  • replied
    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?

    Leave a comment:


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

    Leave a comment:


  • replied
    Hello guys. Someone could tell me how can I route messages that are more complex than address, ip and value? I'd like to import messages that contain multiple values after the addres and route them.

    Is there a better way than the mine?



    Thank you.
    Attached Files
    Last edited by Narcyssus; 11-20-2016, 02:51 PM.

    Leave a comment:


  • replied
    Thanks ! I guess I could have guessed it by myself if I wasn't so nervous about this Visual Studio thing... I'll get used to it !

    Leave a comment:


  • replied
    I had this updating to 4.13.1 - just re-generate the project files and recompile.

    Leave a comment:


  • replied
    Hello everyone

    A UE4 4.13 project wich use the OSC plugin is now crashing when I launch it. It was working fine a few days ago - I don't remember making any change except that I clicked OK to an update of the Epic Launcher today.

    I got this error message :

    Access violation - code c0000005 (first/second chance not available)
    VCRUNTIME140
    UE4Editor_Core
    UE4Editor_Core
    UE4Editor_Core
    UE4Editor_Sockets
    UE4Editor_OSC!UOscSettings::AddSendTarget() [c:\users\jerome\desktop\testosc\plugins\osc\source\osc\private\oscsettings.cpp:52]
    UE4Editor_OSC!UOscSettings::InitSendTargets() [c:\users\jerome\desktop\testosc\plugins\osc\source\osc\private\oscsettings.cpp:35]
    UE4Editor_OSC!FOscModule::HandleSettingsSaved() [c:\users\jerome\desktop\testosc\plugins\osc\source\osc\private\oscmodule.cpp:97]
    UE4Editor_OSC!FOscModule::StartupModule() [c:\users\jerome\desktop\testosc\plugins\osc\source\osc\private\oscmodule.cpp:35]
    UE4Editor_Core
    UE4Editor_Projects
    UE4Editor_Projects
    UE4Editor
    UE4Editor
    UE4Editor
    UE4Editor
    UE4Editor
    UE4Editor
    kernel32
    ntdll
    Other projects works fine so I suspect it's the plugin. The project was created following Dannington's tutorial.

    Any help would be greatly appreciated !

    Best

    Jerome

    Leave a comment:


  • replied
    Originally posted by monsieurgustav View Post
    My guess:
    UE4 gooes veeery slooooooooowly when running out of focus. (at least on Windows)
    Maybe there is a setting to fix this...
    Originally posted by catalejo View Post
    Yes, you can set up this on the editor preferences window
    Edit=>Editor preferences => Miscellaneous => Performance => use less CPU when in Background => set it to unchecked

    then the editor is always running at full
    That was it ! It works like a charm now.
    thank you very much !

    Jerome

    Leave a comment:

Working...
X