Page 1 of 2 12 LastLast
Results 1 to 10 of 16

Thread: GIMP Script: Thatch

  1. #1
      RobA is offline
    Administrator RobA's Avatar
    Join Date
    Apr 2007
    Location
    Niagara, Canada
    Posts
    5,532

    Post GIMP Script: Thatch

    As I have been tormenting gimp users in this thread with promises of this script being complete, I think it is ready for prime time

    ; Version 2.5 (20080209)

    Description:
    This will "thatch" a heightfield with a specified pattern. with the pattern rotated to line up "downhill"
    If there is a selection, only the area within the selection will get thatched.

    Location:
    Filters->Atristic->Thatch...

    Parameters:
    "Invert the heightfield" - unchecked expects high=1, checked will use high=black
    "Select a thatch pattern" - the pattern to cover the surface with. It should really be a tileable pattern
    "Pattern 'downhill' orientation" - "Right" "Up" "Left" "Down" reflects the downhill sloping direction of the pattern
    "0 angle offset (degrees)" - adjust the lighting base angle, from 3:00, 0 to 360 degrees, ccw.
    "Number of 'faces' to calculate" - The number of downhill directions to create
    "Blending between 'faces'" - The number of pixels to blur and overlap each of the faces. This doesn't blur the waterline.
    "Flat area strength" - Adjust how close to flat a section of the heightfield has to be to get the omni directional blend of the pattern. Set to 0 will use NO omni directional blend layer.
    "Make 0 elevation transparent" - checking this turns the 0 elevation transparent in the final result. unchecked it will be considered as a flat area and get the omni directional blend
    "Create a bumpmap layer" - check this to add a bumpmap layer in overlay mode on top.
    "Lighting angle for bumpmap" - if the above is checked, the angle for the lighting.
    "Create a softlight layer" - if checked, a "white high" copy of the heightfield will be added, at 50% opacity in softlight mode
    "Merge thatching to one layer" - if checked, the resultant thatch image is merged down to one layer, otherwise all of the layers are left to allow manual adjustment. It doesn't merge the bumpmap or softlight layers, however.
    "Create new image" - if checked, the thatch will be a new image, otherwise it will be new layers in the existing image.
    The script requires as input a greyscale heightfield image. It uses a FLATTENED version of the current image, so any non-heightfield layers need to be hidden.

    The other thread has examples galore, starting on page 2. here are some screen grabs in use...

    The heightfield with the area selected to thatch:
    GIMP Script: Thatch-t_docs1.jpg

    The Thatch script dialog:
    GIMP Script: Thatch-t_docs2.jpg

    The result (you can see the script reduces the area as small as it can):
    GIMP Script: Thatch-t_docs3.jpg

    And the layer stack created for these options:
    GIMP Script: Thatch-t_docs4.jpg

    Oh yeah. I am using a scaled down version of Redrobes' thatch as a pattern. (it is also rotated 90 degrees because the earlier versions of the script required it to be that way...)

    The rest of the demo textures I used came from a variety of texture sites that I took and scaled down... Here is a Google Search.

    -Rob A>
    Attached Files Attached Files

  2. #2
      RobA is offline
    Administrator RobA's Avatar
    Join Date
    Apr 2007
    Location
    Niagara, Canada
    Posts
    5,532

    Tutorial Another use - Making mountain heightfields

    OK -

    I discovered what could become another use for this script... making mountain heightfields.

    From above (gimp alone):
    GIMP Script: Thatch-mtn_final.png

    Rendered in 3D:
    GIMP Script: Thatch-hf1.png


    I started with a selection filled with a shaped spherical fill:
    GIMP Script: Thatch-mtn_hf1.png

    Then using this pattern I made:
    GIMP Script: Thatch-pattern1.png

    I ran the thatch script with 7 sides, no bumpmap or softlight, merging all layers down. I set the result to multiply, 30%:
    GIMP Script: Thatch-mtn_hf2.png

    cont...

  3. #3
      RobA is offline
    Administrator RobA's Avatar
    Join Date
    Apr 2007
    Location
    Niagara, Canada
    Posts
    5,532

    Post

    Then using this pattern:
    Name:  pattern2.png
Views: 396
Size:  3.9 KB

    I ran thatch again, setting the result to 30% multiply as well:
    GIMP Script: Thatch-mtn_hf3.png

    And a third time with this pattern:
    Name:  pattern3.png
