Simple Tile blend/mask software?
Saturday, August 15, 2015 - 11:09
I am working on a simple social 3/4 view game. Just about everything I need is already coded.
I need to make tiles for terrain. All I need done is a simple task. I want to take the two attached textures and get a tile set generated as shown in the diagram (excluding the outer tiles because those would come from one base texture.) Once that is done, I'll re-size and insert myself into the game.
Does any software exist that will do that simple task of taking texture A and texture B, and making a tileset shown in image C, and only does exactly that?
Attachments:
I'll also accept online-based solutions!
You could probably draw two different colors as shown in essay-tiles and then paint the textures there. It might not look pretty but could do the trick...
I did quick example with GIMP. If you need to change textures just use the empty one and paint what ever textures you want to use.
empty.png 2 Kb [2 download(s)]
lavarock.png 218.2 Kb [2 download(s)]
rocklava.png 202.6 Kb [2 download(s)]
I need to apologize, I wasn't entirely clear.
While the simple mask approach looked like it'd work at first, I realized the texture is just pasted/masked over, which won't work.
Texture A should be in tile A. Texture B would be in Tile D. Everything else results from the layered combo of those two textures per tile.
There's also missing transitioning/smoothing for the edges, which I should have mentioned as well and was neglectful in doing so.
I can't believe there isn't some program out there that makes a simple 12-tile set based upon two input images. It seems like it would be the most basic generation tool one could have for 3/4 viewpoints.
will this work ?
Result.png 176.9 Kb [2 download(s)]
Very, very, VERY close, but that would only become one tile (that could get re-sized to my 32x32 end size and that would work for like a pockmark lava bit in the mountain texture.
But I need the directional transition tiles.
So I need a tile set made from two textures, similar to this example set form the Genetica site (I can't understand that software) - first two images are the source textures, the rest are desired results.
Park Pavement Grass.jpg 238.2 Kb [15 download(s)]
Park Pavement Center 2.jpg 204.5 Kb [17 download(s)]
Park Pavement 2 NE.jpg 217.6 Kb [7 download(s)]
Park Pavement 2 NW.jpg 216 Kb [7 download(s)]
Park Pavement 2 SE.jpg 218.8 Kb [7 download(s)]
Park Pavement 2 SW.jpg 219 Kb [7 download(s)]
Park Pavement NE.jpg 202.4 Kb [7 download(s)]
Park Pavement NW.jpg 203.3 Kb [7 download(s)]
Park Pavement SE.jpg 204.7 Kb [5 download(s)]
Park Pavement SW.jpg 204 Kb [7 download(s)]
Park Pavement East.jpg 209.6 Kb [7 download(s)]
Park Pavement West.jpg 208.7 Kb [8 download(s)]
Park Pavement North.jpg 211.1 Kb [7 download(s)]
Park Pavement South.jpg 214 Kb [10 download(s)]
I assumed you would slice that one up. but then there is the problem of seams, are they seamless textures ?
The textures are seamless at the edges, yes.
almost got it, put it up tomorrow
This seems close to what you want but I don't know how to do the other corners and get all to match up.
Result.png 1.1 Mb [1 download(s)]
That is EXACTLY what I want! Thank you!
To reproduce the other corners, one would simply swap the images on the masks (stone would be the inside texture, lava would be the outside) and just clip the outer corner tiles out, that would make the missing group of four corner tiles.
If you have the GIMP file for that with the mask saved, I'd love to get a hold of that! I could easily do the rest (I code, I am horrible at using art programs, but if I have a pre-set framework that's easily modified, then Im good to go!)
I just can't believe there's not a program to do this exact thing!
Actually I'm using my own code, use see I am developing a procedural engine and manipulating textures is a very big part of that. this is something new to me and has created some new challenges so its been kind of fun and given me many more ideas. reversing the imaging will not give you the resaults you desire it is the stencil that must be revesed I think. in my code there is no stencil so it can't be reversed. I could make a black and white of the stencil and maybe you could use that in gimp.
Result.png 13.4 Kb [4 download(s)]
Idea for a procedure to accomplish this:
Input Texture A.
Input Texture B. (textures should be required to be the same resolution, and in a power of 2)
Input Blend Mask.
3x3 grid of each texture is then created, each grid its own separate layer.
Apply chosen blend mask to topmost layer texture.
Merge layers and output the results cut into tiles the size of the original textures. Bonus - be able to output directly to desired tile size, 16x16, 32x32, 64x64, etc. Simple powers of 2.
Undo the merge, swap texture layers, repeat blend mask application to new topmost layer texture, merge, and output, but only cut and output the corner tiles.
That should produce the desired results? Do you think you could create some sort of automated tool to do exactly that? I'm absolutely useless with procedural generation (hence why I can't get a grasp on Genetica, where these textures originally came from.)
You would become the hero to tons of hobbyist and indie game devs. I would bet you'd become a household name for RPGMaker and BYOND people, especially for asset creation tools.
Also, here is a link which might help you in your endeavors all-around. http://devmag.org.za/2009/05/28/getting-more-out-of-seamless-tiles/
People like you are exactly the target for this project. creating or finding usable textures and content are the biggest killer of many a would be game. although my focus will be more on 3D then 2D it will allow for both. and because it is being designed with a soft front end you will be able to customize it to your needs rather then some pre-canned one size fits all solution.
TileWorld.jpg 256.7 Kb [4 download(s)]
If you could make a simple executable just to automate what we've talked about, you'll have handled about 95% of the problems tile-based gamemakers have in tile generation, as transitional tiles are probably the hardest thing I've come across! Just that kind of tool alone seems to not exist, at least not in such a simple input a/input b/input c=output format.
I'm going to do a manual cut and insert into the BYOND editor, and give the current 8-tile set a shot. I'll post a pic in a bit!
Here's your current 8-tile cutout in action! Looks GREAT, but you see those other four corner pieces need to be made to round out the full set!
LavastoneTest.png 250.2 Kb [0 download(s)]
try this and see if it will work
Result.png 1.1 Mb [1 download(s)]
You are EVER SO CLOSE. I think the blend mask size used is just a wee bit off (look at the inside corners) perhaps if the size of themask were increased a few pixels? 4 or so miiight work? Unless you're using the same size mask as from before, in which case I do not know what is causing this very minor mis-matching!
As-is, only the truly discerning eye would notice the flaw.
sososoclose.png 279.3 Kb [2 download(s)]
I used the same script,just switched the order of the textures. I am not surprised though at the out come. I'll have to rethink this probable new stencils so may take a while since a have go back to work.
As-is, you've done an outstanding job and I cannot thank you enough, it's almost perfect!
Maybe it's the huge disparity in contrast between the textures?
Let's try it with something closer in relative contrast levels. How about these two? Take your time! These are 256x256.
grass1.jpg 62.2 Kb [1 download(s)]
sand1.jpg 42.5 Kb [4 download(s)]
I am working on a new Idea. havent got it all figured out yet as I need a new flood fill that on alpha levels rather then color. I created a brush that blends the textures as it draws and then flood filled the lava inside. once I have the alpha flood completed I should be able to flood over the outside without going over into the lava side.
LavaRock.png 92.3 Kb [0 download(s)]
That looks fairly interesting! My concern would be that the requirement of a 3x3 grid of each texture is still there, but I assume that's a simple thing to do, having been done once already!
I do like the results of the old method. If that blend mask issue could be isolated, that would been the perfect stand-alone tool.
once it is complete it should look the same. I think, just a hole lot easier since I won't have to joint the tiles to draw them.
Ahh! Awesome!
I look forward to seeing the next results! Maybe the code, if I ever get too curious. I'd love to turn this into a BYOND library, but I'm still busy as heck working on a live sandbox and the ability for players to upload their own character sprite!
Hey! I had an idea!
Instead of trying to figure out the blending issue, would it wor if you just did an inverse transparency mask instead for the second part of the texture generation?
The old way is painfully slow, and no I wont give you my code, nice try though
It is your code to do with as you desire. I was going to try to improve upon it as thanks for your help.
Like give it 255 tile generation, with de-duplication of tile states once I fixed the de-duplication issues with using only two source tiles, kill the requirement for the imported file to be in RPG Maker format, and popped in tile blending.
Like this.
result4.png 16.4 Kb [1 download(s)]
thanks but no thanks, my interest is in 3d like the photo I showed you. everything there was created with scripts. the map the tiles the trees all scripts. anyway the new design seems to be working as planned I should have the new tiles up in a day or two
Sounds sweet! I look forward to seeing the results!
trying to get dropbox to work so I dont have to convert all to png and upload all one at a time
Zip + sendfile?
https://dl.dropboxusercontent.com/u/17721962/LavaRock.zip
try this
Those look great! I'm going to put them in tomorrow and test them out, I'm about to start cooking then I need to sleep after eating!
I'll let you know how it goes!
Apologies, I've had unexpected company announce they were coming by, and I've been doing a ton of house-cleaning and dog-proofing. I'll get the results up as soon as I have free time to sit dwn at the map editor!
That's pretty much perfect! I like the finer transition, as well.
Spot-on.png 183.1 Kb [0 download(s)]
there are many possibility s with the new design. its faster so tiles could be created on demand. rather then saved and stored. brush size can be changed which would change the transition as well. the lines are drawn so as long as the start and stop points end in the right place the shape of the bends can change as well.
of course with a 32x32 tile this doesn't really mean much but enter the world of 3d and 256x256 tiles are total feasible
Judging by my current world view range, I could take these to 96x96 for a 4K version of my project and it would look great!!
This is a most excellent job. Are you going to turn this into a program for others to use or is it ust for your own project?
It is too soon to tell what I'm going to do with it, so for now I just keep working on it.
Keep at it! I'll toss credit for the tiles you've curently generated into my game.
I've just finished the sandbox part of the project. Once I get custom sprite insertion in, I'm literally only stuck with making tile art and tweaking bits of code.
sandboxbuilding.png 356.5 Kb [0 download(s)]
Thanks for the credit,your map is looking good.got some new stuff I'm playing with and I found a sight that has some interesting stuff. it all java so I have to convert it to pascal so I can play with it
http://www.openprocessing.org/
My god, Pascal. I haven't played with that since Turbo Pascal in the late '80s/early '90s.
It's much different now. I never played with turbo pascal, before Delphi it was AmigaE back it the days of Amiga and before that it was basic and asmemble on the C64.
Now I do Lazarus on linux. guess I get around
I feel out of date working ASM on horticultural-purposed microcontrollers!
are you creating the garden of the future ?
Created, redesigned, and updated. Now I've got 100w 120cm LED tubes, China's still trying to sell 18w-36w 'High Power" LED tubes.
Bravo, what are you growing? you know pascal does micros
I grow everything, from barley and wheat grass to weed (medically licensed) to bonsai plants.
Oh, I have custom character capability now impelmented. All that's required now is tile work!
Could I perhaps trouble you for more, good sir? The sand/grass up above, grass/water, and water/sand? That would give me desert, island, oasis, beach, and probably a couple of other things I have not thought of, yet!
I've included a water tile. Might need to re-size it.
As always, credit will be given!
Water.png 450.1 Kb [4 download(s)]
Pages