After seeing a lot of theoretical knowledge related to the spherical harmonic, found paper come Zhongjue ah! ! !
Persevering, powerless, as good as others, search the web search, or copy someone else's project, but with the desire to own a small spherical harmonics.
It is strongly recommended authors to upload source code, to give a detailed configuration, as well as complete project.
So for learners, but also to avoid detours, but also it can not be forced, after all, is free.
That in this poor environment, how to learn a technology? Summarize the following points:
1 / Patience online configuration items, their own pit row
2 / acquire a certain amount of theoretical knowledge, even in the face of incomplete projects, but also properly configured;
3 / demand side of Daniel, see if you can teach.
4 / with the network requirements cattle;
3/4 is not recommended, because the reliability rate is essentially zero, recommendations or self-fly.
Further ado, let's enter the configuration steps.
1 / use the original project: HTTPS: //github.com/lianera/SphericalHarmonicsLighting
clone down. Will not git directly download zip package is also possible. But the benefits of git is that you can have version control, not much to say, cramming it yourself.
2 / Double-click to open the .sln file:
Here I use the vs 2017 version
3 / directly translated
it would certainly incorrect report, the average person, this would direct discouraging. I did not move it.
4 / resolve the error:
First framework is missing in the header file: glew related header files,
download glew-2.1.0.zip glew library
I have uploaded Baidu Cloud:
link: https: //pan.baidu.com/s/ 10ORggZ4WuDh_i7TITNdMpw
extraction code: zaba
other libraries, also uploaded.
Well, after this library download, unpack, set the include file:
Rebuild, and being given:
Download glfw library: glfw-3.2.1.zip
settings include directory:
Build the solution again:
lack glm library:
Downloads: glm- master.zip.zip
settings include directory:
re-generation solutions:
lack assimp library:
Downloads: assimp-3.1.1_no_test_models.zip
settings include:
Build the solution again:
lack opencv library:
opencv download and install on their own:
opencv-4.2 .0-vc14_vc15.exe
he is installed, unzip the way, so it is very convenient:
Again generation solutions:
stb_image.h Download:
Set include:
Build the solution again:
设置sample项目依赖的opencv的库:
再次生成解决方案:
再次生成解决方案:
再次生成解决方案:
再次生成:
这里需要配置opengl的库,这个安装了vs之后,就会有的,具体目录在:
C:\Program Files (x86)\Windows Kits\10\Lib\10.0.17763.0\um\x86
所以加入这个依赖的库:
同时加入库所在的目录:
重新生成解决方案:
发现可以了。
ok,运行项目:
发现找不到dll,ok,将如下的dll包括到debug目录:
再次以断点的方式运行:
发现资源没有,作者呀作者,你到底在干嘛,所以我找了其他的资源代替:
这里我也上传了:
把图片的改为:
把参数该少一点,再次运行:
好了,到次运行成功了。
接下来补充几点:
1/我是在vs2017上的配置的,并且是x86版本。
2/这里还有很多没有讲到的,就是关于
assimp-3.1.1
boost_1_72_0
glfw-3.2.1
opencv
上面这几个,都需要编译一个x86的库,这个需要安装cmake才能生成sln,然后编译对应版本的lib,才行,详细参考我之前的博客:
https://blog.csdn.net/wodownload2/article/details/77905708
So far it has all been to explain finished, all the way to spend a day, or very time-consuming.
The reason the project is not complete, no configuration documentation.
Next, I will carefully study the code which will make notes in a timely manner, and for sharing.