fzi-forschungszentrum-informatik / gpu-voxels

GPU-Voxels is a CUDA based library which allows high resolution volumetric collision detection between animated 3D models and live pointclouds from 3D sensors of all kinds.
Other
303 stars 85 forks source link

First use GPU-Voxels for collision detection #99

Closed joinway closed 5 years ago

joinway commented 5 years ago

Hello, I want to use GPU-Voxels library to do collision detection of 3D models. I want to use two STL (STereoLithography) file format models for collision detection to find out if there is a collision between the two models and draw the Voxel of the model. What do I need functions to use at the beginning? Is there any example to know the building program? Thank you. My regular use environment is win10 and is developed in VS2013 using C++. I have successfully built the library using cmack.

cjue commented 5 years ago

Hi,

in order to make collision checks, you would need to voxelize your .stl mesh files. This can be done as described here: https://gpu-voxels.org/documentation/model-generation/

The script mentioned there will create .binvox files containing the voxels for a STL file.

As an example for collision detection you can look here: https://github.com/fzi-forschungszentrum-informatik/gpu-voxels/blob/master/packages/gpu_voxels/src/examples/Collisions.cpp

If your build was successful, you should find the binary for this example under build/bin/collisions.

I will close this issue as it is not about an error in GPU-Voxels. Feel free to reply here if there are further questions.