5
$\begingroup$

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 workenter image description here

enter image description here

enter image description here

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:

enter image description here enter image description here

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!

$\endgroup$
5
  • $\begingroup$ So you mean, you want to keep the rotation even when it's rotated? $\endgroup$ – Mysticreator Nov 22 '20 at 2:05
  • $\begingroup$ 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 $\endgroup$ – Marux Nov 22 '20 at 2:07
  • $\begingroup$ Oh alright, okay $\endgroup$ – Mysticreator Nov 22 '20 at 2:07
  • $\begingroup$ 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 $\endgroup$ – Mysticreator Nov 22 '20 at 3:39
  • $\begingroup$ 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 $\endgroup$ – Marux Nov 22 '20 at 4:10
5
+100
$\begingroup$

enter image description here

Two parts in this node tree:

  • Find the rotation of the empty

enter image description here

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

enter image description here

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).

enter image description here

$\endgroup$
3
  • 1
    $\begingroup$ Woah, that's clever :O $\endgroup$ – Mysticreator Nov 22 '20 at 13:20
  • 1
    $\begingroup$ 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 $\endgroup$ – Marux Nov 22 '20 at 15:59
  • $\begingroup$ Yes snap alone (no other calculation) does that without closest. $\endgroup$ – lemon Nov 22 '20 at 16:28

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.