Views: 336
Size:  3.2 KB

    With one last run of thatch, with the result to 30% multiply:
    GIMP Script: Thatch-mtn_hf4.png

    I think by tweaking the patterns, possibly making them more turbulent or noisier, I could even get closer.

    -Rob A>

  4. #4
      Hoel is offline
    Guild Artisan Hoel's Avatar
    Join Date
    Nov 2008
    Location
    Skövde, Sweden
    Posts
    657

    Default

    This could be a reason to finally start migrating from PS to GIMP. Looks awsome!

  5. #5
      Karro is offline
    Guild Artisan Facebook Connected
    Join Date
    May 2008
    Location
    Atlanta, Georgia, United States
    Posts
    928

    Post

    Oh, hm. I'm going to have to look into this one and experiment. This could solve a problem I was contemplating: something that was going to take me a lot of work to brute-force... Hmm.
    I think, therefore I am a nerd.
    Cogito, ergo sum nerdem.

    Check out my blog: "The Undiscovered Author"
    It's the story of a writer... follow me in my simple quest to get published, and share your own writing stories, adventures and writerly tips.

    Pimping my worldmap here. Still WIP... long way to go, but I'm pretty proud of what I've done so far...

  6. #6
      jfrazierjr is offline
    Community Leader jfrazierjr's Avatar
    Join Date
    Oct 2007
    Location
    Apex, NC USA
    Posts
    2,963

    Default

    I am not a fan of the top down one due to the repeating texture, though it has a nice potential for a good starting place, BUT, the POVRay 3D one is super frackinlicious!!! Could you try to do a few slightly overlapping heightfields (with various overlap amounts and see what a mountain range might look like (especally the 3D version)??

    Perhaps I could use this as a base and then use the smudge tool to muddy it up a bit to get rid of the repeating pattern and apply a bump map on a 50% grey layer set to overlay might work really well to have some nice foldy creases and crevasses.
    My Finished Maps
    Works in Progress(or abandoned tests)
    My Tutorials:
    Explanation of Layer Masks in GIMP
    How to create ISO Mountains in GIMP/PS using the Smudge tool
    ----------------------------------------------------------
    Unless otherwise stated by me in the post, all work is licensed under a Creative Commons Attribution-Noncommercial 3.0 United States License.

  7. #7
    Community Leader Facebook Connected Steel General's Avatar
    Join Date
    Jun 2008
    Location
    Ft. Wayne, IN
    Posts
    9,463

    Default

    Cool stuff as always RobA - you just may get me to go over to the GIMP-side one of these days.
    My Finished Maps | My Challenge Maps | Ghoraja Juun, my largely stagnated campaign setting.

    Unless otherwise stated by me in the post, all work is licensed under a Creative Commons Attribution-Noncommercial 3.0 United States License.



  8. #8
      Karro is offline
    Guild Artisan Facebook Connected
    Join Date
    May 2008
    Location
    Atlanta, Georgia, United States
    Posts
    928

    Post

    Quote Originally Posted by jfrazierjr View Post
    I am not a fan of the top down one due to the repeating texture, though it has a nice potential for a good starting place, BUT, the POVRay 3D one is super frackinlicious!!! Could you try to do a few slightly overlapping heightfields (with various overlap amounts and see what a mountain range might look like (especally the 3D version)??

    Perhaps I could use this as a base and then use the smudge tool to muddy it up a bit to get rid of the repeating pattern and apply a bump map on a 50% grey layer set to overlay might work really well to have some nice foldy creases and crevasses.
    Hmm. Doing some kind of a selection on the grey-scale, then using the smudge-tool, with a bit of jitter, and stroke the selection, maybe that would be a quick way to get rid of the repeating pattern. Would that even work?
    I think, therefore I am a nerd.
    Cogito, ergo sum nerdem.

    Check out my blog: "The Undiscovered Author"
    It's the story of a writer... follow me in my simple quest to get published, and share your own writing stories, adventures and writerly tips.

    Pimping my worldmap here. Still WIP... long way to go, but I'm pretty proud of what I've done so far...

  9. #9
      torstan is offline
    Community Leader Facebook Connected torstan's Avatar
    Join Date
    Jul 2007
    Posts
    4,149

    Post

    So I have a slightly unrelated question - what program are you using to convert the heightfield to a 3D render?
    Fantasy Map Blog | My food illustration
    Everything I post is free for use and redistribution under the Creative Commons Attribution-Noncommercial-Share Alike 3.0 licence, except where noted otherwise in the thread.

  10. #10
      töff is offline
    Guild Artisan töff's Avatar
    Join Date
    Nov 2007
    Location
    Fresno, California USA
    Posts
    864

    Post

    Quote Originally Posted by Hoel View Post
    This could be a reason to finally start migrating from PS to GIMP. Looks awsome!
    Being a happily mind-numbed Adobephile, may I ask which part of this GIMP procedure doesn't translate somehow to Photoshop?

Page 1 of 2 12 LastLast

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •