Libraries

Published May 19, 2011
Advertisement
My problem (well, one of them, anyway) is that I like to experiment. This is great and all, but it means that I end up with a lot of half-completed experiments and one-off demos sitting around, that don't do me a whole lot of good. A lot of things never reach "official" status. For example, I've done a lot of tinkering with procedural textures and so forth, and I've done a lot of demos where I'll render out the results of an experiment and go "ooh, pretty", then lose/erase/change things and never see that again. Then when it comes time to do an actual texture for an application, I'll think to myself "That one texture would be perfect; too bad I have no idea how I made it." Then I end up trying to cobble together something from scratch.

Well, recently I've done some work along the lines of procedurally generating the procedures to generate textures; I write a recursive function that can generate a tree of noise modules from which to generate a texture. I've gotten some pretty cool textures this way; but, again, it's all been one-off experimental stuff, and dozens of nice looking patterns have been lost. So today I finally implemented functionality to save and store randomly generated function chains in a library system. I generate the table descriptor from which a module tree is built, and store that descriptor in a directory along with a sample rendered image of the associated texture. I implemented a new module type, "library", which rather than instancing a specific module, will instead look up a descriptor in the library and insert the code for the referenced module chain.

So now, I can iterate a script that generates randomized patterns, then stashes the module descriptors in a library. When I start work on a texture, I can just browse the library until I see something I like, then include it into the module descriptor for the texture. I've had a background process running for a couple hours now, and I've gotten some pretty cool looking textures. And better yet, I "remember" them all and can use them again as needed.
Previous Entry Parse this
0 likes 1 comments

Comments

yckx
That's pretty neato-keen. Procedural textures/modelling/whatever is something I've had a background interest in for some time, but have never gotten around to actually learning much about.
May 20, 2011 02:25 AM
You must log in to join the conversation.
Don't have a GameDev.net account? Sign up!
Profile
Author
Advertisement
Advertisement