It is currently Tue Aug 18, 2026 6:55 pm


All times are UTC - 5 hours [ DST ]



Post new topic Reply to topic  [ 38 posts ]  Go to page Previous  1, 2
Author Message
 Post subject: Re: help me decipher the 'Satin' effect, pls
PostPosted: Thu Feb 14, 2013 10:54 am  (#21) 
Offline
GimpChat Member
User avatar

Joined: Jul 17, 2012
Posts: 2769
fluffybunny wrote:
1. Create "Text" layer
2. Add new "Satin Effect" layer in Normal Mode above Text layer.
3. Add new "Satin Effect 1" layer in Difference Mode above "Satin Effect" layer.
4. Fill "Satin Effect" layer with White.
5. Fill "Satin Effect 1" layer with White.
6. Alpha to Selection the "Text" layer
7. Set the Background colour to Black
8. Fill the selection on the "Satin Effect" layer.
9. Fill the selection on the "Satin Effect 1" layer.
10. Offset the "Satin Effect" layer by the calculated offset.
11. Offset the "Satin Effect 1" layer by the negative of the calculated offset.
12. Merge Down the "Satin Effect 1" layer into the "Satin Effect" layer.
13. Add a Black layer mask to the "Satin Effect" layer.
14. Select the layer mask and fill the selection with White.
15. Select None.
16. If Invert has been chosen Invert the "Satin Effect" layer. Colors->Value Invert ?
17. Copy the "Satin Effect" layer.
18. Paste it into the "Satin Effect" layer's mask.
19. Anchor the floating selection.
20. Apply the mask.
21. Create a new Black mask for the "Satin Effect" layer.
22. Alpha to Selection the "Text" layer
23. Fill the "Satin Effect" layer's mask with White
24. Alpha to Selection the "Satin Effect" layer.
25. Set the background colour to the chosen colour.
26. Fill the selection on the "Satin Effect" layer.
27. Select None.
28. Gaussian Blur the "Satin Effect" layer using IIR mode.
29. Set the Opacity of the "Satin Effect" layer.
30. Set the layer mode of the "Satin Effect" layer.
still working on this, there is one step missing after 15: colortoalpha (255 255 255)
but the rest seems to be spot on

excellent !!


Top
 Post subject: Re: help me decipher the 'Satin' effect, pls
PostPosted: Thu Feb 14, 2013 9:23 pm  (#22) 
Esper wrote:
fluffybunny wrote:
1. Create "Text" layer
2. Add new "Satin Effect" layer in Normal Mode above Text layer.
3. Add new "Satin Effect 1" layer in Difference Mode above "Satin Effect" layer.
4. Fill "Satin Effect" layer with White.
5. Fill "Satin Effect 1" layer with White.
6. Alpha to Selection the "Text" layer
7. Set the Background colour to Black
8. Fill the selection on the "Satin Effect" layer.
9. Fill the selection on the "Satin Effect 1" layer.
10. Offset the "Satin Effect" layer by the calculated offset.
11. Offset the "Satin Effect 1" layer by the negative of the calculated offset.
12. Merge Down the "Satin Effect 1" layer into the "Satin Effect" layer.
13. Add a Black layer mask to the "Satin Effect" layer.
14. Select the layer mask and fill the selection with White.
15. Select None.
16. If Invert has been chosen Invert the "Satin Effect" layer. Colors->Value Invert ?
17. Copy the "Satin Effect" layer.
18. Paste it into the "Satin Effect" layer's mask.
19. Anchor the floating selection.
20. Apply the mask.
21. Create a new Black mask for the "Satin Effect" layer.
22. Alpha to Selection the "Text" layer
23. Fill the "Satin Effect" layer's mask with White
24. Alpha to Selection the "Satin Effect" layer.
25. Set the background colour to the chosen colour.
26. Fill the selection on the "Satin Effect" layer.
27. Select None.
28. Gaussian Blur the "Satin Effect" layer using IIR mode.
29. Set the Opacity of the "Satin Effect" layer.
30. Set the layer mode of the "Satin Effect" layer.

still working on this, there is one step missing after 15: colortoalpha (255 255 255)
but the rest seems to be spot on

excellent !!

Hi Esper,

I beg to differ.
In the script you will notice that the call to the plug in 'color to alpha' is preceeded by a ';'. This means that everything after the ';' on that line is treated as a comment and not processed.
Coders often do this while testing debugging so they can easilly toggle blocks of statements on or off.

fluffybunny


Top
 Post subject: Re: help me decipher the 'Satin' effect, pls
PostPosted: Fri Feb 15, 2013 6:10 am  (#23) 
Offline
GimpChat Member
User avatar

Joined: Jul 17, 2012
Posts: 2769
fluffybunny wrote:
Hi Esper,

I beg to differ.
In the script you will notice that the call to the plug in 'color to alpha' is preceeded by a ';'. This means that everything after the ';' on that line is treated as a comment and not processed.
Coders often do this while testing debugging so they can easilly toggle blocks of statements on or off.

fluffybunny
i stand corrected, thanks for clearing that up :bigthup

yesterday i tried to learn a bit about script language via the console, but i find it pretty difficult, so good to have you here to translate stuff for me :clap

at this point im not even 100% sure the satin technique i presented in the tutorial is correct, but the effect looks right, so ill leave it as it is right now

do you think you could have another go at the Jonathan Stipe version of the satin effect ?
because the result looks different, in comparison to the FX-Foundry that you already translated

here is the code:
(define (script-fu-layerfx-satin img
             drawable
             color
             opacity
             mode
             offsetangle
             offsetdist
             size
             contour
             invert
             merge)
  (gimp-image-undo-group-start img)
  (let* ((origfgcolor (car (gimp-palette-get-foreground)))
    (origselection (car (gimp-selection-save img)))
    (layername (car (gimp-drawable-get-name drawable)))
    (growamt (math-ceil (/ size 2)))
    (lyrgrowamt (math-round (* growamt 1.2)))
    (satinlayer (car (gimp-layer-new img (+ (car (gimp-drawable-width drawable)) (* lyrgrowamt 2)) (+ (car (gimp-drawable-height drawable)) (* lyrgrowamt 2)) (cond ((= (car (gimp-image-base-type img)) 0) 1) ((= (car (gimp-image-base-type img)) 1) 3)) (string-append layername "-satin") 100 0)))
    (satinmask 0)
    (blacklayer 0)
    (drwoffsets (gimp-drawable-offsets drawable))
    (ang (* (* (+ offsetangle 180) -1) (/ (* 4 (atan 1.0)) 180)))
    (offsetX (math-round (* offsetdist (cos ang))))
    (offsetY (math-round (* offsetdist (sin ang))))
    (alphaSel 0)
    (layeraoffsets 0)
    (layerboffsets 0)
    (dx 0)
    (dy 0)
    (origmask 0)
    (alphamask 0)
   )
    (add-over-layer img satinlayer drawable)
    (gimp-layer-set-offsets satinlayer (- (car drwoffsets) lyrgrowamt) (- (cadr drwoffsets) lyrgrowamt))
    (gimp-selection-all img)
    (gimp-palette-set-foreground '(0 0 0))
    (gimp-edit-fill satinlayer 0)
    (gimp-selection-none img)
    (gimp-selection-layer-alpha drawable)
    (if (> (car (gimp-layer-get-mask drawable)) -1)
       (gimp-selection-combine (car (gimp-layer-get-mask drawable)) 3)
    )
    (set! alphaSel (car (gimp-selection-save img)))
    (draw-blurshape img satinlayer size growamt alphaSel 0)
    (plug-in-autocrop-layer 1 img satinlayer)
    (set! satinmask (car (gimp-layer-copy satinlayer 0)))
    (add-over-layer img satinmask satinlayer)
    (gimp-layer-translate satinlayer offsetX offsetY)
    (gimp-layer-translate satinmask (* offsetX -1) (* offsetY -1))
    (set! layeraoffsets (gimp-drawable-offsets satinlayer))
    (set! layerboffsets (gimp-drawable-offsets satinmask))
    (set! dx (- (max (car layeraoffsets) (car layerboffsets)) (min (car layeraoffsets) (car layerboffsets))))
    (set! dy (- (max (cadr layeraoffsets) (cadr layerboffsets)) (min (cadr layeraoffsets) (cadr layerboffsets))))
    (set! blacklayer (car (gimp-layer-new img (+ (car (gimp-drawable-width satinlayer)) dx) (+ (car (gimp-drawable-height satinlayer)) dy) (cond ((= (car (gimp-image-base-type img)) 0) 1) ((= (car (gimp-image-base-type img)) 1) 3)) (string-append layername "-satinblank") 100 0)))
    (add-under-layer img blacklayer satinlayer)
    (gimp-layer-set-offsets blacklayer (min (car layeraoffsets) (car layerboffsets)) (min (cadr layeraoffsets) (cadr layerboffsets)))
    (gimp-selection-all img)
    (gimp-palette-set-foreground '(0 0 0))
    (gimp-edit-fill blacklayer 0)
    (gimp-selection-none img)
    (gimp-layer-set-mode satinmask 6)
    (set! satinlayer (car (gimp-image-merge-down img satinlayer 0)))
    (set! satinlayer (car (gimp-image-merge-down img satinmask 0)))
    (gimp-drawable-set-name satinlayer (string-append layername "-satin"))
    (if (> contour 0)
      (begin
   (apply-contour satinlayer 0 contour)
   (gimp-selection-load alphaSel)
   (gimp-selection-grow img size)
   (gimp-selection-invert img)
   (gimp-palette-set-foreground '(0 0 0))
   (gimp-edit-fill satinlayer 0)
   (gimp-selection-none img)
      )
    )
    (if (= invert 1)
      (gimp-invert satinlayer)
    )
    (set! satinmask (car (gimp-layer-create-mask satinlayer 5)))
    (gimp-layer-add-mask satinlayer satinmask)
    (gimp-selection-all img)
    (gimp-palette-set-foreground color)
    (gimp-edit-fill satinlayer 0)
    (gimp-selection-none img)
    (gimp-layer-set-opacity satinlayer opacity)
    (gimp-layer-set-mode satinlayer (get-blending-mode mode))
    (gimp-layer-resize satinlayer (car (gimp-drawable-width drawable)) (car (gimp-drawable-height drawable)) (- (car (gimp-drawable-offsets satinlayer)) (car drwoffsets)) (- (cadr (gimp-drawable-offsets satinlayer)) (cadr drwoffsets)))
    (if (= merge 1)
      (begin
   (set! origmask (car (gimp-layer-get-mask drawable)))
   (if (> origmask -1)
     (begin
       (set! origmask (car (gimp-channel-copy origmask)))
       (gimp-layer-remove-mask drawable 1)
     )
   )
   (set! alphamask (car (gimp-layer-create-mask drawable 3)))
   (set! satinlayer (car (gimp-image-merge-down img satinlayer 0)))
   (gimp-drawable-set-name satinlayer layername)
   (gimp-layer-add-mask satinlayer alphamask)
   (gimp-layer-remove-mask satinlayer 0)
   (if (> origmask -1)
     (gimp-layer-add-mask satinlayer origmask)
   )
      )
      (begin
   (gimp-selection-load alphaSel)
   (gimp-selection-invert img)
   (gimp-palette-set-foreground '(0 0 0))
   (gimp-edit-fill satinmask 0)
      )
    )
    (gimp-palette-set-foreground origfgcolor)
    (gimp-selection-load origselection)
    (gimp-image-remove-channel img alphaSel)
    (gimp-image-remove-channel img origselection)
    (gimp-displays-flush)
  )
  (gimp-image-undo-group-end img)
)


Top
 Post subject: Re: help me decipher the 'Satin' effect, pls
PostPosted: Fri Feb 15, 2013 10:40 am  (#24) 
Offline
GimpChat Member
User avatar

Joined: Sep 22, 2012
Posts: 2089
Location: US
Check out this guy's videos, in part 1 he explains how to call functions from Script-Fu console and HowTo's to writing a script parts 2,3.


Top
 Post subject: Re: help me decipher the 'Satin' effect, pls
PostPosted: Fri Feb 15, 2013 11:05 am  (#25) 
Offline
GimpChat Member
User avatar

Joined: Jul 17, 2012
Posts: 2769
K1TesseraEna wrote:
Check out this guy's videos, in part 1 he explains how to call functions from Script-Fu console and HowTo's to writing a script parts 2,3.
you forgot the link :roll: :hehe


Top
 Post subject: Re: help me decipher the 'Satin' effect, pls
PostPosted: Fri Feb 15, 2013 2:19 pm  (#26) 
Offline
GimpChat Member
User avatar

Joined: Sep 22, 2012
Posts: 2089
Location: US
Esper wrote:
K1TesseraEna wrote:
Check out this guy's videos, in part 1 he explains how to call functions from Script-Fu console and HowTo's to writing a script parts 2,3.
you forgot the link :roll: :hehe



did I? oh, shoot...http://www.youtube.com/watch?v=dAuJJ6P8Jxs


Top
 Post subject: Re: help me decipher the 'Satin' effect, pls
PostPosted: Sat Feb 16, 2013 4:29 pm  (#27) 
Esper wrote:
do you think you could have another go at the Jonathan Stipe version of the satin effect ?

I PM'ed you the tutorial steps, but then I remembered you did not want to receive PM's so I deleted it. :rofl


Top
 Post subject: Re: help me decipher the 'Satin' effect, pls
PostPosted: Sat Feb 16, 2013 4:50 pm  (#28) 
Offline
GimpChat Member
User avatar

Joined: Apr 07, 2010
Posts: 14182
@fluffybunny, I did notice in Esper's tutorial that he did give you the credits for these steps.

_________________
Image


Top
 Post subject: Re: help me decipher the 'Satin' effect, pls
PostPosted: Sat Feb 16, 2013 11:44 pm  (#29) 
Offline
Script Coder
User avatar

Joined: Feb 18, 2011
Posts: 4826
Location: Bendigo Vic. Australia
Jonathon Stripes is a copy of iccii's but he added contours to the mask, it would be difficult to create a tutorial on this without applying curves to the layer mask.

Just check the layer mask and you will see the type of curve needed

_________________
Image
No matter how much you push the envelope, it'll still be stationery.


Top
 Post subject: Re: help me decipher the 'Satin' effect, pls
PostPosted: Sun Feb 17, 2013 7:55 am  (#30) 
Offline
GimpChat Member
User avatar

Joined: Jul 17, 2012
Posts: 2769
Graechan wrote:
Jonathon Stripes is a copy of iccii's but he added contours to the mask, it would be difficult to create a tutorial on this without applying curves to the layer mask.

Just check the layer mask and you will see the type of curve needed
originally i got the contour curves from the Jon Stipe layerfx, Graechan
and they are optional

they are not the reason the satin looks different


Top
 Post subject: Re: help me decipher the 'Satin' effect, pls
PostPosted: Fri Feb 22, 2013 9:40 am  (#31) 
Offline
GimpChat Member
User avatar

Joined: Sep 24, 2010
Posts: 12832
OK; scaled my smallest pattern in the world to 150% and then used image as displacement map (2x2) and voila (well, some blend modes to get the desired contrast/color). Still, using this pattern, along with displacement map, could be a cool way to create mathematically plots. :)

ref: http://www.fontplay.com/freephotos/sixt ... 06-016.jpg


Attachments:
pattern150.jpg
pattern150.jpg [ 767.16 KiB | Viewed 1359 times ]

_________________
Lyle

Psalm 109:8

Image
Top
 Post subject: Re: help me decipher the 'Satin' effect, pls
PostPosted: Fri Feb 22, 2013 11:11 am  (#32) 
Offline
GimpChat Member
User avatar

Joined: Nov 16, 2011
Posts: 5127
Location: Metro Vancouver, BC
That's a crazy (in a good way) effect, Lyle :)

_________________
Image
Gimp 2.8.18, Linux, median user
Gimp Chat Tutorials Index
Spirit Bear (Kermode)


Top
 Post subject: Re: help me decipher the 'Satin' effect, pls
PostPosted: Fri Feb 22, 2013 1:11 pm  (#33) 
Offline
GimpChat Member
User avatar

Joined: Sep 24, 2010
Posts: 12832
Thanks Odin. :)


Attachments:
thanks.jpg
thanks.jpg [ 464.66 KiB | Viewed 1348 times ]

_________________
Lyle

Psalm 109:8

Image
Top
 Post subject: Re: help me decipher the 'Satin' effect, pls
PostPosted: Fri Feb 22, 2013 1:13 pm  (#34) 
Offline
GimpChat Member
User avatar

Joined: Apr 07, 2010
Posts: 14182
That purple is pretty cool Lyle...how did you get the last four letters with a different pattern than the first two?

_________________
Image


Top
 Post subject: Re: help me decipher the 'Satin' effect, pls
PostPosted: Fri Feb 22, 2013 1:37 pm  (#35) 
Offline
GimpChat Member
User avatar

Joined: Sep 24, 2010
Posts: 12832
Instead of Cartesean, I used Polar displacement molly and the text used created the effect. Did set the Whirl to zero degrees. :)

_________________
Lyle

Psalm 109:8

Image


Top
 Post subject: Re: help me decipher the 'Satin' effect, pls
PostPosted: Fri Feb 22, 2013 1:38 pm  (#36) 
Offline
GimpChat Member
User avatar

Joined: Apr 07, 2010
Posts: 14182
Thanks Lyle, very effective.

_________________
Image


Top
 Post subject: Re: help me decipher the 'Satin' effect, pls
PostPosted: Fri Feb 22, 2013 7:39 pm  (#37) 
Offline
GimpChat Member
User avatar

Joined: Aug 16, 2012
Posts: 4271
Location: Göteborg, Sweden
lylejk: that's really cool!

_________________


Top
 Post subject: Re: help me decipher the 'Satin' effect, pls
PostPosted: Fri Feb 22, 2013 8:44 pm  (#38) 
Offline
GimpChat Member
User avatar

Joined: Sep 24, 2010
Posts: 12832
Appreciate the feedback AnMal. :)

_________________
Lyle

Psalm 109:8

Image


Top
Post new topic Reply to topic  [ 38 posts ]  Go to page Previous  1, 2

All times are UTC - 5 hours [ DST ]



* Login  



Powered by phpBB3 © phpBB Group