Skip to content

Commit 8101efa

Browse files
authored
Merge pull request #69 from Forceflow/dev
Dev
2 parents 8ad0804 + 8147850 commit 8101efa

File tree

3 files changed

+10
-10
lines changed

3 files changed

+10
-10
lines changed

README.md

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[![Build Status](https://travis-ci.org/Forceflow/cuda_voxelizer.svg?branch=master)](https://travis-ci.org/Forceflow/cuda_voxelizer) ![](https://img.shields.io/github/license/Forceflow/cuda_voxelizer.svg) [![Donate](https://img.shields.io/badge/Donate-PayPal-green.svg)](https://www.paypal.me/Forceflow)
22

3-
# cuda_voxelizer v0.4.13
3+
# cuda_voxelizer v0.4.14
44
A command-line tool to convert polygon meshes to (annotated) voxel grids.
55
* Supported input formats: .ply, .off, .obj, .3DS, .SM and RAY
66
* Supported output formats: .binvox, .obj, morton ordered grid
@@ -30,8 +30,8 @@ Program options:
3030
![output_examples](https://raw.githubusercontent.com/Forceflow/cuda_voxelizer/main/img/output_examples.jpg)
3131

3232
## Building
33-
The build process is aimed at 64-bit executables. It might be possible to build for 32-bit as well, but I'm not actively testing/supporting this.
34-
You can build using CMake, or using the provided Visual Studio project. Since November 2019, cuda_voxelizer also builds on [Travis CI](https://travis-ci.org/Forceflow/cuda_voxelizer), so check out the [yaml config file](https://github.com/Forceflow/cuda_voxelizer/blob/main/.travis.yml) for more Linux build support.
33+
The build process is aimed at 64-bit executables. It's probably possible to build for 32-bit as well, but I'm not actively testing/supporting this.
34+
You can build using CMake, or using the provided Visual Studio project. Since 2022, cuda_voxelizer builds via [Github Actions](https://github.com/Forceflow/cuda_voxelizer/actions) as well, check the .[yml config file](https://github.com/Forceflow/cuda_voxelizer/blob/main/.github/workflows/autobuild.yml) for more info.
3535

3636
### Dependencies
3737
The project has the following build dependencies:
@@ -44,7 +44,7 @@ The project has the following build dependencies:
4444

4545
After installing dependencies, do `mkdir build` and `cd build`, followed by:
4646

47-
For Windows with Visual Studio 2019:
47+
For Windows with Visual Studio:
4848
```powershell
4949
$env:CUDAARCHS="your_cuda_compute_capability"
5050
cmake -A x64 -DTrimesh2_INCLUDE_DIR:PATH="path_to_trimesh2_include" -DTrimesh2_LINK_DIR:PATH="path_to_trimesh2_library_dir" ..
@@ -63,7 +63,7 @@ cmake --build . --parallel number_of_cores
6363

6464
### Build using Visual Studio project (Windows)
6565

66-
A Visual Studio 2019 project solution is provided in the `msvc`folder. It is configured for CUDA 11, but you can edit the project file to make it work with lower CUDA versions. You can edit the `custom_includes.props` file to configure the library locations, and specify a place where the resulting binaries should be placed.
66+
Project solutions for Visual Studio 2019 and 2022 are provided in the `msvc`folder. They are configured for CUDA 11, but you can edit the project file to make it work with lower CUDA versions. You can edit the `custom_includes.props` file to configure the library locations, and specify a place where the resulting binaries should be placed.
6767

6868
```
6969
<TRIMESH_DIR>C:\libs\trimesh2\</TRIMESH_DIR>

src/main.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@
2020
#include "cpu_voxelizer.h"
2121

2222
using namespace std;
23-
string version_number = "v0.4.13";
23+
string version_number = "v0.4.14";
2424

2525
// Forward declaration of CUDA functions
2626
float* meshToGPU_thrust(const trimesh::TriMesh *mesh); // METHOD 3 to transfer triangles can be found in thrust_operations.cu(h)
@@ -44,7 +44,7 @@ bool solidVoxelization = false;
4444
void printHeader(){
4545
fprintf(stdout, "## CUDA VOXELIZER \n");
4646
cout << "CUDA Voxelizer " << version_number << " by Jeroen Baert" << endl;
47-
cout << "github.com/Forceflow/cuda_voxelizer - mail@jeroen-baert.be" << endl;
47+
cout << "github.com/Forceflow/cuda_voxelizer - mail (at) jeroen-baert (dot) be" << endl;
4848
}
4949

5050
void printExample() {

src/voxelize.cu

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -128,9 +128,9 @@ __global__ void voxelize_triangle(voxinfo info, float* triangle_data, unsigned i
128128
n_zx_e1 = -n_zx_e1;
129129
n_zx_e2 = -n_zx_e2;
130130
}
131-
float d_xz_e0 = (-1.0f * glm::dot(n_zx_e0, glm::vec2(v0.z, v0.x))) + glm::max(0.0f, info.unit.x*n_zx_e0[0]) + glm::max(0.0f, info.unit.z*n_zx_e0[1]);
132-
float d_xz_e1 = (-1.0f * glm::dot(n_zx_e1, glm::vec2(v1.z, v1.x))) + glm::max(0.0f, info.unit.x*n_zx_e1[0]) + glm::max(0.0f, info.unit.z*n_zx_e1[1]);
133-
float d_xz_e2 = (-1.0f * glm::dot(n_zx_e2, glm::vec2(v2.z, v2.x))) + glm::max(0.0f, info.unit.x*n_zx_e2[0]) + glm::max(0.0f, info.unit.z*n_zx_e2[1]);
131+
float d_xz_e0 = (-1.0f * glm::dot(n_zx_e0, glm::vec2(v0.z, v0.x))) + glm::max(0.0f, info.unit.z*n_zx_e0[0]) + glm::max(0.0f, info.unit.x*n_zx_e0[1]);
132+
float d_xz_e1 = (-1.0f * glm::dot(n_zx_e1, glm::vec2(v1.z, v1.x))) + glm::max(0.0f, info.unit.z*n_zx_e1[0]) + glm::max(0.0f, info.unit.x*n_zx_e1[1]);
133+
float d_xz_e2 = (-1.0f * glm::dot(n_zx_e2, glm::vec2(v2.z, v2.x))) + glm::max(0.0f, info.unit.z*n_zx_e2[0]) + glm::max(0.0f, info.unit.x*n_zx_e2[1]);
134134

135135
// test possible grid boxes for overlap
136136
for (int z = t_bbox_grid.min.z; z <= t_bbox_grid.max.z; z++){

0 commit comments

Comments
 (0)