How to mirror-tiling camera texture using UV?

Hi, can someone teach me or show me how to mirror-tiling camera texture using UV in patch editor?
I know how to tile it using modulo, but I’m confused on how to make both U and V mirrored. I tried using mirror shader from the spark ar library but it only mirrors the U, and when i tried to mirror shader it again, it shows an error saying something about limit or something (I forgot the exact sentence).

For image texture i know we can just choose it from the properties panel Tiling Mode, but since camera texture doesn’t have that, I feel like there’s gotta be a way to replicate that behaviour using UV in patch editor. Can someone help me?

I also tried this method, but it doesn’t look right in spark:

I know I’ve done it before but I can’t find the example. Anyway, I think my graph thing in this other thread is a good place to start.

2 Likes

omg yes! nailed it! I tried using sine and it works but since its a curve there is a slight distortion. i was looking for triangle wave formula for hours like an idiot but still can’t find it. omg thanks man! how can i forgot about that thread.

anyway do you have any website recommendation to see various type of wave?

I think Josh posted a resource about that here on the Labs, try to search for “waves” or “math”

1 Like

Here you go! GraphToy Function Explorer

1 Like

@Adi_Satrio can you share with us how you mirrored camera texture? I’m trying to do this for spherical images, I tried with tiling options Tile and Offset it works but I need to work with media gallery. I added 2D transform texture but it doesn’t work.

Any ideas?

Yes I’ll share how i do it when I’m home. I didn’t bring my laptop with me now. But It’s basically using a modulo of the uv (function vec 2 to a composition patch) and modulo it again with some basic math to invert the texture coordinate like in @josh_beckwith’s solution from another thread where it creates 1 single pingpong line (0 to 1 to 0 in y axis in a 0 to 1 x axis.) Then just let the original texture passes that patch, and you’ll be able to use 2d transform patch to scale it or do any other uv manipulation from a mirror-tiled texture.

1 Like

As promised, this is how I mirror-tile camera texture in patch editor:




UV MIRROR TILE.arp (22.7 KB)

If someone has a better method or has a way to optimize it, please let us know.
Also, if someone download this patch and use it in your project, i will really appreciate a little shoutout in your story by trying out my filter and tag/mention me on instagram. my ig: @crimpproduction

Don’t forget to follow @popul_ar.experience instagram account and share this platform to help this amazing platform for creators by creators grows! :fire::fire::fire::fire::fire:

2 Likes