Randering video via UnrealScript

Discussions about Coding and Scripting
User avatar
The_Cowboy
Experienced
Posts: 143
Joined: Mon Jan 24, 2011 3:22 am
Personal rank: Codezilla

Randering video via UnrealScript

Post by The_Cowboy »

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!
Feralidragon wrote:Trial and error is sometimes better than any tutorial, because we learn how it works for ourselfs, which kills any doubts about anything :tu:
Patreon: https://www.patreon.com/FreeandOpen
User avatar
PrinceOfFunky
Godlike
Posts: 1192
Joined: Mon Aug 31, 2015 10:31 pm

Re: Randering video via UnrealScript

Post by PrinceOfFunky »

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.
"Your stuff is known to be buggy and unfinished/not properly tested"
User avatar
The_Cowboy
Experienced
Posts: 143
Joined: Mon Jan 24, 2011 3:22 am
Personal rank: Codezilla

Re: Randering video via UnrealScript

Post by The_Cowboy »

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.
Feralidragon wrote:Trial and error is sometimes better than any tutorial, because we learn how it works for ourselfs, which kills any doubts about anything :tu:
Patreon: https://www.patreon.com/FreeandOpen
User avatar
Feralidragon
Godlike
Posts: 5477
Joined: Wed Feb 27, 2008 6:24 pm
Personal rank: Work In Progress
Location: Liandri

Re: Randering video via UnrealScript

Post by Feralidragon »

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
PrinceOfFunky
Godlike
Posts: 1192
Joined: Mon Aug 31, 2015 10:31 pm

Re: Randering video via UnrealScript

Post by PrinceOfFunky »

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.
"Your stuff is known to be buggy and unfinished/not properly tested"
User avatar
The_Cowboy
Experienced
Posts: 143
Joined: Mon Jan 24, 2011 3:22 am
Personal rank: Codezilla

Re: Randering video via UnrealScript

Post by The_Cowboy »

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/ACEMan ... Control.uc)

Either way, the answer to the title is most certainly no.
Feralidragon wrote:Trial and error is sometimes better than any tutorial, because we learn how it works for ourselfs, which kills any doubts about anything :tu:
Patreon: https://www.patreon.com/FreeandOpen