5
$\begingroup$

I followed Jonathan Kron's tutorial on creating an LED-display shader. It basically multiplies together your desired image with a grid of little RGB images. It looks great when zoomed in, but when the camera / 3D view zooms out, the "lit" LEDs disappear (shader graph at the bottom):

Zoomed in (red image) Zoomed out (red image)

I would expect that they'd still be viewable, just a little more dim. To my surprise, this problem does not happen when I change the color of the "LED image" from red to green:

Zoomed in (green image) Zoomed out (green image)

Why does this happen? How can I keep the red color showing when the camera / 3D view zooms out?

Shader graph

$\endgroup$
6
  • 1
    $\begingroup$ Maybe due to aliasing, the LED texture at this scale becomes completely green? 🤔 $\endgroup$ Apr 5, 2021 at 10:41
  • 1
    $\begingroup$ Your led-check.png image doesn't have any Texture Coordinates connected so it will default to using UVs while the other images use Generated. I don't see how that could cause the texture to disappear at a distance, but it was the first thing that jumped out at me from your screenshot. $\endgroup$
    – gcs_dev
    Apr 5, 2021 at 11:40
  • 1
    $\begingroup$ Also, the keyframed Fac of the Color Mix node is a negative value, that could cause some unexpected behaviour. $\endgroup$
    – gcs_dev
    Apr 5, 2021 at 12:04
  • $\begingroup$ @gcs_dev thanks those are both good guesses; unfortunately, fixing those does not solve the problem $\endgroup$
    – Benjamin
    Apr 5, 2021 at 12:16
  • $\begingroup$ @MarkusvonBroady I tried playing with the values in Preferences > Viewport but unfortunately, none of them seemed to affect it. $\endgroup$
    – Benjamin
    Apr 5, 2021 at 12:20

1 Answer 1

4
$\begingroup$

This may have to do with the downsampling of the filter ('led-rgb') image.. I've made a node-group which makes the 'Trinitron' filter procedurally, instead:

enter image description here

  • By wrapping the scaled UV space into 0-1 cycles, it produces square UV tiles, 0-1 per tile. ('in-pixel UV')
  • By subtracting that from the smooth UV, we get a per-tile UV coordinate, at scale. That's scaled back down to an overall 0-1 to look up the color in the image(s). ('pixellated UV')
  • The 'in-pixel UV' X generates R,G and B strips per square tile, using the color ramp
  • The 'in-pixel UV' X,mod(1/3), and Y, are compared to 0 to generate black bars between the RGB strips, and the tiles. ('X Bar' and 'Y Bar')
  • The X Bars, Y Bars, and RGB strips are multiplied with the image to be depicted.

With this effect:

enter image description here

Used with solid green and red logos, it seems to stand up to Level-of-Detail resampling OK:

enter image description here

$\endgroup$
4
  • 1
    $\begingroup$ This works great, although "wrap" seems to be missing from my math node, so "modulo" worked alright. $\endgroup$
    – Benjamin
    Apr 6, 2021 at 4:03
  • $\begingroup$ Hi, @Benjamin! Thanks! Sorry, yes. That's Vector Math > Wrap, there in 2.8x. The only reason to use it is that it's an all-positive sawtooth, where Modulo dips into the negative with numerators below 0. 'Generated' never does, so that's OK, here. $\endgroup$
    – Robin Betts
    Apr 6, 2021 at 6:03
  • $\begingroup$ @batFINGER Thanks! I guess we .. er.. I, have to be of a certain age.... $\endgroup$
    – Robin Betts
    Apr 6, 2021 at 8:29
  • $\begingroup$ Throw this I in too. Huge blast from past seeing Trinitron together with the RGB colorramp. Wonder what the age is that the q Who or what is Trinitron? rings no bells. $\endgroup$
    – batFINGER
    Apr 6, 2021 at 8:41

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .