Rarely repeating tiling background textures

Thoughts, Help, Feature Requests, Bug Reports, Developing code for...

Moderators: dorpond, trevor, Azhrei

Forum rules
PLEASE don't post images of your entire desktop, attach entire campaign files when only a single file is needed, or generally act in some other anti-social behavior. :)
Post Reply
liquidavatar
Cave Troll
Posts: 37
Joined: Tue Mar 31, 2009 9:38 pm

Rarely repeating tiling background textures

Post by liquidavatar »

I don't post too often (too busy playing!) but have enjoyed MapTool for several years now. I recently came across an article about tiling backgrounds that was written for web designers but has some application here as well:

http://designfestival.com/the-cicada-pr ... designers/

It all comes down to layering background images with spacing determined by prime numbers. For example, if I have 3 different tiling grass textures that can play nicely together (as exists in some of the texture packs that I've found), I can use this technique. The first tiling layer would just be one of those textures (say it's 100x100 pixels). That layer is a 1 on the prime number list. The next layer would be a 3, so I'd make a transparent png at 300x300 pixels and fill 3 or 4 of the 100x100 squares with my second grass texture. I'd then fill this layer over the first, so that some of that first layer shows through the transparent "squares". I'd then repeat the process for 5 (with a 500x500 pixel image and maybe 5 or 6 of the 100x100 third grass tile) overlaid above the other two layers. Because each image is based on prime numbers, it will be a long time before a pattern emerges (especially if you add another layer or choose higher primes than 1,3,5) and each repeating section of the pattern will be quite large. Ultimately, all of this is done with 3 relatively small, tiling images, so your map size remains manageable even while creating a tiled background with far less perceivable repetition.

If that didn't make sense, don't worry... the article explains it better and even has diagrams ;)

User avatar
Azhrei
Site Admin
Posts: 12086
Joined: Mon Jun 12, 2006 1:20 pm
Location: Tampa, FL

Re: Rarely repeating tiling background textures

Post by Azhrei »

That's a cool idea. Dorpond and I just talked about something like this a couple nights ago, too. What a co-inky-dink. ;)

Anyway, this would work but MapTool would perform best if it could combine them and cache the result. Otherwise as you pan around the map, the program would have to constantly "reflatten" the background layers. I think this could be done in a fairly efficient manner.

Good idea! I'll keep this in mind for 1.4 and maybe something like it can be incorporated into the layer system.

User avatar
IMarvinTPA
Dragon
Posts: 467
Joined: Mon Sep 11, 2006 10:12 am
Contact:

Re: Rarely repeating tiling background textures

Post by IMarvinTPA »

Allow any layer to have a tiling image and then you can make a "backgroundBase1" layer with the 100x100 image, "BackgroundBase3" would have the 300x300 tile, "...Base5" layer would have the 500x500 image, etc. Then you have your "working background" layer with the random 1-off items.

(Then you could have a cloud cover layer with tiled clouds on top of it all...)

IMarv

Post Reply

Return to “MapTool”