While working on some terain generation I want to use an image to store hights. I would like to use Floats for precision, but I can’t how to make PIL (python image library) save “F” mode pictures. Does anyone know how to do this? (prefrably within Blender)
maybe you could use internal blender image capabilities? the new version should have complete floating point support for images.(will be probably in a month)
traceback ...
File "myImage.py", line 7, in ?
File "c:\Python\lib\site-packages\PILl\image.py", line 1305, in save
save_handler(self, fp, filename)
File "c:\Python\lib\site-packages\PILl\TiffImagePlugin.py", line 720, in _save
ImageFile._save(im, fp, [
File "c:\Python\lib\site-packages\PILl\ImageFile.py", line 489, in _save
s = e.encode_to_file(fh, bufsize)
IOError: (0, 'Error')
does anyone know what this means, and if there is a sollution?
cheers Smitje
After some more experiments I’ve kind of decided to leave the floats for now because to manny functions in PIL are giving me a hard time over them.
now I am trying to decide weather to
use an “L” mode immage and convert that to float when needed in Blender (e.g by multiplying with a Float) this has the advantage I can give it a sensible unit (meters)
or
use 2 layers of an “RGBA” mode image. That should give suficient detail, and leave the othes layers for some masking and other calculations (water) but would require a bit more calculation.