2D height map to 3D model?

Richard Shea richardshea at despammed.com
Sun Oct 10 23:11:46 EDT 2004


Hi Phil - You don't seem to be getting much in the way of replies so I
thought I would put my 2 cents in ...

PhilC <pcooke at philc.net> wrote in message news:<skfgm0pev6ld2p6k7n2e9q1tt442kselh9 at 4ax.com>...
> Hi Folks,
> 
> I'm looking to write a Python script that will take a 2D BMP (or
> height map) and translate it into a 3D model in OBJ format.
> 

I think you're saying that your input data would be a 2-dimensional
array each element of which would indicate an height above sea level
for that X,Y coordinate (the more I read your original question the
more I doubt my assumption but here goes anyway).

Firstly if you can mangle your data into some format which would be
acceptable as format I suspect that this ...

http://thuban.intevation.org/

... might do that job.

Assuming that you can't do the mangling (I know I couldn't) have you
seen this ...

http://mayavi.sourceforge.net/

... and as an instance of the output you might get, this ...

http://mayavi.sourceforge.net/docs/guide/c919.html#VIZ-DATA

Another option I came across was this ...

http://www.johnny-lin.com/py_pkgs/IaGraph/Doc/manual.html#contour

... I suspect however that you wanted some output that looked, however
roughly, like an aerial photograph - would be interested to know. I
live in a hilly, rather attractive city and have long wondered about
the possibility of being able to build a model of the land in
software.

Sorry this isn't more help. Maybe you could expand on your needs a
little ?

regards

Richard Shea.




> Something of a challenge for me but if it were easy life would be
> boring :)
> 
> Does anyone know if such a script already exists?
> Or any pointers would be appreciated.
> 
> Thanks,
> 
> PhilC



More information about the Python-list mailing list