Intelligent Sigend Distance Fields
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
 
gjj3 4480eff5f9 test3 test 2 years ago
.idea fix bugs in CUDA codes 2 years ago
common init 2 years ago
data random-connected rod crystal 2 years ago
pybind11 pybind11 2 years ago
sdf_generate random-connected rod crystal 2 years ago
.gitignore init 2 years ago
CMakeLists.txt init 2 years ago
LICENSE Initial commit 2 years ago
README.md init 2 years ago
defines.h init 2 years ago
functions.cu init 2 years ago
functions.cuh init 2 years ago
marchingCubes.cpp init 2 years ago
marchingCubes_kernel.cu init 2 years ago
run.py random-connected rod crystal 2 years ago
tables.h init 2 years ago
test3 test3 test 2 years ago
test_make_sphere_sdf.py random-connected rod crystal 2 years ago
toRaw.py init 2 years ago

README.md

ISDF

Intelligent Sigend Distance Fields

Introduction

隐式曲面的渲染,基于Marching Cubes算法。 使用cuda实现的Marching Cubes算法,参考NVIDIA官方Sample。 提供了运行的脚本(run.py),可使用python3 run.py --help获取提示。

Dependencies

  • cmake >= 3.16
  • cuda >= 10.1
  • openGL >= 3.x
  • python3
  • numpy

Usage

支持以下两种形式的渲染:

  1. SDF文件(序列化后的三维数组)
#根据sdf文件的size,会自动padding成2的幂次。比如100*200*150会padding成256*256*256

#python3 run.py -f ${SDF_FILE}
python3 run.py -f ./data/mesh_test_step_4.sdf
  1. 隐式函数(表达式)
#python3 run.py -d ${demoId} -s ${renderSize} 注意${renderSize}必须为2的幂次
python3 run.py -d 1        #运行demo1,默认分辨率为128*128*128
python3 run.py -d 2 -s 256 #运行demo2,分辨率为256*256*256

一些隐式表达式的demo在functions.cu和functions.cuh中。 如果需要添加,在functions中声明&实现,然后需要修改第63行的eval函数。