Compiling
If you would like to compile Regard3D by yourself, you can, since it is an open-source project. However, some experience with C/C++ and CMake is required.
I will only describe here how to compile Regard3D itself, not the third-party executables or libraries. Please see their respective homepages.
Please note: The following guide is outdated. Unfortunately I don't have time to keep it up to date, this text can still be used as a guideline. The most notable difference to recent versions of Regard3D is that you need to compile OpenMVG as a library, and the parameter -DOPENMVG_SRC_DIR=...
is not required anymore. PCL is not a used in Regard3D anymore.
For Windows, the scripts in my repository build-scripts might give you a easier start into compiling Regard3D:
https://github.com/rhiestan/build-scripts
They might also be interesting to other platforms as well.
Compiling on Linux
Unfortunately, I haven't had the time lately to compile Regard3D on Linux myself. However, Brenton Ross, a user of Regard3D with lots of C++ experience, has documented his steps to compile Regard3D. Please see his PDF:
A big thanks to Brenton!
Compiling on Windows and OS X
Compiling on these platforms is very similar to compiling on Linux, with the exception that all third-party libraries must be compiled, which is a big undertaking. Please don't try it if you have not at least 1-2 days to spare and some perseverance. To give you an idea, this is my cmake command for compilation on Windows with MinGW (the shell variables are set in a script beforehand):
cmake -Wno-dev -G "MSYS Makefiles" -DCMAKE_BUILD_TYPE="Release" -DCMAKE_VERBOSE_MAKEFILE=FALSE -DMSYS=TRUE -DOPENMVG_SRC_DIR=$OPENMVG_SRC_DIR -DUSE_SSE2=TRUE -DTARGET_ARCHITECTURE="generic" -DR3D_REMOVE_ADDITIONAL_LIBRARIES=TRUE -DNLOPT_ROOT_DIR=$NLOPT_ROOT_DIR -DR3D_USE_OSG_STATIC=TRUE -DR3D_ADDITIONAL_LINK_LIBRARIES="$R3D_ADDITIONAL_LINK_LIBRARIES" -DR3D_ALT_wxWidgets_INCLUDE_DIRS="$R3D_ALT_wxWidgets_INCLUDE_DIRS" -DBLAS_INCLUDE_DIR=$BLAS_INCLUDE_DIR -DLAPACK_INCLUDE_DIR=$LAPACK_INCLUDE_DIR -DBLAS_LIBRARIES=$BLAS_LIBRARIES -DLAPACK_LIBRARIES=$LAPACK_LIBRARIES -DR3D_USE_BLAS=TRUE -DCERES_DIR=$CERES_DIR -DSUITESPARSE_DIR=$SUITESPARSE_DIR -DFLANN_ROOT=$FLANN_ROOT -DOpenCV_DIR=$OpenCV_DIR -DOpenCV_STATIC=ON -DwxWidgets_ROOT_DIR=$wxWidgets_ROOT_DIR -DwxWidgets_CONFIG_EXECUTABLE=$wxWidgets_CONFIG_EXECUTABLE -DZLIB_ROOT=$ZLIB_ROOT -DPNG_PNG_INCLUDE_DIR=$PNG_PNG_INCLUDE_DIR -DPNG_LIBRARY=$PNG_LIBRARY -DTIFF_INCLUDE_DIR=$TIFF_INCLUDE_DIR -DTIFF_LIBRARY=$TIFF_LIBRARY -DJPEG_INCLUDE_DIR=$JPEG_INCLUDE_DIR -DJPEG_LIBRARY=$JPEG_LIBRARY -DOSG_DIR=$OSG_DIR -DOPENTHREADS_LIBRARY=$OPENTHREADS_LIBRARY -DOSG_PLUGINS="$OSG_PLUGINS" -DEIGEN3_INCLUDE_DIR=$EIGEN3_INCLUDE_DIR -DPCL_DIR=$PCL_DIR ../src
Some tips concerning third-party libraries
- These days there are a couple of C++ package managers. On Windows vcpkg is recommended, as it supports most packages which are required by Regard3D.
- Please use a new version of wxWidgets (>= 2.9). Version 2.8 might also work, but I recommend to use 3.0 and up
- PCL 1.7.1 has a bug in writing PLY surfaces, and it will lead to crashes in Regard3D, for example during colorizing vertices of a surface. Please use PCL 1.7.2 (which is the newest at the time of writing)