Re: Metallic effect
Posted: 2013-09-29T20:38:47-07:00
Snibgo... why the two separate blurs on the inptu text? I understand one blur, or even a linear blur, but not the two blurs.
Use https://github.com/ImageMagick/ImageMagick/discussions instead.
https://imagemagick.com/discourse-server/
https://imagemagick.com/discourse-server/viewtopic.php?t=23904
Code: Select all
-sparse-color Bilinear "0,0 White %%[fx:w-1],0 White 0,%%[fx:h-1] Black %%[fx:w-1],%%[fx:h-1] Black"
Okay I understand. it is simply a rounding blur and threshold (using level) followed by the actual blur for the metalllic effect.snibgo wrote:The idea in the Gimp tutorial was that the first blur rounds the ends of the letters. The level could be a threshold. For the metallic effect, the important part is the second blur (added to whatever blur effect remains after the "level").
snibgo wrote:Since writing that script, I have realised that it doesn't need "identify" to find the size. I used that for the "gradient:", which needs "-size", but instead I can clone the image and useCode: Select all
-sparse-color Bilinear "0,0 White %%[fx:w-1],0 White 0,%%[fx:h-1] Black %%[fx:w-1],%%[fx:h-1] Black"
Code: Select all
-sparse-colors Barycentric "0,0 White 0,%[fx:h-1] Black"
Code: Select all
# Generate a blured input font shaped mask
# first blur-level is a rounding or 'puddling' effect
# the second blur is the important one for the metallic effect.
convert -background none -pointsize 160 -font Candice label:" Anthony " \
-blur 0x5 -channel A -level 40%,60% +channel \
-blur 0x3 metallic_input.png
# Metallic Color Lookup Table
convert \
-size 1x1000 gradient: -gamma 0.9 \
-function Sinusoid 2.25,0,0.5,0.5 \
\( gradient:'rgb(100%,100%,80%)-black' -gamma 1 \) \
+swap \
-compose Overlay -composite \
-rotate 90 \
metallic_clut.png
# Give blurred font a metallic look
# * first create a vertial gradient
# * then merge this with a 'shade' reflective gradient
# * before applying the color to the resulting gradient
# * finally add a shadow.
convert metallic_input.png -set colorspace RGB \
\( -clone 0 -alpha off \
-sparse-color Barycentric "0,0 White 0,%[fx:h-1] Black" \
-alpha on \
\) \
\( -clone 0 -alpha extract -shade 135x45 -auto-gamma -auto-level \
-alpha on -channel A -level 0%x10% +channel \
\) \
-delete 0 -compose Overlay -composite \
metallic_clut.png -clut -set colorspace sRGB \
\
\( +clone -background navy -shadow 80x2+5+5 \
\) +swap -background None -compose Over -layers merge \
\
-trim +repage metallic.png