Development > Artwork

Tools to generate textures

<< < (2/4) > >>

fhstoica:
Finally, I added the tools I mentioned. I also included a new sample texture with the tools, (I did not crop the image).

You'll have to unpack the archive and first modify the Makefile so that it points to your installation of GSL (http://www.gnu.org/software/gsl/), needed for the FFT.

If you work in Linux and have POV-RAY (http://www.povray.org/download/) installed you can uncomment the last line in the start.py file so that the same script will run POV-RAY as well. I am currently working on a Windows machine and I am running start.py under Cygwin. I have to run POV-RAY outside of Cygwin, and process the surface.pov file generated by the scripts.

The quick way to generate a texture is:

./start.py <random_seed> <central_frequency> <decay_power> <output_file>

At the moment it is set up to generate a grid of 128x128 and render the image as seen from above, making basically a contour map.

For example, the image I attached I generated with:

 ./start.py 8991 20 1 surface.png

The central frequency can be somewhere between 0 and 64 (since the grid is 128^2), and the decay power between 1 (for a rough image) and 3 (for a smooth image).  Feel free to experiment with these values. 8991 is just some value I used as seed for the random number generator.

I will write a more detailed description of what each tool does.

krilain:
Thank you.

I will try this. It could be very useful for me for landscape purpose. I've to get rid off the first difficulty as I'm on windows and not on linux.

I'll give you feedback.

fhstoica:
Thanks, I'll wait for your feedback.
You may know this already, but just to make sure, the stock installation of Cygwin comes with GSL included.

krilain:
 :P Omg, I've been in trouble with cygwin. That sys is revenging for I've usually neglected it for 2 reasons, the first is I don't like a soft that tries to write in C:/ directly, I find this strange under the feeble Windows that in my opinion may get troubled for less than that. Second thing is I've always found unsafe to make a downloading bridge for hours (hours taken just for downloading very tiny packages...). In fact I've always thought that cygwin was made for schools where administrators can use a dedicated computer just for download purpose.

Ok, so as I said I've been in trouble, for I had to retrieve GCC I made the same time a "massive" download to the local disk (that was taking days so I had to abort). Then, I tried to install what I've got, but some of the packages were corrupted !... From this point, I've encountered badly encoded directory names (such as 04 ü˜vK箬Nû]ç§ÆÛ§„®è‡Ö­fjý…%«N¦2¦oZ+µ1ë=‰]ɱI —œ fµò¯«î¨U¿›.[W]× ...) that I try to remove right now. And I dont know if I mistake but I'm looking for about 4 Go gone in smoke in 20 minutes when I've let cygwin trying to abort the install....

That's a pity because I wanted really to test your stuff. I plan something that may ask for textured tiles.

Big recursive rm -r -R is waiting instead ....

ps: anyway a search on the web throwed me there : http://gforge.enseeiht.fr/scm/viewvc.php/SPa1/main.pdf?pathrev=106&sortby=author&root=spacify-dsml&view=diff&r1=73&r2=74 ... does that show some try to write files names in Tex???


fhstoica:
Drat, I am really sorry to hear that you cannot install Cygwin.

One possibility is for me to try and port the 2D FFT program to FFTW instead of GSL.
That is because FFTW comes with pre-compiled Windows binaries and can be used from MinGW.
You can also install Python and POV-RAY for Windows, and then there will be no need for Cygwin anymore.

In the meantime, please let me know what kind of textures you would like. Please look at the Python script Generate_Texture.py at the self.color_map definition in line 15 of the script. This will tell you which colors will be used in generating the image. You can then tell me which colors to use and I will generate some samples.

It's not ideal, but it is a way I can help, and you can tell me what changes to make, until I get a painless way for you to use the tools directly.

Navigation

[0] Message Index

[#] Next page

[*] Previous page

Go to full version