Randering video via UnrealScript

Discussions about Coding and Scripting

Randering video via UnrealScript

Postby The_Cowboy » Thu May 09, 2019 9:38 am

I have been searching for a while (including Unreal_API) to find a way of rendering videos via unrealscript. The ffmpeg (https://ffmpeg.org/) support would be dope, but that might be asking too much from old engine :lol2:

I remember I saw some cinematic display in some maps back in the day (probably in DM-Morpheus, but only text), so if mappers could help me in verifying that and suggesting next steps, that'd be cool!
The_Cowboy
Average
 
Posts: 45
Joined: Mon Jan 24, 2011 3:22 am
Personal rank: Codezilla

Re: Randering video via UnrealScript

Postby PrinceOfFunky » Fri May 10, 2019 12:45 am

The_Cowboy wrote:I have been searching for a while (including Unreal_API) to find a way of rendering videos via unrealscript. The ffmpeg (https://ffmpeg.org/) support would be dope, but that might be asking too much from old engine :lol2:

I remember I saw some cinematic display in some maps back in the day (probably in DM-Morpheus, but only text), so if mappers could help me in verifying that and suggesting next steps, that'd be cool!

What do you mean with ffmpeg support? Like starting ffmpeg via unrealscript? UnrealScript can run external software/scripts and can also communicate with it even through TCP/IP.
Image
User avatar
PrinceOfFunky
Godlike
 
Posts: 1020
Joined: Mon Aug 31, 2015 10:31 pm

Re: Randering video via UnrealScript

Postby The_Cowboy » Fri May 10, 2019 1:30 am

That is a good question. I apologize for being vague.

Just like ffmpeg handles the audio/video rendering for GoogleChrome (not to mention Youtube and Itunes which implement the library in their workflow) and encoding/decoding for several other softwares, I was hoping the Engine could do something like that. Because the list of ffmpeg supported codecs is so long (as per my study), it can be considered as single unified framework for dealing with the videos part once and for all!

It's all a bit complex, but the simple thing is that I want to be able to play .mp4, .mkv, .avi, .flv etc files in the Engine.
The_Cowboy
Average
 
Posts: 45
Joined: Mon Jan 24, 2011 3:22 am
Personal rank: Codezilla

Re: Randering video via UnrealScript

Postby Feralidragon » Fri May 10, 2019 1:29 pm

I am not sure what exactly you're asking here, but the only way I imagine that you would be able to render real video in UT would be to actually implement it at the rendering level afaik, and you would need to make the full implementation yourself, not of the codecs themselves of course, but using them to then render the video through OpenGL or Direct3D.
Either way, it's no easy task as far as I know, and it's a C++ only task, not UnrealScript.

Other than that, what you have probably seen in DM-Morpheus is just a scripted texture, that is, if I understood your reference correctly, which is only able to render text as you have seen, as well as other textures, and that's it.
In newer engine versions it's also able to render whole 3D scenes of the game, so you can replicate stuff like portals there (like the Portal game), but not in this engine.

From there, if all you want to do is a cinematic sequence in UT, the best way to do that is not through video files, but actually a scripted cinematic sequence within the game, akin to the UT entry map when you first load the game.
Things like text and other stuff can be rendered through Canvas using UnrealScript directly onto the player's screen.
User avatar
Feralidragon
Godlike
 
Posts: 5075
Joined: Wed Feb 27, 2008 6:24 pm
Location: Liandri
Personal rank: Work In Progress

Re: Randering video via UnrealScript

Postby PrinceOfFunky » Fri May 10, 2019 1:56 pm

The_Cowboy wrote:I want to be able to play .mp4, .mkv, .avi, .flv etc files in the Engine.

If you know of a way to turn a picture into a UTX package file, then you can dynamically load it via UnrealScript calling "DynamicLoadObject()" and then call "ReplaceTexture()" on a ScriptedTexture object.
Image
User avatar
PrinceOfFunky
Godlike
 
Posts: 1020
Joined: Mon Aug 31, 2015 10:31 pm

Re: Randering video via UnrealScript

Postby The_Cowboy » Fri May 10, 2019 10:11 pm

As I said, it is expecting too much from the old engine. The actual idea is to conjuncture videos on the server, submitted by the players, when they join the online game (top-bottom corner of client's screen) and generate the WWE entrance environment. One way is ofcourse, converting the video file into some banal texture "sequence" file (like GIF for instance with each image frame with appropriately reduced quality linked together to give the illusion of animation). LogoSplash already has that functionality.

For maverick methodology, one can only hope to combine the code https://github.com/videolan/vlc (which itself is an engine) with UE to achieve the results of highest quality and modularity (I can certainly work on it for UE4) but I am not sure if it can be done with the earlier versions (especially the buggy old gcc they are seemed to be forced upon, or so I heard).

Feralidragon wrote:Things like text and other stuff can be rendered through Canvas using UnrealScript directly onto the player's screen.

Yeah, the thing I was after is the "Marquee" effect on the HUD. Is there a dedicated function for that? If so it could certainly be enhanced. Let me put an easter egg here, which is Mychaeel's scrolling credits routine (the closet I could find to the uscript rendering in UWindows)
UWindowCreditsControl (https://github.com/ravimohan1991/ACEManager/blob/master/Src/Classes/UWindowCreditsControl.uc)

Either way, the answer to the title is most certainly no.
The_Cowboy
Average
 
Posts: 45
Joined: Mon Jan 24, 2011 3:22 am
Personal rank: Codezilla


Return to Coding, Scripting

Who is online

Users browsing this forum: No registered users and 0 guests