TouchDesigner / TouchEngine-UE

The TouchEngine-UE plugin allows UE developers to load TouchDesigner components within UE while relying on the TouchEngine API.
Other
171 stars 11 forks source link

TouchEngine plugin and MRQ #138

Closed oliver-ellmers-dimension closed 1 month ago

oliver-ellmers-dimension commented 2 months ago

Is it possible to use the TouchEngine plugin in conjunction with the Movie Render Queue (MRQ)?

In my current setup, I am using the UE Level Sequence Director BP to feed the current frame index of the level sequence into a TouchEngine Actor BP, that is sending the current frame index to an external TouchDesigner project via the syncOUT and syncIN CHOP's.

The frame data is then being used to control playback of video that is being sent back into another TouchEngine Actor BP over Spout, which is then applied to a dynamic material instance in the level.

This all works well in editor mode when scrubbing or playing back the level sequence, but when I try to render the level sequence in MRQ - it appears that the TouchEngine Actor is not sending or recieving data while rending out of MRQ

jetXS commented 1 month ago

Hey @oliver-ellmers-dimension,

I am not so familiar with those specific features of Unreal so that'd be helpful if you could share a sample project with things being setup as you think they should work in the latest version of Unreal + TouchEngine. Or perhaps just a sample fork of the sample project, with minimum external dependencies.

First thoughts would be that the TouchEngine Actor tick is not being triggered for some reason when using MRQ, and that it'd be a feature request for the plugin dev team, if at all doable.

You can reach out via email if you rather deal with it via support rather than here.

Best, Michel

oliver-ellmers-dimension commented 1 month ago

Hey Michel,

I think I may have found where the probnlem might be in our setup - something I was not aware of that is more to do with the Unreal Engine side of things that to do with TouchEngine itself...

When rendering using MRQ - UE spins up a completely new instance of the curent level to genrerate content from. This in turn spins up a separate instance of the TouchEngine plugin under the hood (noticed this in Task Manager) which I guess is where my networking hooks for the Sync IN/OUT CHOP's and other networked comms are getting confiused.

I will create another test to try and mitigate this and feedback here.

Best, O.

oliver-ellmers-dimension commented 1 month ago

To confirm - MRQ spins up a new instance of the TE. This meant that my Sync I/O Chops were not pairing.

A bit of a hacky workaround for this is to set the TouchEngine Actor in the level NOT Allow Running in Editor and NOT Load on Begin Play, and then use the LS you wish to render in MRQ to Start TouchEngine via the Level Sequence Director Blueprint.

As this will start the engine, it needs some time to be 'ready' before you can make use of it - to get around this, I am not feeding any data in or pulling any out of the TE component until the engine is ready, but triggering its start a good 1000 frame before I want any decent rendered content out of my level sequence.

Hacky - but works,

I think this is more of an Unreal Engine thing - but what would be ideal, is if you could fire off some event in the LSD BP that pauses the MRQ until TouchEngine is 'ready'

jetXS commented 1 month ago

but what would be ideal, is if you could fire off some event in the LSD BP that pauses the MRQ until TouchEngine is 'ready'

I will keep this RFE in mind for future development. Thanks for digging and thanks for the feedback.