It is currently Fri Apr 19, 2024 6:06 am


All times are UTC - 5 hours [ DST ]



Post new topic Reply to topic  [ 34 posts ]  Go to page 1, 2  Next
Author Message
 Post subject: Cran-Tau
PostPosted: Sat Sep 25, 2010 8:10 am  (#1) 
Offline
GimpChat Member
User avatar

Joined: Sep 24, 2010
Posts: 12516
Forgot that I even had RobA's Random Density map. He copied a link at the registry (http://registry.gimp.org/node/10774#comment-2131) to where he linked it at GIMPTalk, but of course, GIMPTalk is not working again (not really an inside joke to you guys here). lol

I checked Rob's website, but didn't see that he copied it there. It is sort of slow, but really cool results (if you have a good brush to use that is) can be done. Closest thing that I know to a Jigsaw Image Mosaic which I've yet to run across a program for. Have one for Puzzle Imag Mosaic's, but do like the dimensionality of JIM's better. :)

I call this one Cran-Tau (a Cranberry rendition in the form of the Yin/Yang symbol). :)


Attachments:
File comment: Threw a bunch of cranberries into the air and look what they formed. :)
cran-tau.jpg
cran-tau.jpg [ 676.48 KiB | Viewed 4417 times ]

_________________
Lyle

Psalm 109:8

Image
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: Cran-Tau
PostPosted: Sat Sep 25, 2010 8:27 am  (#2) 
Offline
GimpChat Member
User avatar

Joined: Sep 24, 2010
Posts: 12516
OK; looks like GIMPTalk's back up for a few seconds. Rob's thread is below. :)

http://www.gimptalk.com/forum/viewtopic.php?f=9&t=30359

_________________
Lyle

Psalm 109:8

Image


Top
 Post subject: Re: Cran-Tau
