Content Aware Meme Effect

Ok… I want to make the content aware meme but as an effect…I’m not sure where to start u know I need to manipulate the UV of certain screen hotspots (like a weird perlin noise of sorts), but I’m not sure where to start!!

I’m going to play around and see how far I can get, but any tips for this are much appreciated lol

Hi @alexis ,

I’m not entirely sure what a “content aware meme” would be but I’ll do my best haha

If I understood correctly then yes, you have to do UVs, let’s say as an example you want to make a fisheye effect which has the user’s face as the center of the “fisheye”:

  1. You should start by taking the texture coordinates and sending it to the fragment stage (compute things pixel by pixel),

  2. Then you can take the face coordinates and divide them by the screen size to get a 0-1 value. And subtract the face value from the texture coordinates to make that the new origin of your coordinate system,

  3. Use the length of the Texture coordinate vector (which will now be somewhere in the -0.5 to 0.5 range) to an idea of how much you need to deform that point,

  4. Use “Power” to displace the different points of TexCoords based on the length, which will make this whole thing non linear - meaning it looks weird and curved,

  5. Add the 0-1 face value back to the now displaced coordinates so that we can use it to sample our texture (the sampling expects values in the 0-1 range),

  6. Sample the camera texture with that,

  7. Record a video of you playing around with it and upload it here :joy:,

  8. Remember to drink some water


Here’s something that might help. I would probably combine a bunch of shaping functions and randomly iterate through them, while slowly increasing the intensity

1 Like

Yes, reading the book of shaders will probably help a lot, it’s one of the resources that has helped me the most.
Note I did the reply above in the “lazy tutorial” fashion but I’m fully open to sending you the project or doing a more in-depth explanation if you want it

1 Like

Yes thank you both!! The book of shaders had been on my reading list for four years haha, I’ll try both of these directions

No need for an in depth tutorial since this is just for fun haha, if I get super stuck I’ll pop back into this thread but I think this is a great start!!