Split media texture into multiple parts for multiple screens

So here’s in a nutshell what I am trying to do: Trying to achieve something similar to what New Retro Arcade:Neon have done with all their arcade screens. Except our screens are not arcade screens but just projector screens.

Steps I have taken to try and achieve this:

Step 1: Made a .mp4 file to have multiple videos in rows and columns.
Step 2: Made a material to show the video and placed material onto an actor (Just has a plane in the actor and it plays the video in the level)
Step 3: Trying to make screen 1 show top left video and screen 2 show second video and screen 3 show third video and so on.

BUT I dont know how to “cut” up the material so that it gets assigned to specific screens or even if I am going about it the right way.

Can someone help me please

If I understand it right, let’s say you have your videos in 5 columns and 4 rows, so 5x4. In this case you should set your TexCoord in your material: Utiling: 0.2, Vtiling: 0.25 (1/5 and 1/4). Then you can change the desired parts by simply offsetting the texture.

Sure.
This is the example of a basic offsetable material as I have it.

Make sure U Offset and V Offset are parameters.

Create an instance of the material and apply it to your screens. You can use the same material for each of them, and offset the material individually for each screen on BeginPlay or on any other event to your liking.

Note that you will have to enter the parameter names manually (or copy/paste).

If you open the material instance and tick those two parameters, you can change them and see the result in your viewport right away, that might help you know how much you have to offset the material. Or you can just calculate it yourself.

Any chance of explaining to me how I go about offsetting a texture on an object?

I managed to get only the top left video to play on an object but I just need to know how to go about making the 2nd video load onto a 2nd object and the 3rd video onto the 3rd object and so forth.

Thanks for your help.

I made my level blueprint like this but for some reason both actors with the plane are still showing the same video

and before you ask. yes both parameters are named to what the level blueprint parameters are set to.

I think your problem is that your WhichScreen is connected to Sequence, and not to the ForEachLoop. This way the WhichScreen cannot get any screen index, or it just gets the default Zero and that’s it. Try connecting it to the ForEachLoop maybe (after ADD)?

Furthermore, it seems to me that this is a bit more complicated than it can be.

I can’t get to understand the logic of this FIND of yours. If an index is in the library, you do not offset the texture (it’s 0 and 0). If it’s not, you offset the texture of the target that’s not in the library, so the texture of nothing in fact. That’s not going to work that way.

I’d try to connect WhichScreen to Switch on Int (or are those Floats? If so, you should really use Integers for Indexes instead). And depending on the Index, offset the texture on the target screen.

If you spend come time you can even create a formula to calculate the offset value automatically based on the index, this way all you have to do in future is assign the required index to a screen and your formula will offset the texture for you. Just a suggestion.

Looked at it again. This way the 0.2 offset will never launch. If the Find result is false, the second branch activates and the Find result is still false, and the second branch launches nothing.

So in your case the texture is always offset by 0-0, so basically nothing happens.

Hey , thanks for the help btw :slight_smile:

I changed the blueprint to what you suggested with the multiple actor references in the level blueprint and worked like a charm.

Thanks so much for the help :smiley:

Now for the hard part. making the vlc media player plugin play the videos properly. At the start of the level when the videos are going through their first video cycle the screens are mostly black and sometimes pixelated and after the video loops it then plays properly.

Any idea as to why the video isnt just playing clearly from the start?

Glad I could be of help.

Sadly, I haven’t worked with videos yet, so I know nothing about that issue of yours. Might it be that the video sometimes doesn’t have enough time to load properly at the beginning? Idk.

yeah im not sure. It’s just weird that it only loads properly after it’s played once already

EDIT: I got it working :smiley: at the start I put Delay > Rewind Media Player (with the media player variable plugged into rewind)

It makes the video restart from the start and then plays it clearly :smiley: