Seamless texture generator

0 favourites
  • 12 posts
From the Asset Store
Ambient Atmospheric Nature Music Inspired By Planet Earth
  • Hi, all. I constantly find myself needing seamless textures and yet taking existing images or trying to draw your own mostly results in crappy results with visible patterns, etc. Random generation to the rescue!

    It's super-terrible coding wise for now so hopefully together we can shape it into something usable and useful to the community here. Check out the current version:

    [attachment=2:2k1bxmk2][/attachment:2k1bxmk2]

    Button controls from left to right:

    Add single item

    Add items continuously

    Delete single item (doesn't work yet)

    Delete all items

    Save state (doesn't work yet)

    Load state (doesn't work yet)

    Export PNG

    So the basic idea is to have a decently sized library of different base items - then you set parameters for them, such as min and max size, angle randomness, color adjustments and off we go:

    [attachment=1:2k1bxmk2][/attachment:2k1bxmk2]

    [attachment=0:2k1bxmk2][/attachment:2k1bxmk2]

    Doesn't look like much so far, but with more variety for elements and some UI changes it could be rather neat.

    Known issues (I might need help with):

    Export exports the current canvas size, but if I try to change the canvas size beforehand it still exports the whole thing. Is there a way to export just the square part?

    There are no other elements to pick with the buttons at the top for now.

    The color variety buttons need to become dual just like size - this is coming in the next version.

    The way the sliders create values is terrible - is there a better way?

    Ideas for things to add:

    Item families - like rocks with different shapes, metal plates with different looks, etc. And then those get picked randomly.

    Ability to load your own base image - can C2 do this?

    Open to your suggestions as well, of course.

  • Well now, certainly a valiant effort. What if I told you there is already such a program?

    Feel free to continue work on this project if you want to be able to generate textures in game, that would be awesome.

    But I'm going to let you in on a secret I've been keeping for a long time, a I am using it in one of my games thats currently on the back burner so to speak.

    The program is called Genetica Viewer, and its free. It does exactly what you describe and more. I made Tileable textures for metal plate, moon surface, alien terrain. There is a random texture for literally anything you can imagine.

    But it would be cool to do this kind of thing on the fly as I said. Good luck

  • I'm actually aware of genetica - and while it's a good program it has certain downsides - not being available on a tablet being one of them, followed by that "uncanny valley" look that comes from using photographs and realistic generated textures.

    Let me give a relateable example - I took the liberty of imagining a scenario where you'd like to have a larger "forest" of those green platforms in your game - you load that single platform image, set the angle and hue variety and in about a minute you get this (this is actually a 2x2 of already generated images, so already tiling):

    Another usage scenario I hope to implement is making corners and such easier by being able to "trim" the existing pattern by deleting separate objects. So you basically generate a square seamless pattern and then "slice" off corners and get several varieties, all tileable.

    Actually thanks to you mentioning Genetica I had the idea of adding a warp layer so you could distort the bottom images with adding more on top. That should give even more variety.

    Also changing the UI to give more control over color variety - that way it will be possible to create a huge variety of surfaces. My current project involves a bird's eye view so having seamless yet not too patterned tiles is important.

  • Well, while the forums were down I managed to greatly move the "app" forward. Now most of the functions work and it's possible to make a good deal of different textures - from abstract to cartoony to realistic. Here are some examples:

    [attachment=2:1xz2wn0k]Seamless (37).png[/attachment:1xz2wn0k]

    [attachment=1:1xz2wn0k]Seamless (45).png[/attachment:1xz2wn0k]

    [attachment=0:1xz2wn0k]Seamless (46).png[/attachment:1xz2wn0k]

    By saving and loading states, using undo and playing around with the variety settings one can achieve some rather neat designs. Right now the main issue is creating interesting and usable "brushes". That, and saving just the image, not the whole screen.

    You can grab the project (and hopefully add or improve something) here: https://dl.dropboxusercontent.com/u/132 ... s%20D.capx

  • very very nice!!

  • Try Construct 3

    Develop games in your browser. Powerful, performant & highly capable.

    Try Now Construct 3 users don't see these ads
  • That's really cool. I wonder if there's a way to add importing your own library of objects.

  • Burvey - since the project is open you can just load your own images into the main sprite. They should be square and preferably 256x256 pixels.

    I would like to add the ability of importing/drawing your own images on the fly, but we'll see how that goes. I'm currently making another "generator", this time for objects.

  • Yeah, I know, I was referring to doing it on the fly.

    I actually saw your object generator first and I really like it. I hope you're able to keep making it better and better. It has a ton of potential IMO.

  • Thanks for the kind words, Burvey - I'm actually working on it as we type - there's going to be save states, more color choices, possibly smarter controls and more. Working on the new tileset now, I suspect it's going to enable nearly limitless little battle machine variety:

  • I can imagine it being used not only for prototyping and creating objects for use in games, but also being able to be integrated into games as well. Imagine giving game players the ability to design their own race cars or tanks etc in game.

  • Certainly a possibility, but that would require easier controls - perhaps floating buttons or such over the shapes you drag in. That makes it slower, though. Well, if you check your PM you might get a closer look at what it's like now.

  • Very cool! I really enjoy playing with this.

Jump to:
Active Users
There are 1 visitors browsing this topic (0 users and 1 guests)