It is currently Thu Apr 25, 2024 8:18 pm


All times are UTC - 5 hours [ DST ]



Post new topic Reply to topic  [ 10 posts ] 
Author Message
 Post subject: Fragment Script
PostPosted: Fri Aug 23, 2013 10:29 am  (#1) 
Offline
Script Coder
User avatar

Joined: Jul 14, 2010
Posts: 697
Inspired by Rod's mention of the PS fragment filter I went and threw together a script.

Since I like options, I made the offset adjustable (the default is 4px, same as photoshop, I think) and added a checkbox option to average in the original non-offset source (leave unchecked to mimic the photoshop version).

It only works on layers without transparency. When there is a selection, it operates only within the selection. (I couldn't get it to work with transparency, as I couldn't figure out how to "average" the pixels value and alpha in a sane manner.

-Rob A>


Attachments:
fragment.scm [4.01 KiB]
Downloaded 242 times

_________________
Image
Fantasy Cartography and Mapping by RobA
Share on Facebook Share on Twitter Share on Orkut Share on Digg Share on MySpace Share on Delicious Share on Technorati
Top
 Post subject: Re: Fragment Script
PostPosted: Fri Aug 23, 2013 10:53 am  (#2) 
Offline
GimpChat Member
User avatar

Joined: Aug 30, 2012
Posts: 2174
Nice script RobA, Just so every one is aware when you said it doesn't work on layers with transparency I was just assuming the normal white text on a transparent layer but I actually had to right click the layer and remove the alpha channel.

Anyway used it to create a bump map for the lightening filter then blurred results by 5px and ran a few curves.

Image

_________________
Image


Top
 Post subject: Re: Fragment Script
PostPosted: Fri Aug 23, 2013 12:23 pm  (#3) 
Offline
GimpChat Member
User avatar

Joined: May 16, 2010
Posts: 14709
Location: USA
Excellent Rob! Thank you.
This is the effect it gives to a blurred ring contour curve on a channel. :) This is the filter ran with default 4 pixels once.
This is on white text.
Alpha to selection >select to channel.
Then blur at 12 and run the fragment script.
Next select the channel and press the alt key to get the selection from the channel.
Make a new layer in the layers pallette
Copy the selection to a the layer- anchor. :bigthup
Make the bg a different color.

Image

Nicely done Rob. Thanks again sir. :)

Now how about a crystallize filter? Or like Lyle do i asketh too much? You can make some real cool ice effects with fragment and then crystallize. :)
Image

I believe it works the same as the cubism filter except it creates shapes other than just cubes.
Crystallize clumps pixels into a solid color in a polygon shape.

_________________
Image
Edmund Burke nailed it when he said, "The only thing necessary for the triumph of evil is for good men to do nothing."


Top
 Post subject: Re: Fragment Script
PostPosted: Fri Aug 23, 2013 2:20 pm  (#4) 
Offline
Script Coder
User avatar

Joined: Jul 14, 2010
Posts: 697
Rod wrote:
Now how about a crystallize filter? Or like Lyle do i asketh too much? You can make some real cool ice effects with fragment and then crystallize. :)

I believe it works the same as the cubism filter except it creates shapes other than just cubes.
Crystallize clumps pixels into a solid color in a polygon shape.


I was looking for a good option for this a while back. The best I found was cubism plus a posterize after. Though it looks like G'MIC has a mosaic filter that might be close to the PS crystallize filter.

PS, you can change the script to work on layers with transparency by changing the "RGB GRAY" to "RGB* GRAY*" in the script-fu-register call.

It gave some pretty weird results for layers with transparency (like rendered text), however, when I did that.

-Rob A>

_________________
Image
Fantasy Cartography and Mapping by RobA


Top
 Post subject: Re: Fragment Script
PostPosted: Fri Aug 23, 2013 2:47 pm  (#5) 
Offline
GimpChat Member
User avatar

Joined: May 16, 2010
Posts: 14709
Location: USA
Actually i don't really need the alpha selection.
Just create your white text as normal - alpha to select and select to channel. Run the script and delete the text layer. Alt select the channel so you get the selection and make a new layer in the LAYERS dialog. Fill that layer selection with white.
The results will be the fragmented text layer on a transparent bg. :)
Then i ran cubism with these settings. Pretty close! Just have to mess with the cubism filter values a bit more. :bigthup

Image
Found that if you repeat cubism same settings you get a better result. :)
Image

