scipy - In Python, how can I export a 3D isosurface into Blender -


i have 3d (x,y,z,value) data in python , can visualize isosurfaces in mayavi. how can export isosurface file can read blender?

here example code:

import numpy mayavi import mlab  x, y, z = numpy.ogrid[-5:5:64j, -5:5:64j, -5:5:64j] values = x * x * 0.5 + y * y + z * z * 2.0 mlab.contour3d(values, contours=[.5]) mlab.show() 

using @timday's suggestion, added following code save isosurface in wavefront (.obj) format:

mlab.savefig('surface.obj')

then, can open in blender file>>import>>wavefront (.obj)

i had scale down image considerably (~100x) make visible in blender viewport.

enter image description here

the origin set way off side of actual object, object easier deal if use object>>transform>>origin geometry

enter image description here

after adding lighting , plane, object looks pretty good!

enter image description here


Comments

Popular posts from this blog

javascript - how to protect a flash video from refresh? -

android - Associate same looper with different threads -

visual studio 2010 - Connect to informix database windows form application -