-
4 Attachment(s)
Texture synthesizer
Written for Tiles is response to this thread.
The following example uses small textures to synthesize large textures by scanning the smaller texture and attempting to 'stitch' parts of it together.
http://img27.imageshack.us/img27/633/screenshotcd.png
It comes with 7 example textures including; bricks, grass, metal exc..
Before synthesis you can select your quality-to-speed ratio; using high quality can take several minutes.
Uploaded as both rar and zip.
(unpack the folder before running)
-
Re: Texture synthesizer
Method works like charm. Great stuff. Thanks again :)
EDIT, one small question. You start the loop calculate twice in the same line, line 12. Is this by accident or does this increase the quality? I seem to see no difference. But with just one loop it is a bit faster :)
-
Re: Texture synthesizer
-
Re: Texture synthesizer
Hey tiles, the second loop is called after the 'axis' value is changed...
This causes the second loop to scan not the horizontal border pixels; but the vertical border pixels.
-
Re: Texture synthesizer
Ah, i see. That is why you set axis to 0 and 1. I was confused by having the same action twice. Now the things makes perfect sense. Thanks a bunch :)
May i bother you with one more question please? I don`t get what the "different 8" in condition 16 stands for. Could you please enlighten me here? :)
-
Re: Texture synthesizer
It's the color of the overlay. RGB(8,0,0), almost black - MMF uses that instead of RGB(0,0,0) in some cases.
RGB(8,0,0) results in 8.
-
Re: Texture synthesizer
-
Re: Texture synthesizer
maybe I am missing something, but arnt you simply copying part of one image and pasting it into a canvas?
If that is the case, why do you need to do so many loops and run through each pixel? I am sure it is posible with active picture object and the overlay itself and will be 100000x faster.
-
Re: Texture synthesizer
I'm sure it would, bur the loops are not to paste the image; they are to scan the image, allowing it to decide how best to paste it together.
-
Re: Texture synthesizer
I see. I should really have read the wikipedia site first. It still doesnt product completely seamless edges, but its not too bad.
I am sure there would be a photoshop plugin that does this much faster though?