So I’ve been trying to achieve this effect for fading in/out my actors in plain view of the camera so that it doesn’t look like they just “pop in” at spawn. After a lot of looking around and trying out a few things, i came to the conclusion that an opaque material with masking was the way to go.
I could go for a random noise-like pattern that expand throughout the actor’s surface, which then makes the actor visible, but I’m trying to achieve a more stylized effect. If anyone’s familiar with MGSV you’ll have seen how elements fade in with a sort of dithering like pattern. SpecificallyI want to use an old pixel art technique for masking:
My first test was to use a single texture, UV map it using screen-based UVs and tile it up the appropriate amount of times on U and V, and pipe it into the opacity mask. This all worked perfectly using this texture:
My next step was to change up that texture sequentially (as animation frames), and I simply couldn’t get this to work. I’m using the following “sprite sheet”
I tried using the flipbook function in my material, but the problem I keep having is that I can’t adjust the UV tiling after I have sampled an individual frame of the animation. That is, I can’t retrieve an individual frame of the flipbook, THEN UV map that tiling across the screen…
My fallback is simply using the DitherTemporalAA function and just feed it an alpha value (0.0-1.0). This works like a charm, but i have no control over the pattern it produces (it looks good tho, so i might just stick to it)
- Is there a better approach for fading in actors into plain view?
- Is my attempt to produce my own dithering a bad approach?
- If not, how can I make the tiling work as intended?
- If I were to stick to using the DitherTemporalAA function, are there any repercussions that I’m not considering? Can this effect be turned off by the user somehow (I wouldn’t want that to happen, but I want it to be an effect present in all clients).