PostPosted: Sat Sep 25, 2010 8:58 am  (#3) 
Offline
Retired Staff
User avatar

Joined: May 22, 2008
Posts: 6947
Location: Somewhere in GIMP
I had to send a link to your cranberry Yin-Yang post to my brother. He's a retired cranberry grower in Bandon, Oregon.

That is very cool. :hehe

Unfortunately, your link to GT wasn't quick enough for me. GT was down when I tried it. :hoh

_________________
Image
World War IV will be fought with sticks and stones. - Albert Einstein


Top
 Post subject: Re: Cran-Tau
PostPosted: Sat Sep 25, 2010 12:13 pm  (#4) 
Offline
GimpChat Member
User avatar

Joined: Sep 24, 2010
Posts: 12516
Just tried it again O; works. Get it while you can. lol

Also have to add an arg. since it should have been Cran-Tao, not Cran-Tau. lol

:)

_________________
Lyle

Psalm 109:8

Image


Top
 Post subject: Re: Cran-Tau
PostPosted: Sat Sep 25, 2010 1:15 pm  (#5) 
Offline
Retired Staff
User avatar

Joined: May 22, 2008
Posts: 6947
Location: Somewhere in GIMP
Thanks Lyle. Got it and did a VERY belated reply to the thread. I guess I missed RobA's last post. Now off to play. :tehe

Played with my star brush. First I did lines with the path tool and stroked the lines on the black bg with a white brush and blurred. Ran the filter

Then I did a circle on another black background filled it with white and blurred. Then ran the filter so I'd have a cluster of stars in the center.

The bubble background is not one I made but those bubbles give me ideas for the filter. :hehe

This is a filter that is extra nice for those times when you want something scattered randomly.

Image


Top
 Post subject: Re: Cran-Tau
PostPosted: Sat Sep 25, 2010 1:28 pm  (#6) 
Offline
GimpChat Member
User avatar

Joined: Apr 08, 2010
Posts: 5420
Location: Northwest Ohio
interesting, tried a simple circle of rings just to see how it worked. Not sure what the third parameter does.
Image


Top
 Post subject: Re: Cran-Tau
PostPosted: Sat Sep 25, 2010 3:37 pm  (#7) 
Offline
GimpChat Member
User avatar

Joined: Sep 24, 2010
Posts: 12516
Is this the start of another binge for me? Maybe. lol

:)


Attachments:
accent7.jpg
accent7.jpg [ 857.74 KiB | Viewed 4371 times ]

_________________
Lyle

Psalm 109:8

Image
Top
 Post subject: Re: Cran-Tau
PostPosted: Sat Sep 25, 2010 5:09 pm  (#8) 
Offline
Retired Staff
User avatar

Joined: May 22, 2008
Posts: 6947
Location: Somewhere in GIMP
Those look like M&M's Lyle. Yum.

I used a white layer to use as a map for the background. Seems to have worked well.

Image

_________________
Image
World War IV will be fought with sticks and stones. - Albert Einstein


Top
 Post subject: Re: Cran-Tau
PostPosted: Sat Sep 25, 2010 5:53 pm  (#9) 
Offline
GimpChat Member

Joined: Apr 12, 2010
Posts: 5870
:jumpclap :jumpclap :jumpclap

_________________
My 3D Gallery on Deviantart http://photocomix2.deviantart.com/
Main gallery http://www.flickriver.com/photos/photocomix-mandala/
Mandala and simmetry http://www.flickriver.com/photos/photocomix_mandala/

Image

Mrs Wilbress


Top
 Post subject: Re: Cran-Tau
PostPosted: Sat Sep 25, 2010 6:26 pm  (#10) 
Offline
GimpChat Member
User avatar

Joined: Sep 24, 2010
Posts: 12516
Excellent O; I can see that I (and hopefully many more) will get some cool results using Rob's fantastic Script-fu. Saw later that he is hosting his align to grid version at his site by the way, but I like the all random one better (but I do see other possibilities for more orderly fills). I actually edited the grid one so that it and Rob's original can co-exist on my PC (hope you don't mind Rob). I can't Script-fu, but it really wasn't that hard to change. :)

_________________
Lyle

Psalm 109:8

Image


Top
 Post subject: Re: Cran-Tau
PostPosted: Sat Sep 25, 2010 7:18 pm  (#11) 
Offline
GimpChat Member
User avatar

Joined: Sep 24, 2010
Posts: 12516
I call this one Arcimboldo's Planet. Used Rob's Script-fu and then applied lens distortion to curve it some. :)


Attachments:
arcim_planet.jpg
arcim_planet.jpg [ 613.38 KiB | Viewed 1856 times ]

_________________
Lyle

Psalm 109:8

Image
Top
 Post subject: Re: Cran-Tau
PostPosted: Sat Sep 25, 2010 7:44 pm  (#12) 
Offline
Retired Staff
User avatar

Joined: May 22, 2008
Posts: 6947
Location: Somewhere in GIMP
I wanted to see what those other settings did. On a transparent layer I made a 6-sided polygon and filled it with a pattern. Then made a new transparent layer for brushing.

I used the pattern-filled shape as the density map and checked the box where it says Use map alpha channel for Density and draw with map colour.

I have a grayscale spiky brush I used for painting. If you check Invert Map, the brush fills in the area around the shape - that's just a side note to explain what happens.

Anyway, the brush gets colored from the colors in the pattern on the map. It's a delightful, versatile script.

Image

These are my results.
Image


Top
 Post subject: Re: Cran-Tau
PostPosted: Sat Sep 25, 2010 7:48 pm  (#13) 
Offline
Retired Staff
User avatar

Joined: May 22, 2008
Posts: 6947
Location: Somewhere in GIMP
lylejk wrote:
I call this one Arcimboldo's Planet. Used Rob's Script-fu and then applied lens distortion to curve it some. :)

I love it!!!! :clap :gimp

_________________
Image
World War IV will be fought with sticks and stones. - Albert Einstein


Top
 Post subject: Re: Cran-Tau
PostPosted: Sat Sep 25, 2010 7:51 pm  (#14) 
Offline
GimpChat Member
User avatar

Joined: May 16, 2010
Posts: 14709
Location: USA
In case it go's down again here is the script code
Just save it as a SCM extension in your scripts folder, find it in /Filters/Map/Random Density Map
in the program menu.

Nice script ill have to try this out later. thanks btw. =)

; random_density_map.scm
; by Rob Antonishen
; http://silent9.com

; Version 1.0 (20080408)

; Description
;
; Script to draw a specified number of random points with the currently
; selected brush, using a density mask.
; Will appear in Filters->Map Menu
;

; based on random.scm
; by Charles Cave <charlesweb@optusnet.com.au>
; http://members.optusnet.com.au/~charles57/GIMP

; License:
;
; This program is free software; you can redistribute it and/or modify
; it under the terms of the GNU General Public License as published by
; the Free Software Foundation; either version 2 of the License, or
; (at your option) any later version.
;
; This program is distributed in the hope that it will be useful,
; but WITHOUT ANY WARRANTY; without even the implied warranty of
; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
; GNU General Public License for more details.
;
; The GNU Public License is available at
; http://www.gnu.org/copyleft/gpl.html
(define (script-fu-random-density-map img inLayer inDensityMap inInvertMap inUseAlpha inIterations inMargin inBailout)

  (let* (
        (x1 0)
        (y1 0)
        (ctr 0)
        (x2 (car (gimp-drawable-width inLayer)))
        (y2 (car (gimp-drawable-height inLayer)))
        (xMap (car (gimp-drawable-width inDensityMap)))
        (yMap (car (gimp-drawable-height inDensityMap)))
        (x 0)
        (y 0)
        (map-type 0)
        (get-val 0)
        (test 0)
        (thresh 0)
        (*randompoint* (cons-array 2 'double))
        (drw-width 0)
        (drw-height 0)
      (lc 0)
        )

  ; define drawable area for the algorithm
  (set! x1 (+ x1 inMargin))
  (set! x2 (- x2 inMargin))
  (set! y1 (+ y1 inMargin))
  (set! y2 (- y2 inMargin))  (set! drw-width  (- x2 x1))
  (set! drw-height (- y2 y1))

  ;get map type:  RGB-IMAGE (0), RGBA-IMAGE (1), GRAY-IMAGE (2), GRAYA-IMAGE (3), INDEXED-IMAGE (4), INDEXEDA-IMAGE (5)
  (set! map-type (car (gimp-drawable-type inDensityMap)))

  ; make sure maps isn't indexed
  (if (or (= map-type INDEXED-IMAGE) (= map-type INDEXEDA-IMAGE))
    (gimp-message "Density Map can not be indexed!") ; error
   (if (or (not (= x2 xMap)) (not (= y2 yMap)))
      (gimp-message "Density Map must be the same size as the active layer!") ; error
       ;it begins here
      (begin
       (gimp-context-push)
       (gimp-image-undo-group-start img)
     
       ; set up progress bar
       (gimp-progress-set-text _"Rendering Random masked Image")
     
       (while (and (< ctr inIterations) (< lc inBailout))
     
         ; get a random location
         (set! x (+ x1 (random drw-width )))
         (set! y (+ y1 (random drw-height)))

         ; get the pixel value at that spot
         (set! get-val (cadr (gimp-drawable-get-pixel inDensityMap x y)))
         
         ; pick a number, any number
         (set! thresh (random 255))

         (if (and (= inUseAlpha TRUE) (= (car (gimp-drawable-has-alpha inDensityMap)) TRUE))   ; if using alpha
          (begin
            (set! test (aref get-val 3))   ; test threshold against alpha ( index 3)
            (gimp-context-set-foreground (list (aref get-val 0) (aref get-val 1) (aref get-val 2)))  ;set brush colour
          )
          (if (or (= map-type GRAY-IMAGE) (= map-type GRAYA-IMAGE))  ;  else if greyscale
            (set! test (aref get-val 0))  ; test threshold against colour ( index 0)
            (if (or (= map-type RGB-IMAGE) (= map-type RGBA-IMAGE))  ; else if colour
             (set! test (/ (+ (aref get-val 0) (aref get-val 1) (aref get-val 2)) 3)) ; test threshold against average of r g and b
             (set! test 255) ;  else threshold to full value (always draw)
            )
          )
         )           
         (if (= inInvertMap TRUE)  ; reverse the map if invert option
          (set! test (- 255 test))
         )
         (if (< thresh test)    ; compare threshold against random value
          (begin
            (set! ctr (+ ctr 1))       ; increment counter
            (set! lc 0)
            (aset *randompoint* 0 x)   ; set the paint array
            (aset *randompoint* 1 y)
            (gimp-paintbrush-default inLayer 2 *randompoint*) ; paint point
            (gimp-progress-update (/ ctr inIterations))  ;update progress bar
          )
         )
         (set! lc (+ lc 1))
       )
     
       (if (>= lc inBailout)
         (gimp-message "Bailout Parameter Exceeded - Aborted!") ; error     
       )
     
       (gimp-progress-end)
       (gimp-image-undo-group-end img)
       (gimp-displays-flush)
       (gimp-context-pop)
      )
    )
    )
  )
)

(script-fu-register "script-fu-random-density-map"
                    "<Image>/Filters/Map/Random Density Map..."
                    "Draw a specified number of random points with the currently selected brush, using a density mask."
                    "Rob Antonishen"
                    "Rob Antonishen"
                    "April 2008"
                    "RGB*, GRAY*"
                    SF-IMAGE       "Image"         0
                    SF-DRAWABLE    "Drawable"      0
                    SF-DRAWABLE    "Density Map"   -1
                SF-TOGGLE      "Invert Map"    FALSE
               SF-TOGGLE      "Use map alpha channel for Density and draw with map colour"  FALSE
                    SF-ADJUSTMENT  "Number of points to draw"     '(10 1 10000 10 100 0 0)
                    SF-ADJUSTMENT  "Border Margin (pixels)"       '(0 0 100 1 6 0 0)
                    SF-ADJUSTMENT  "Bailout Threshold"            '(200 100 2000 10 100 0 0)
                    )

_________________
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: Cran-Tau
PostPosted: Sat Sep 25, 2010 8:09 pm  (#15) 
Offline
GimpChat Member
User avatar

Joined: Sep 24, 2010
Posts: 12516
Haven't played with that feature yet O, but your result does look cool. Good idea Rod; didn't want to step on Rob's shoe so just linked it earlier. It definitely needs a better host. Maybe Rob will officially release it to the registry. I'll ask him at GIMPTalk. :)

_________________
Lyle

Psalm 109:8

Image


Top
 Post subject: Re: Cran-Tau
PostPosted: Sat Sep 25, 2010 8:35 pm  (#16) 
Offline
GimpChat Member
User avatar

Joined: May 16, 2010
Posts: 14709
Location: USA
lylejk wrote:
Haven't played with that feature yet O, but your result does look cool. Good idea Rod; didn't want to step on Rob's shoe so just linked it earlier. It definitely needs a better host. Maybe Rob will officially release it to the registry. I'll ask him at GIMPTalk. :)


If Rob see's it here and asks me to remove it i will.I do not think he will mind as long as it's not being sold or copyright abuse isn't going on.

Thanks Rob in advance for the script. =)

Question though:
Can someone explain exactly how to use this script?
Every time i run it no matter what setting i use i get an integer error.
I created a black canvas, created another layer with a white blurred circle,created another white layer to run the filter on, painted (on the white layer) with a red brush (size 10), tried the filter with default settings and got the error still.

Any help?

_________________
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: Cran-Tau
PostPosted: Sat Sep 25, 2010 8:47 pm  (#17) 
Offline
Retired Staff
User avatar

Joined: May 22, 2008
Posts: 6947
Location: Somewhere in GIMP
Rod wrote:
I created a black canvas, created another layer with a white blurred circle,created another white layer to run the filter on, painted (on the white layer) with a red brush (size 10), tried the filter with default settings and got the error still.

Any help?
The white blurred circle should be merged down to the black canvas. Then be sure that black and white layer is selected in the Density Map dropdown.

You can also make the additional white layer a transparent layer if you want. Select the white or transparent layer before starting the script.

Image

_________________
Image
World War IV will be fought with sticks and stones. - Albert Einstein


Top
 Post subject: Re: Cran-Tau
PostPosted: Sat Sep 25, 2010 10:57 pm  (#18) 
Offline
Script Coder
User avatar

Joined: Jul 14, 2010
Posts: 697
Hi-

Glad you found a good use! As pointed out I rewrote the script to "fill" from the top down in a (optionally jittered) grid. This is because the main use I have for the script is in my map making.

For example this: http://fc01.deviantart.net/fs70/i/2010/ ... _ffaat.jpg

Where I don't want completely random trees, but want the ones "in front" to over-paint the ones "behind" when running the script.

The random one you posted here could use some speedup (I should try it in python which would be much faster to sample the canvas).

-Rob A>

_________________
Image
Fantasy Cartography and Mapping by RobA


Top
 Post subject: Re: Cran-Tau
PostPosted: Sat Sep 25, 2010 11:08 pm  (#19) 
Offline
GimpChat Member
User avatar

Joined: Sep 24, 2010
Posts: 12516
I know your are a map guy Rob; cool use of your Grid version for laying out the trees. Not sure if you ever heard of Jigsaw Image Mosaics, but I think I can coax your grid version to get a better result to approximate these (haven't tried yet; need to create a gih set with the object that will fill an arbitrary container (selection island) and see. :)

_________________
Lyle

Psalm 109:8

Image


Top
 Post subject: Re: Cran-Tau
PostPosted: Sat Sep 25, 2010 11:13 pm  (#20) 
Offline
GimpChat Member
User avatar

Joined: May 16, 2010
Posts: 14709
Location: USA
lol ... now it keeps telling me the density map has to be the same size as the layer?

_________________
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 new topic Reply to topic  [ 34 posts ]  Go to page 1, 2  Next

All times are UTC - 5 hours [ DST ]



* Login  



Powered by phpBB3 © phpBB Group