jumpy glow

hi folks!

I noticed something strange when playing around with the glow effect:

When increasing the glow strength gradually it seems to do nothing/not much for quite some time just to suddenly jump in intensity:

It's odd that it seems to happen at exactly 12.5%.

Is this intentional? Or is this some kind of interaction with other effects?

Comments

  • LoopysueLoopysue ProFantasy 🖼️ 39 images Cartographer

    No. There are only 8 steps in 100, so every 12.5 units is a step.

    You can get more subtle effects by setting the Strength to zero and duplicating the effect.

    Fersusroflo1
  • thanks for the advice Sue!

    But now I'm curious: does anyone know why this is an 8 step process? especially when given % values? That's quite misleading...

  • LoopysueLoopysue ProFantasy 🖼️ 39 images Cartographer

    I think it just happened that way as a process of different coders and different ideas over time.

  • MonsenMonsen Administrator 🖼️ 46 images Cartographer

    Originally, the dialog had you input numbers from 0 to 8, but people found that confusing so the scale in the dialog was changed to a more familiar 0-100 scale, but the effect still uses the original scale internally.

    FersusLoopysue
  • I see. Thanks for the Info!

    That explains a lot!

  • jslaytonjslayton Moderator, ProFantasy Mapmaker

    Glow (and Bevel) are some of the very first effects and they have some idiosyncracies that the explicit "Inner Glow" and "Outer Glow" (and "Bevel, Lighted") effects addressed. The reason that the Strength value is in 8 steps is that it's directly representing an arithmetic shift operation in the internal representation and there are 8 bits in a byte. The "Glow" operation is also a blur-based operation, meaning that how it appears when used with thin entities is very different than how Outer Glow or Inner Glow will appear with those same entities:

    The Glow operation is on the right, Outer Glow on the left. At the thin tip and wide corners of the entities, the Glow effect disappears, while the Outer Glow is quite distinct. If you look at the settings for Glow vs Outer Glow, you'll see that Glow just has one "Blur Radius" parameter, while Outer Glow has both a Range and a Blur Radius value. If you turn the Blur Radius to zero for both effects, but leave Range set as above for Outer Glow, you get this:


    (Outer Glow on the left, Glow on the right) which shows the distance calculation used by Outer Glow. Being blur-based also lends it a bit of emphasis on thicker parts of the shapes, which can be what you want sometimes. Being distance-metric-based ensures that all parts are treated generally the same and prevents very thin parts from being lost.

    A lot of common drawing tool (e.g. Photoshop) operations are based on blurs because that was the most readily-available image processing primitive way back when. Distance metric algorithms are much better now than they used to be and there isn't a huge speed discrepancy between blurs and distance field calculations these days (everybody is memory bandwidth limited more than computationally limited). I generally prefer the look of distance-based operations, which is why they show up in the effects that I wrote ("Inner Glow", "Outer Glow", "Bevel, Lighted", "Blur, Alpha", "Edge Fade, Inner", ). There are some older effects that do a rough distance estimate ("Bevel" and "Edge fade"), but their results aren't quite as good as the more precise distance estimates used in the newer effects ("Bevel, Lighted", and "Edge Fade, Inner"):

    Edge Fade, Inner on the left and Edge fade on the right - notice the 45 degree artifacts on the right. The older distance estimates assume that there is only a single edge crossing encountered (that is, the shape is simple and convex) and they are perfect when that assumption is met. These assumptions become really obvious in the case of Bevel, Lighted and Bevel:

    Bevel, Lighted calculates the full height field and then lights it from a specific direction, while Bevel does some rough calculations for a fixed light direction and calls it good. Bevel, Lighted is even a bit faster than Bevel for this case, it seems (9ms for Bevel, Lighted and 5ms for Bevel).

    As a hijack of my hijacking of your thread, REDRAWTIME will show you how much time is spent drawing each sheet and effect in your drawing. It's a useful tool when you're trying to figure out exactly WHAT is slowing down your drawing (it's probably the blur on something).

    FersusMonsenLoopysueJimPWeathermanSwedenroflo1Glitch
  • Oh wow! Thanks for the detailed insight!

    I did wonder why there are multiple glows and bevels and I did recognize that "bevel seems odd" and that the glow effect as troubles with sharp edges.

    Now I know why! That's so helpful! Thanks a lot!

Sign In or Register to comment.