# Texture uses UV, Pixel effect uses Object Texture Coords

My goal here is to be able to rotate the object, and have the image rotate with the UV map, But have the pixel effect rotate relative to an outside object, but given the setup i'm using I don't know how to get it to work

If there's a better pixel effect that supports what I need that works too.

From what i found, I Basically need a setup that gives a pixel effect to a UV Texture coordinate like this:

But I want the Pixels Stay upright relative to an empty (Or the world) I've Tried for multiple hours experimenting with literally every combination of nodes I can think of that could work, But I'm not amazing with math.

If anyone trying to solve this needs any more info on the problem, let me know

Thanks!

• So you mean, you want to keep the rotation even when it's rotated? – Mysticreator Nov 22 '20 at 2:05
• I need the image itself to rotate with the plane, but the pixel effect to rotate with an empty that i will keep upright, or the world – Marux Nov 22 '20 at 2:07
• Oh alright, okay – Mysticreator Nov 22 '20 at 2:07
• Wow, this confused me. I believe it's possible! I can't figure it out for now but there's better pixel effect: imgur.com/a/aBkCwR3 – Mysticreator Nov 22 '20 at 3:39
• Ah yeah I figured out that pixel texture too, But didn't really help me get the effect to work any better. Thanks for trying though, I have no idea why something so seemingly simple is near impossible apparently – Marux Nov 22 '20 at 4:10

Two parts in this node tree:

• Find the rotation of the empty

This is done using two radial gradient textures, one from the UVs one from the empty and get the difference.

As the gradient goes from 0 to 1, there is a discontinuity at the limit. To compensate that we look if this is a negative value and if it is set it back positive adding 1.

Then map from 0, 1 to 0, 2*pi in order to have the angle.

• Use this rotation before snaping

From the angle above, rotate, snap and rotate back.

Note: set the image texture interpolation to closest as snap node may make glitches if not (this is not done in the file below).

• Woah, that's clever :O – Mysticreator Nov 22 '20 at 13:20
• YES THATS PERFECT! There was a little bit of a graphical error in EEVEE which had me worried, but changing the image interpolation to Closest instead of Linear fixed it – Marux Nov 22 '20 at 15:59
• Yes snap alone (no other calculation) does that without closest. – lemon Nov 22 '20 at 16:28