±qscript_fu¤¤¾Ç²ß¼v¹³³B²z§Þ¥©¡G»s§@¤p®q¹Ï®×

 

 

 

l          °õ¦æ[GIMP] -> Xtns -> Script_Fu -> Patterns -> Land¨Ï¥Î¹w³]ªº°Ñ¼Æ¡A²£¥Í¤W¹Ïºñ¦âªº®qÀ¬²HÂŦ⪺®ü¤ôªº¹Ï®×¡C

l          ¸Õ¸Õ¤£¦Pªº°Ñ¼Æ¡A¤×¨ä¬OGradient³o­Ó°Ñ¼Æ¡A§A±N¦³·N·Q¤£¨ìªº·sµo²{¡C

l          ³o­Ó¹Ï®×¬OµL±µÁ_ªº¹Ï®×¡A°õ¦æ[image] -> Filters -> Map -> Tile¡A¡]©ÎSmall Tiles¡^§A·|¥i²£¥Í¦h­Ó¤p®q¹Ï®×¨Ã±Æ­«Å|ªº·s¹Ï®×¡C

 

¤@¡B      Step By Step

 

¨C­Ó¨BÆJ©Ò²£¥Íªº¼v¹³µøµ¡

¥H¹Ï§Î¨Ï¥ÎªÌ¤¶­±»s§@¤p®q¹Ï®×¡A»Ý­nªº¨BÆJ¡G

¹ïÀ³¨ìland.scmµ{¦¡½X¤¤ªº¨ç¼Æ

l          File-> New¡A·s¼W¤@­Ó³z©ú©³¦â256x256¼v¹³¡A¹Ï¼h§ó¦W¬°bottom¡C

3: (img (car (gimp-image-new width height RGB)))

4:(layer-one (car (gimp-layer-new img width height RGB "bottom" 100 NORMAL)))

6: (gimp-gradients-set-active gradient)

7: (gimp-image-undo-disable img)

8: (gimp-image-add-layer img layer-one 0)

l          °õ¦æ[image] -> Filters -> Render -> Clouds -> Solid-Noise¡AÂI¿ïTileable¿ï¶µ¡ATurbulent¿ï¶µ¤£ÂI¿ï¡A²£¥Í¦Ç¶¥Ãúª¬®ÄªG¡C

l          ÂI¿ïTileable¿ï¶µ¡A²£¥Íªº¹Ï®×¬OµL±µÁ_ªº¹Ï®×¡C

10: (plug-in-solid-noise 1 img layer-one TRUE FALSE seed detail xscale yscale)

 

l          °õ¦æ[image] -> Colors -> Auto-> Stretch Contrast¡A¼W±j©ú·t¹ï¤ñ¡C

l          ½Æ»sbottom¹Ï¼h±o¨ì·s¹Ï¼hbottom Copy¹Ï¼h¡C

11: (plug-in-c-astretch 1 img layer-one)

12: (set! layer-two (car (gimp-layer-copy layer-one TRUE)))

13: (gimp-image-add-layer img layer-two -1)

14: (gimp-image-set-active-layer img layer-two)

 

 

l          ¹ïbottom Copy¹Ï¼h°õ¦æ[image] -> Filters -> Colors -> Map -> Gradient Map¡A¨Ï¥ÎLandº¥¼h¡A±N¶Â¥Õ¹Ï®×Åܦ¨±m¦âªº¹Ï®×¡C

16:(plug-in-gradmap 1 img layer-two)

l          ¹ïbottom ¹Ï¼h¡A¨Ï¥ÎSelect -> By Color¡AÁ{¬É­ÈThreshold³]55¡A±N¦Ç¶¥¬°190ªº¦Ç¦â¤Î¨äªþªñªºÃC¦â¿ï¦í¡C

20:(gimp-by-color-select layer-one '(190 190 190) 55 REPLACE FALSE FALSE 0 FALSE)

l          ¹ïbottom Copy¹Ï¼h°õ¦æ[image] -> Filters -> Map -> Bump Map¡AMap Type¿ïLinear Map¡ACompensation for Darkeningª¬ºA«ö¶s­nÂI¿ï¡AAzimuth³]135¡AElevation³]35¡ADepth³]60¡]landheight¡^¡A¨ä¾l¬°0¡ABump Map¹Ï¼h³]bottom¹Ï¼h¡C

21:(plug-in-bump-map 1 img layer-two layer-one 135.0 35 landheight 0 0 0 0 TRUE FALSE 0)

 

l          °õ¦æ[image] ->Select -> Invert¡A±N¿ï¨ú°Ï°ì¤ÏÂà¡C

