![]() |
|
Algorithm for seamless tileablization of any bitmap... |
Edward Sanville
Member #820
December 2000
|
I want to create a utility which will seamlessly tileablize any bitmap it inputs, and output the result to another bitmap file. I have already devised an algorithm to vertically or horizontally seamlessly tilize any bitmap, pseudocode goes like this: |
Matt Smith
Member #783
November 2000
|
just do both methods, one after the other, it should work. There may be more sophisticated algorithms you wish to explore, based on frequencies in the image rather than intensities. This may |
Goku
Member #686
September 2000
![]() |
Sorry Matt, but if it's what I think it is, it won't work to do one after the other. What you could do is instead of doing a rectangle the way you mentioned, do a triangle from the corners to the center. That might work a little better. |
Acheron
Member #790
November 2000
|
You could try merging the top/bottom edges and the left/right edges without actually merging the very corners where overlap occurs. Then merge the corners as a seperate blend. Daniel |
Jason Heim
Member #484
June 2000
|
well, this may get messy with some bitmaps, but i use this "algorithm" (more like a method) to make a tile when i'm using corel photo-paint or whatever: 1 - take the bitmap and shift it by half the width horizontally and half the height vertically, wrapping at the edges. this essentially moves the borders into a 'crosshairs' formation into the center of your image. 2 - now work from the centerpoint of each side, blurring or translucently merging as you which, growing wider as you reach the center of the image. do this incrementally, taking one step closer to the center from each edge at a time. 3 - repeat 1 and 2 at least once. however, you should know that what you are attempting is quite ambitious. for instance, the method i describe above would not work for textures with sharp edges such as marble. it would just look terrible. to do something with sharp edges, i would keep step 1, but step 2 would be much more complex. you would have to discern where the sharp edges were with a edge detection routine. apply segments to the edges, and connect the segments across the borders by shifting the endpoints. then use the morph algorithm on the segments you drew previously. sound messy? i can tell you, it certainly is! but for blurry textures, the first algorithm i described should be somewhat effective. good luck! jase |
Edward Sanville
Member #820
December 2000
|
Thanks guys, for your responses. I've already tried doing my method twice in succession, and as some very smart person suggested, it didn't work. Took me a while to figure out why, though... Apparently this problem if much more complex than I originally anticipated when I began to code my first algorithm. Oh well... |
Edward Sanville
Member #820
December 2000
|
Update on the tilizablizer algorithm! |
Edward Sanville
Member #820
December 2000
|
After exploring the tileability issue some more, it occured to me that one can make a whole array of tiles mutually tileable by using the same algorithm I mentioned above, except by crossing two bitmaps together, one of which has already been self-tileablized. This would make the two tiles mutually tileable. This should come in handy for anyone who wants to make a tile-based game of any kind in which the tiles look convincing, (i.e. not like tiles at all). |
Matt Smith
Member #783
November 2000
|
The Inescapable conclusion of doing this to too many different inputs would be that they all have blurry grey edges. |
Edward Sanville
Member #820
December 2000
|
Yes, what I meant was that you would probably keep one tile as an archetype. For instance, you could make an archetype, seamlessly tileable brick tile, and then work a bunch of other brick bitmaps off of the one, making a whole bunch of slightly different, mutually tileable brick bitmaps. It's too beautiful... |
|