spacer

Procedural Texture Generation

CGEmpire, a new forum I’ve been reading, posted a challenge to code a procedural texture generator. After seeing some of the examples in the challenge thread it looked interesting enough to have a go at.

I’ve created a DirectX app with a choice between three different texture generation methods. The first two are very simple, random and linear. Random selects a colour for each x,y pixel randomly and as you would expect is pretty much random noise. Linear draws 5 pixel wide alternating white/black bars, again nothing worth showing.

The third creates a cellular texture. This is my first attempt at generating a Cellular texture and aside from been extremely inefficient in the nearest coord calculation (brute force :( ) the results are quite pleasing.

I’m going to try a few variations on the default cellular algorithm and will post any that are worth seeing, I’ll probably also add a few more texture generators based on other methods such as Perlin noise etc.

Anyhow, heres a screenshot of the first results.


Cellular Texture Example 3

Cellular Texture Example 2

Cellular Texture Example 1

The Texture Generator Sample App is available for download and includes a few generators not shown in the screenshots. I think the best looking one is the Inverse Cellular :)

I’ll upload the final source code later on, too busy adding to it at the moment :)

EDIT:

Source code is now available for anyone that may be interested.

Forum Link updated, thanks Fabricator.

3 Responses to “Procedural Texture Generation”

 
thorsten Says:

hi!
i found your site talking about your texturegen. sadly the forum of the compo isnt reachable for me and so i cant take a look to some examples as you wrote.

do you still have some examples and other stuff to learn from? you could ZIP/RAR the stuff and send me, if you can. would be very great! thanks in advance.

greetz from germany
thorsten

 
Gary Says:

Thorsten: I’ll be uploading the source code to this site in August.

The CGEmpire forums have been having a number of problems with their webhost these last couple of weeks and have been offline for several hours at a time. You might want to try the site again, although bear in mind they’re still having problems.

 
Fabricator Says:

For those still interested, here is the new link to the CGEmpire thread.
http://www.cgempire.com/forum/competitions/454-cge-coding-challenge-1-texture-generation.html

 
 
 
© 2005-2007 Gary Preston
Figment Games is hosted by DreamHost
Entries (RSS) and Comments (RSS).