Page 1 of 2 12 LastLast
Results 1 to 10 of 12
Like Tree1Likes

Thread: GIMP Script: Scale Pattern

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

    Post GIMP Script: Scale Pattern

    Someone on GimpTalk was complaining that patterns weren't scalable so I though of a work-around.

    I just wrote a script to take the current pattern, scale it and leave a copy in the clipboard. Gimp 2.6 lets you use the image in the clipboard as a fill pattern, so you can just use it from there.

    You can scale from 20% to 500%

    It uses Lanczos scaling working with a tiled copy of the image, so if a pattern is tileable the scaled one will be as well.

    You can access the script by right clicking on a pattern and selecting "Scale Pattern..."

    -Rob A>
    Attached Files Attached Files

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

    Default

    More cool stuff from the GIMP-master.
    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.



  3. #3
    Guild Adept joćo paulo's Avatar
    Join Date
    Sep 2008
    Location
    Brazil
    Posts
    375

    Default

    Thank you so Roba!
    http://www.cartographersguild.com/signaturepics/sigpic3377_5.gif

  4. #4
      Sagenlicht is offline
    Guild Journeyer Sagenlicht's Avatar
    Join Date
    Jul 2008
    Location
    Germany
    Posts
    249

    Post

    Isnt it limited to 512x512 if you use the clipboard?

    At least I got those problems while using it
    My Map Challenge Entries

    I use GIMP for all my maps.

    GIMP scripts and plug-ins overview


    Everything I post on this site uses the Creative Common Attribution-Noncommercial-Share Alike license. Only exception to this are any pyhton scripts which use the GPL.

    If you are using any of my posted stuff just use your rep stick on me

    Should you be interested in using anything I posted on commercial purpose drop me a pm.

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

    Post

    Quote Originally Posted by Sagenlicht View Post
    Isnt it limited to 512x512 if you use the clipboard?

    At least I got those problems while using it
    Correct - the clipboard is limited to 512x512

    I hadn't noticed that because I rarely use patterns that large. Should I cap the size at 512x512?

    Alternately, I could add an option to save it out as a pattern and then refresh the pattern list...

    -Rob A>

  6. #6
      Sagenlicht is offline
    Guild Journeyer Sagenlicht's Avatar
    Join Date
    Jul 2008
    Location
    Germany
    Posts
    249

    Post

    I actually run into that limitation quite often, I hoped that it would be setable in the options but couldnt find it.

    Saving it as a file would be an option I think. That is what I actually do atm. I created a tmp folder in my gurm directory and copy any patterns I created for temporary use there.
    My Map Challenge Entries

    I use GIMP for all my maps.

    GIMP scripts and plug-ins overview


    Everything I post on this site uses the Creative Common Attribution-Noncommercial-Share Alike license. Only exception to this are any pyhton scripts which use the GPL.

    If you are using any of my posted stuff just use your rep stick on me

    Should you be interested in using anything I posted on commercial purpose drop me a pm.

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

    Default

    My textures are mostly 500x500, they rarely show tiling. 512x512 should fit everyones needs.. Except those of you who do real super res maps...

  8. #8
      broadsword is offline
    Guild Applicant
    Join Date
    Jun 2010
    Location
    Walnut Creek, CA
    Posts
    4

    Default

    This whole question of scaling and resolution has me a little confused. Example: For a custom map in a FPS game, I have a 3D heightmap I created in PnP that's 2048 x 2048 px, representing a 2 km square area. Now I'm making the 2048 x 2048 texture map in gimp. I'm using cg textures (made into seamless tiles) as patterns and bucket-filling them to each appropriate layer (e.g., grass, forest floor, water), and adding layer masks, then erasing and using whatever tricks of the trade to let the textures show and merge smoothly. OK, these texture tiles were 512 x 512, but the patterns looked too huge and ungainly for everything except rock. So now I'm working with mostly 64 x 64 px tiles, which seem to be working better. But is there an ideal scale of a tile that corresponds to this scale of terrain? What would it be? Also, is there a way to just swap out a pattern on a layer, without deleting the layer or affecting the layer mask? When I apply a new pattern in bucket fill to an existing layer that has a pattern on it, the fill just adds and mixes the two patterns, rather than replacing the original.

  9. #9
      Gidde is offline
    Community Leader Gidde's Avatar
    Join Date
    May 2009
    Location
    Michigan, USA
    Posts
    2,992

    Default

    Check the "Entire Selection" radio button in the fill options; that'll stop it from mixing them together. For the rest, I'll let someone more knowledgable than me answer

  10. #10
    Guild Master Gracious Donor Midgardsormr's Avatar
    Join Date
    Aug 2007
    Location
    Los Angeles, CA
    Posts
    2,419

    Default

    The ideal size of a texture tile varies based on a few variables:
    • The size of the object it's texturing—A small object will likely need a much smaller texture map than a large one, all else being equal.
    • The relative scale of the texture detail to that object—Blades of grass are much smaller than bricks, so the texture needs to be scaled such that its details are the right size, regardless of the actual resulting size of the texture map.
    • How much area the texture will have to tile over—The smaller the texture, the more obvious the tiling will be.
    • How much memory footprint is permitted—This doesn't really affect what you're doing, since you're laying a large texture over a sizable piece of terrain, and it's likely not spatially compressed, but usually there is a strict memory budget for textures in a video game. A smaller texture that tiles is often better than a large one that doesn't, even though the large texture looks nicer.
    • How close the viewer/camera gets to the textured object. If an object isn't likely to be seen close up, use a lower resolution texture.


    There really isn't a hard and fast rule, other than if it looks right, it is right. And even that one is tempered by the technical requirements of the work.
    Bryan Ray, visual effects artist
    http://www.bryanray.name

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
  •