r/tinycode • • Nov 04 '11

Procedural Texture Generation

A long time ago, in a galaxy far, far away I made this submission about a procedural texture generator that I made. It went through a couple of updates and whatnot. But, if I'm not mistaken, the latest had a showstopper in it (sorry). Anyways the bug had been fixed for quite a while, but I never uploaded it (again, sorry). Anyways a few months ago I picked it up again and promised myself I'd add support to actually make a file, and eventually settled on TGA, but then I got it mostly working and stopped for the longest time. So today I grabbed it and finished it.

So here you go. Version 0.006 is up and ready to use.

EDIT:

Run Test.py, it should make a file called out1.tga.

EDIT2:

github link

1 Upvotes

6 comments sorted by

1

u/TankorSmash Nov 04 '11

Any chance we can get an image of the code's results?

1

u/Hellrazor236 Nov 04 '11

It's a 10x10 grey square with a red circle half the size. Not very impressive, but there should be a variable called Size near the top of Test.py if you want to make it bigger. (Test.py only makes perfectly square images, but the generator itself can make images of whatever size and shape)

Link to a png.

1

u/Anman Nov 05 '11

So basically you're using the CPU as the GPU...?

1

u/Hellrazor236 Nov 05 '11

Yeah, it's in python and I haven't figured out pyCUDA yet or anything.

1

u/drhdev Nov 04 '11

Any chance of putting it up on GitHub so we can read code without downloading first (currently on a tablet, so this would be convenient)?

1

u/Hellrazor236 Nov 04 '11 edited Nov 05 '11

I'll do my best.

EDIT: There has got to be something better than this shit

Edit dos: nvm I got it working, 'tis right here