Hello there!
This question is essentially a duplicate of [this closed [Content removed] which was closed without a satisfying answer.
I did the same steps as described in that question and got the same result, subtitles are not displayed.
I did some debugging to narrow down the issue:
In UBinkMediaPlayer::Open, the subtitles file is found and loaded successfully, CurrentHasSubtitles is set to 1.
When the subtitles are supposed to be displayed in UBinkMediaPlayer::Tick(), the while condition in line 519, while(const char *sub = BinkPluginCurrentSubtitle(bnk, &i)) never becomes true, so the subtitles aren’t added. At this point I had to stop debugging because BinkPluginCurrentSubtitle() is part of the pre-compiled bink binaries.
Any advice or information on this is welcome.
On a sidenote, I noticed that BinkforUnrealEngine.pdf located next to Bink2ForUnreal.exe outlines the steps needed to add your own subtitles. Is this the recommended way anyway?
Can you send me an example project? Did you use the proper language extension?
Hi, you can find an example project attached. It’s using 5.5.4. From looking through the release notes, I don’t think 5.6 would behave differently.
To test it, open the Bink Media Player in Content/Movies and start the PIE mode.
In the meantime, I did find the subtitles:
[Image Removed]They are displayed, but not visible because the bink video is rendered on top. When adjusting the viewport size, the video is hidden, and the subtitles become visible. I don’t know how the order in which video and subtitles get drawn can be adjusted, but I don’t think the current order is intentional.
I think whats going on is there is a rendering order issue with Overlays. Thus for a quick work-around you could RenderToTexture instead and draw a quad with that texture.
Is there a way to modify the order of display of the bink video overlay and Subtitle manager to draw the subtitles in front? I tried modifying both
SUBTITLE_SCREEN_DEPTH_FOR_3D in SubtitleManager.cpp and passing a different depth for BinkPluginScheduleOverlay(bnk, ulx, uly, lrx, lry, 0) //<- replaced 0 with both 1 and -1
in BinkMediaPlayer.cpp
But no luck so far, is the bink video drawn over the whole viewport no matter what when it’s not being drawn to texture?
I did manage to solve the issue by modifying the engine
inside GameViewportClient.cpp
before rendering the UI I added a broadcast call
inside of BinkMediaPlayerModule.cpp I bind to it instead of the OnDraw
this way the video is rendered before any UI stuff.
Probably not the best way to make it work, but it’s a working one.