With color and wind filter added. :bigthup

Image

_________________
Image
Edmund Burke nailed it when he said, "The only thing necessary for the triumph of evil is for good men to do nothing."


Top
 Post subject: Re: Fragment Script
PostPosted: Fri Aug 23, 2013 3:14 pm  (#6) 
Offline
GimpChat Member
User avatar

Joined: Jul 17, 2012
Posts: 2770
i dont really understand this filter, what i get is this: upper elft
while i thought Rod wanted something like this: lower right

Image

can we get more examples, please !

EDIT: cool ice, Rod !


Last edited by Esper on Fri Aug 23, 2013 3:21 pm, edited 1 time in total.

Top
 Post subject: Re: Fragment Script
PostPosted: Fri Aug 23, 2013 3:15 pm  (#7) 
Offline
GimpChat Member
User avatar

Joined: May 16, 2010
Posts: 14709
Location: USA
AHAH! If you take the above image and select by color the bg color and do a select invert. Then run fragment default options. then run cubism again with the same options check this out!

Image

See how it broke that aura up around the text and then cubism creates colored layers out of it after. :bigthup

Nice Rob. This is now one of my favorite filters.
Added some icicles (wind). :)
Image :ninja

_________________
Image
Edmund Burke nailed it when he said, "The only thing necessary for the triumph of evil is for good men to do nothing."


Top
 Post subject: Re: Fragment Script
PostPosted: Fri Aug 23, 2013 3:26 pm  (#8) 
Offline
GimpChat Member
User avatar

Joined: May 16, 2010
Posts: 14709
Location: USA
Esper wrote:
i dont really understand this filter, what i get is this: upper elft
while i thought Rod wanted something like this: lower right

[ Image ]

can we get more examples, please !


This is really what i wanted.
After you run the blur and curves tool on a channel.
Image

Then alt select the channel and run fragment
Image

Now if you alt select the channel and create a new layer in the LAYERS dialog and fill with white you get this.
Image

_________________
Image
Edmund Burke nailed it when he said, "The only thing necessary for the triumph of evil is for good men to do nothing."


Top
 Post subject: Re: Fragment Script
PostPosted: Fri Aug 23, 2013 3:35 pm  (#9) 
Offline
GimpChat Member
User avatar

Joined: May 16, 2010
Posts: 14709
Location: USA
I attached the XCF workspace file. Add any color bg you wish. :bigthup

Image
Attachment:
plastic_RD.xcf [367.4 KiB]
Downloaded 88 times

_________________
Image
Edmund Burke nailed it when he said, "The only thing necessary for the triumph of evil is for good men to do nothing."


Top
 Post subject: Re: Fragment Script
PostPosted: Fri Aug 23, 2013 4:29 pm  (#10) 
Offline
GimpChat Member
User avatar

Joined: Jul 17, 2012
Posts: 2770
interesting !


Top
Post new topic Reply to topic  [ 10 posts ] 

All times are UTC - 5 hours [ DST ]


   Similar Topics   Replies 
No new posts Attachment(s) Looking for Script Coder to make Script of my VHS effect

2

No new posts Attachment(s) Cannot run test script-fu script via console

7

No new posts Attachment(s) A liitle Start Help with a Script-Fu Script

3

No new posts Attachment(s) Script-fu

6

No new posts Attachment(s) Old script Token

2



* Login  



Powered by phpBB3 © phpBB Group