forked from smistad/GPU-Marching-Cubes
-
Notifications
You must be signed in to change notification settings - Fork 0
A GPU implementation of the Marching Cubes algorithm for extracting surfaces from volumes - porting from OpenCL to Cuda
License
lurtz/GPU-Marching-Cubes
Folders and files
| Name | Name | Last commit message | Last commit date | |
|---|---|---|---|---|
Repository files navigation
Marching cube taken from https://github.com/smistad/GPU-Marching-Cubes and ported to cuda. For building you need to have Cuda, OpenGL, GLEW and GLUT installed. To compile (assuming you are in the top directory): mkdir build cd build cmake .. make After compiling you can run the program: ./mc path/to/voxel/data.raw Please note, that RAW files need a second file, which contains the dimensions of the RAW file. If voxeldata.raw is a RAW file, the other file would be called voxeldata.raw.dim . An example file would look like this: x = 64 y = 32 z = 90 For other example RAW files see: https://bitbucket.org/cg2/opencl/src/c2de329bf761/src/voxeldata In the original opencl code the base layer of the histogrampyramid consisted of uchar4 voxels, which saved in the z coordinate the original voxel value of the voxeldata and did not use the w coordinate. the author said, that it was a cache optimization, but for me there is no difference in speed, when ushing uchar2 and reading the voxelvalue from another array, with which the base layer of the histogrampyramid was constructed. with uchar4 the voxelvolume would have been saved twice on the GPU. maybe I have some other bottleneck in my implementation, so these cache optimization doesn't affect me now.
About
A GPU implementation of the Marching Cubes algorithm for extracting surfaces from volumes - porting from OpenCL to Cuda
Resources
License
Stars
Watchers
Forks
Releases
No releases published
Packages 0
No packages published
Languages
- C++ 54.7%
- C 45.3%