l          ¹ïbottom Copy¹Ï¼h°õ¦æ[image] -> Filters -> Map -> Bump Map¡AMap Type¿ïLinear Map¡ACompensation for Darkeningª¬ºA«ö¶s­nÂI¿ï¡AAzimuth³]135¡AElevation³]35¡ADepth³]4¡]seadepth¡^¡A¨ä¾l¬°0¡ABump Map¹Ï¼h³]bottom¹Ï¼h¡C

l          °õ¦æ[image] -> Select -> NoneÄÀ©ñ¨ú°Ï°ì¡C

24:(gimp-selection-invert img)

25:(plug-in-bump-map 1 img layer-two layer-one 135.0 35 seadepth 0 0 0 0 TRUE FALSE 0)

30:(gimp-selection-none img)

 

¤G¡B­ì©lµ{¦¡½X¡G

 

 

; The GIMP -- an image manipulation program

; Copyright (C) 1995 Spencer Kimball and Peter Mattis

;

; Land --- create a pattern that resembles a Topographic map

; Copyright (C) 1997 Adrian Karstan Likins

; aklikins@eos.ncsu.edu

;

;

;      This script works on the current gradient you have loaded.

;      Some suggested gradients:

;            Land                  (produces a earthlike map)

;            Brushed_aluminum      (looks like the moon)

; 

;

; Thanks to Quartic for helping me debug this thing.

;

; 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.

;

; You should have received a copy of the GNU General Public License

; along with this program; if not, write to the Free Software

; Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.

 

1:(define (script-fu-land width height seed detail landheight seadepth xscale yscale gradient)

2:  (let* (

3:     (img (car (gimp-image-new width height RGB)))

4:     (layer-one (car (gimp-layer-new img width height RGB "bottom" 100 NORMAL)))

5:     )

6:  (gimp-gradients-set-active gradient)

7:  (gimp-image-undo-disable img)

8:  (gimp-image-add-layer img layer-one 0)

9:

10:  (plug-in-solid-noise 1 img layer-one TRUE FALSE seed detail xscale yscale)

11:  (plug-in-c-astretch 1 img layer-one)

12:  (set! layer-two (car (gimp-layer-copy layer-one TRUE)))

13:  (gimp-image-add-layer img layer-two -1)

14:  (gimp-image-set-active-layer img layer-two)

15:

16:  (plug-in-gradmap 1 img layer-two)

17:

18:

19:

20:  (gimp-by-color-select layer-one '(190 190 190) 55 REPLACE FALSE FALSE 0 FALSE)

21:  (plug-in-bump-map 1 img layer-two layer-one 135.0 35 landheight 0 0 0 0 TRUE FALSE 0)

22:

23:   ;(plug-in-c-astretch 1 img layer-two)

24:  (gimp-selection-invert img)

25:  (plug-in-bump-map 1 img layer-two layer-one 135.0 35 seadepth 0 0 0 0 TRUE FALSE 0)

26:

27:  ;(plug-in-c-astretch 1 img layer-two)

28:

29:   ; uncomment the next line if you want to keep a selection of the "land"

30:  (gimp-selection-none img)

31:

32:  (gimp-display-new img)

33:  (gimp-image-undo-enable img)

34:  ))

35:

 

36:  (script-fu-register "script-fu-land"

37:               _"<Toolbox>/Xtns/Script-Fu/Patterns/Land..."

38:               "A Topgraphic map pattern"

39:               "Adrian Likins <aklikins@eos.ncsu.edu>"

40:               "Adrian Likins"

41:               "1997"

42:               ""

43:               SF-ADJUSTMENT _"Image Width" '(256 10 1000 1 10 0 1)

44:               SF-ADJUSTMENT _"Image Height" '(256 10 1000 1 10 0 1)

45:               SF-ADJUSTMENT _"Random Seed" '(32 0 15000000 1 10 0 1)

46:               SF-ADJUSTMENT _"Detail Level" '(4 1 15 1 5 0 0)

47:               SF-ADJUSTMENT _"Land Height" '(60 1 65 1 10 0 1)

48:               SF-ADJUSTMENT _"Land Height" '(4 1 65 1 10 0 1)

49:               SF-ADJUSTMENT _"Scale X" '(4 0.1 16 1 5 0.1 0)

50:               SF-ADJUSTMENT _"Scale Y" '(4 0.1 16 1 5 0.1 0)

51:               SF-GRADIENT   _"Gradient" "Land_1")

 

 

¤T¡B¨ä¥L¨ç¼Æªº»¡©ú¡G