Poiyomi Video Shader Overview

Video Statistics and Information

Video
Captions Word Cloud
Reddit Comments
Captions
this is the overview and tutorial video for play ohmy video shader so basically how it works is you use the video player like you would normally but the video player then propagates or like it sends the texture to all of the other shaders in the world all of these screens actually do different things you can see the global illumination over here screens lighting up the ground you can actually see the pixels on the ground as well as on all the screens and you get really close for example this is a CRT screen and you can see you can start to see the scan lines hopefully and you can really adjust the settings so scan lines work however you want they actually do go from left to right slowly and then the pixels fade out there is projector modes so you can use it like a projector the room is a little bit bright so your projectors like I might work very well you have the TN panel where if you like look up at it it's sort of necessary if you look up at it the colors get higher contrast and if you look down at it they'll get lower contrast and then if you go to the side it actually shifts the colors like a TN panel this one's just an LCD panel so you're not gonna get like deep blacks with this this one is the OLED as well as that one and these 3 some basic masking and this one is pretty much what a default video player looks like it's still using the shader but that's that and you can do cool stuff like it's on my socks so the video is actually playing on my socks right now it's kind of hard to tell because the videos have a lot of movement no there you go it's pretty neat and let's get into these settings before we get into the settings this is available to all $10 plus patrons right now if you want to check it out there's a link in the description below and if you want to come to this world and try it you can just go to toyomi TB test give it a try before you buy alright now let's do the settings the settings for this are fairly straightforward so this shouldn't be a super long video but you know they always seem to get a little longer than I intend try to go fast so first thing you want to do when you're using this is if you go into your video texture settings there's actually a video debug here so obviously don't want to be super brain way like that I'm just gonna grab a random texture like this and now you can see the screen is using this the reason you need this is because you're not gonna be able to test the video unless you're actually in the game so this just kind of gives you something to work with and then you can come in here you can add a mask so if I just search for noise you can mask out parts of the video if you want and they'll show the texture underneath this has the full toon shader like most shaders I make it doesn't having the toon shader and it does not slow it down just so you know it like it slows it down a little bit but it's not gonna cause huge issue because anything you're not using is not gonna be loaded so first things first let's cover the pixel texture so I include a few pixels it's just called pix underscore whatever so there's LCD IPS CRT OLED I'm just gonna pick LCD and by default is just gonna be massive like that so you want to set the resolution I think the resolution actually defaults to 1280 by 720 not how you saw it there and then if you get in close you can actually see the pixels and they do work properly ish they're not perfect but if I change to say where's the debug here go if I change the picture you can see that the pixels do you actually light up and get darker based on the image on the screen so if I am right here that's kind of like a bright spot but if I go up here into the blue area where there's not a lot of colors you the blue pixels are a little bit brighter than the green pixels are basically off they're not all the way off because there's still a little bit of green in there but you get it so you can tile the video I think right now so you can't tile if you're pixelating to the resolution and what pix lighting to the resolution does is it basically it takes this picture and then kind of makes it so that it's it's chunky and each spot is like one pixel so if I pixelated or if I take this and I set it to some low resolution like 128 by 72 you can see when I pick slate it's probably gonna look really bad yeah so it actually picks leaves it so that it matches the pixels now it's not gonna work for all the pixels because some of them are really complex but if you just want these basic LCD pixels you can totally do this and as you change the resolution it will get less blurry and if you don't want that at all you can do that now the pixels are entirely optional you don't need them can make it look like a normal video player and you'll see that it gets brighter when you remove the pixels and that's just because the pixels have black in between them so you're not gonna get as bright of an image as if you just have a giant emissive texture so there's the mask we covered that you can pan the mask we didn't cover that so if I had this mask for example you could just set a pan speed then it would pan and if you had a normal texture underneath it like this you would see the texture underneath and then the video where it's being cut out so if I pick a more obvious texture like this you can see the texture underneath and the video where the mask is white so black is no video in white is video I'm just gonna remove this so there there are six video types there's LCD TN CRT OLED Gameboy and projector and I tried to get them as close to their real-life counterpart as possible so if I click this this is right now set to Gameboy so I'm going to turn on the debug mode and I'm gonna grab just a random extra again like this and you'll see that the texture looks pretty weird that's because it's actually using the brightness of the image to sample this gradient so say I wanted darks to be black and lights to be white I could do this and then if I wanted to kind of have a smooth gradient maybe I wanted a black and white image I could do that or I could invert the image and you probably noticed it was called game boy that's because I included the game boy colors so if we pick the game boy ramp you're gonna get those game boy colors and then if you pixelate to resolution and lower the resolution to do something small you get that sort of game boy look now it'll look better in game obviously but it works and you can change the image around and try other stuff it's pretty neat so that covers that the individual settings here I'm not going to cover all of them basically LCD has a backlight so it can't go purely black TN has color shifting CRT has scan lines that go across I can show you those cuz they're actually interesting so we can go into the CRT settings down here the CRT options we're gonna need to enable a texture so I'm just going to grab one like this it looks like it's going pretty crazy right now you can lower the refresh rate quite a bit so it slows down go even slower and then I'm gonna lower the resolution so you can really see the scan lines and now you can actually see if I lower it even more you can see the scan lines actually go across the screen and then the pixels fade out so the pixel fade time is based on how long it takes to do an entire frame so if you set this to 0.9 the screen is going to be 90% lit if you set it to 1 it means it will by the time the pixel hits a pixel it already drew last frame it will be fully dark and if you want it to look sort of CRT you can set it to like 1.9 and then increase the frame rate and you'll kind of get that like scanline look so what's happening here is it's just always lit but there's certain parts that are darker right before the pixel refreshes it looks pretty neat change this back because it was an example and that covers the CRT settings so there's panning tiling and offset they work about how you would expect you can pan maybe you can not and okay tiling works I don't have to look at that the offset is just a texture offset simple enough you can adjust the saturation you can lower the saturation you can contrast boost it's pretty neat so you could totally have all of these hooked up to a UI in your world so you wanted to increase the contrast a little bit or you had a specific video that looked really good with higher contrast like a like an OLED demo or something like that can do that and you can change the UVs so if I had say this is just a plane and I wanted I didn't want it to cover like the entire plane like you see here I just wanted to cover a separate area so I can go into blender and it can make a second UV and then change the via this till say UV 1 which is the second UV because it starts at zero and then it just Maps it to this UV and you'll find that a lot of shapes in unity have multiple UVs you can mess around with the basic ones especially so if I were to enable this and then just like a random image on there I switch the UV for this it'll change pretty dramatically just because a lot of stuff has different you v's I think that basically covers the shader now I'm gonna cover how to get it to actually work because your basic video player is not gonna just work out of the box you need some adjusted settings and I have included a just a basic prefab you can drop in your world you can just drag this video player into your world and it will just work so if I go over to the shader a million folders open if I go to 0.0 me shaders right here I go to patreon and into the poi video file our folder you can see video player prefab here and there's just a prefab can drop that into your world wherever you want and it will just work that's all there is to it and once you press play it'll go to everything using this texture as long as enable video is selected clamp TV is just clamps to your UVs so it does not leave the UV so if you have like a second UV map I guess you can it would generally still go over the edge but with this will not so you can see how there's like a second UV in the background and if you clamp it it sticks inside alright so how this video player actually works is sort of complex it was actually said I got a lot of help from scruffy rules I will link to his github in the description but I can show you what it looks like real quickly he basically has the code for implementing this in other shaders and the files you need it's a pretty good explanation so feel free to check that out he's done a lot of cool stuff for this game and he helps me out all the time so how this works is in the spawn video somewhere let me just find this sync video player so right here in the sync video player there is a render texture and you can see the target texture right here that is this texture so if you wanted to change your video settings there like the texture settings that's showing up on everything you can mess with this and it will change for everything so the video renders to that texture and then it sort of uses the stuff that scruffy made to pass that texture to all of the shaders in the world and if the shader has the specific naming convention so like this one has there's a variable in the shader named whatever the texture is named and it'll pass into that variable and then you can draw it on your shader so this has the full toon shader as you saw in the game let me see if I can find the game when I look down I can see the video on my pants and there's lots of cool stuff that you can do with this so say you had a world where you had like a video player in one place but you wanted to take TVs around the room or you wanted like an iPad you could take around and watch videos on you can totally do that or project videos on the environment or whatever you want it's kind of how the volt Club works if you've been there so it's pretty neat and there's a few maps that are already using this tech so if you put the shader on your avatar and go to room of rain for example it'll play the videos on your avatar it's a neat little thing it's a popular map and I hope more map makers start using this I think that basically covers everything so if you have any questions about this or anything else I'll leave a link to my discord in the description below feel free to check it out the shader is available right now to all $10 plus patrons and there's also a link for that in the description below thank you for watching hope you learn something
Info
Channel: poiyomi
Views: 4,443
Rating: undefined out of 5
Keywords: poiyomi
Id: -Wvs8IPlItA
Channel Id: undefined
Length: 16min 6sec (966 seconds)
Published: Sat Oct 19 2019
Related Videos
Note
Please note that this website is currently a work in progress! Lots of interesting data and statistics to come.