I am quite knowledgeable on Python, but not so much on Blender. And I have no experience on Python scripting (although eager to learn). My problem is that I have some raw data of height from which I want to build a 3D model.
I have thought of two main alternatives
- Make a Blender script that reads the raw data and changes the Z value of vertices
- Convert the raw data into a Z-height Blender-friendly format
1. Blender Script
Well, it intimidates me a little bit. I have not found a way of accessing the vertices with a sane ordering, and I feel like I will be doing a very ad-hoc thing. However, maybe I haven't look enough at it. I would be delighted to find some similar example, but I have been unable to find it.
2. Blender-friendly format
I thought that maybe using an intermediate representation is a good thing. The data can be reused by other people and adapted. It seems to be resolution agnostic, which is a good thing.
My first approach was using a "Float" TIFF (supported by Pillow). But Blender seems to dislike it (it doesn't seem to read non-colour formats). My raw data is float, so I would prefer to use it. I know that I can use instead a 8-bit grayscale, but this is not enough information for my purposes. 16-bit would be meh-okay --I am ready to settle with that. Which formats would be nice for Blender? OpenEXR seems to be powerful but there is a lack of export tools --I am doing the raw-data conversion from Python scripts.
Sorry if this seems a two-in-one question. But my genuine problem is the one at the top, and I wanted to share some of my thoughts in my two different approaches. Though I hadn't got much far in any of them... :(