Skip to content

Dragon Stanford Voxelize

nicolas-f edited this page Feb 17, 2012 · 5 revisions

Voxel operation sample on Stanford 3D scanned models http://graphics.stanford.edu/data/3Dscanrep/

  • 871414 triangles
  • 437645 vertices

Source surface model in ply format :

Original Dragon model

Use this python script to voxelize :

import fastvoxel as fv
import time

def run():
    deb=time.time()
    #Init Voxelisation with precision in meter
    resolution=0.001
    voxelizator=fv.TriangleScalarFieldCreator(resolution)
    #Load PLY polygonal file and voxelize
    voxelizator.load_ply_model("dragon_vrip.ply")
    #Export in vtk
    voxelizator.export_vtk("dragon_vrip.vtk",-1)
    print "Operation done in ",time.time()-deb," seconds."    

run()

The result seen on ParaView

Voxelized Dragon model

Clone this wiki locally