Playing Videos Ingame

Dynamic Material Expressions let you pull off a bunch of neat things, and they’re responsible for the video calls in the Alyx campaign.

The VR Monitor shader has a lot of options you can experiment with. In the interest of not slapping a bunch of Valve’s assets on the forums, I’ve put together a couple simple textures you can plug into some of its parameters.


Filmgrain Control filmgrain_control
Jitter Control jitter_control
Scanlines scanline_control

Vsync vsync_control

Whichever shader you use, all you need to do is edit the dynamic expression and type in any name for the attribute, colorAttr works.

You’ll need to apply this material, either to a model or you can make a mesh in hammer and convert it to a model and place it as a prop_dynamic

In Hammer, you’ll need an info_offscreen_movie_texture. Target any dynamic entity using your material (basically avoid any prop_static entities), and plug in the name of the render attribute. In this case: colorAttr

As far as I know this won’t be something to worry about in sbox but if you’re doing this in alyx you’ll want to make sure your WEBM files are in your addon under the GAME folder, not the content folder. In my case that’s Half-Life Alyx\game\hlvr_addons\test\panorama\videos

Set it to autoplay or set up a way to trigger it ingame and it should work fine.

Experimenting with other shaders and plugging the attribute into other channels can yield some neat results.


How long until someone puts the entire Shrek movie on screen

But seriously, great tutorial and a lot of potential out of it


i can already feel it that someone is doing that now just because of your comment


Great. Now I can put Toddroll in my maps.

1 Like

looks great :heart_eyes:

1 Like

Great tutorial, nice work comrade.

1 Like