-
Notifications
You must be signed in to change notification settings - Fork 44
Description
A list of installation struggles+solutions for mesh-fusion on Mac. There could be better ways around these problems but this is what got me to a running state.
Before following the build instructions in the readme,
In libmcubes/pywrapper.cpp replace
double upper[3] = {shape[0]-1, shape[1]-1, shape[2]-1};
with
double upper[3] = {static_cast(shape[0]-1), static_cast(shape[1]-1), static_cast(shape[2]-1)};
it's a c++ compier version thing.
do not pip install pyrender ahead of time.
if using brew to install omp, glew, glu, glut, gl, mesa, blah blah, then in librender/setup.py use these arguments:
extra_compile_args = ["-ffast-math", '-msse', '-msse2', '-msse3', '-msse4.2', '-O4',
'-I/opt/homebrew/include'
]
extra_link_args = [
'-L/opt/homebrew/Cellar/glew/2.2.0_1/lib',
'-L/opt/homebrew/lib', '-lGLEW', '-lglut', '-lGL', '-lGLU']
in common.py replace time.clock() with time.process_time(). clock is deprecated.
Before running,
replace all of librender/init.py with
from .pyrender import *
go to 2_fusion.py and change use gpu to false
inside libfusioncpu/build copy libfusion_cpu.dylib and paste it as libfusion_cpu.so
use "from .cyfusion import *" in libfusioncpu/init.py. dont replace the whole file this this though. just the one line.
make the directories ahead of time or it'll error
/examples/1_scaled
/examples/2_depth
/examples/2_watertight
/examples/3_out
Install meshlabserver from https://github.com/cnr-isti-vclab/meshlab/releases/tag/Meshlab-2020.07
more recent releases opt for python interface so meshlabserver is essentially deprecated
in 3_simplify.py replace meshlabserver on this line
os.system('meshlabserver -i %s -o %s -s %s' % (
with
/Applications/meshlab.app/Contents/MacOS/meshlabserver
Do the fix suggested here for meshlab decimation issues
#15
Typos in the readme for running the example. Corrected versions here
python 1_scale.py --in_dir=examples/0_in/ --out_dir=examples/1_scaled/
python 2_fusion.py --mode=render --in_dir=examples/1_scaled/ --depth_dir=examples/2_depth/ --out_dir=examples/2_watertight/
python 2_fusion.py --mode=fuse --in_dir=examples/1_scaled/ --depth_dir=examples/2_depth/ --out_dir=examples/2_watertight/
python 3_simplify.py --in_dir=examples/2_watertight/ --out_dir=examples/3_out/