Interesting approach to write image files directly from SDL :)
Note since you already have the array inside POV-Ray an alternative
way might be to create one box for each "pixel" and let povray do the
image creation by rendering to 16-bit PNG or PPM (+FN16 or +FP16).
It probably requires ortographic camera and some fiddling with
screen.inc for exact positioning. However it won't work if you want
to render a scene in one pass where first the image is created and then
immediately used in a height_field (that would require something like
the camera pigment in MegaPOV, not sure if that already exists in
some of the current POV derivates).
BTW I think the main usefulness of a heightfield image is ease of
use and import of data from external sources, but in your case you
might also consider building a mesh from the array data and render
that directly.
Post a reply to this message
|