Tuesday, September 13, 2011

Screens of the day 16 - Texturing

Right now I am experimenting with procedurally generating the entire graphics in order to try an almost pseudo 3D like capabilities engine, or more precisely flexibility, but done fully in 2D. 2D engines generally can't do a lot because of the constrains of isometric tile sets and I am aiming to eliminate some of these limitations.

Some tiles can be procedurally generated and some tiles only need to be resized with some special filter to preserve edges and contrast with the background. But it is inevitable that some tiles must be hand drawn at multiple sizes. And doing isometric tiles is kind of hard. So I am experimenting with converting 2D "textures" into isometric tiles. This way you need one texture with a fixed size and maybe you can generate the isometric tiles you need by using layers and coloring.

So let's take some 2D textures. These textures are actually obtained from isometric tiles that were converted to 2D textures and now I am converting them back. The process is going to be lossy. You know what they say about a copy of a copy...



I'll take this generic pink rock pattern and apply the conversion:


The shape is correct, but it does not look that great. Using a slightly less monotone texture gives better results. From this:


We get this:


This is much better IMO. You can see that it is the same pattern.

But doing such smooth patterns tends to hide the problems. Te real challenge is having a conversion that handles very high contrast textures. The kind JPEG compression usually ruins. Let's take this simple pattern:



And convert it: 


Hmmmm. Not that bad. Some ugly vertical tearing, but generally still recognizable.

Keep in mind, I am making up all of these procedural generation algorithms. Those who study such things before hand probably get a lot better results. What do you think about the entire procedural generation of graphics thing?

1 comment:

  1. I love it. I think procedural generation is the way of the future and the gate way to richer gameplay. Honestly I have talked to many legacy (old heads) programmers of our industry about this concept (primarily using procedural algorithms to define the users experience) and they get wary calling it "The Holy Grail of Video Gaming that will never work". I try to bring up games like rouge likes (including Dwarf Fortress) and they seem to blow me off. It is sad. It is completely logical that eventually the programmers and artists will not be able to keep up creating the more and more massive worlds, dialog, art, events, this list can go forever... that users are demanding and expecting from video games. I commend you for any procedural generation and this is one of the main reasons I follow your thread. This is also the reason that I can only truly play rouge likes and DF anymore because any other game makes me feel like the developers created a book for me to read rather than a game (with exception of PVP game models of course). I think it is cool that your are creating a 3D procedural game, (it's about f'n time some one did). (And to all those who are going to throw up "what about bored lands and other games that use procedural generation", I'm sorry but just a randomly generating a new weapon is not the same.

    ( In other words I love the fact that you are putting this in )

    P.S. sorry for the rant, lol.

    ReplyDelete