According to the paper: Physically-Based Shading at Disney
open source projects mentioned: https: //github.com/wdas/brdf
configure its final results:
Where the compilation process or waste a lot of twists and turns.
1.qtcreator installation
I installed: qt-opensource-Windows-x86-5.14.0.exe
qt-opensource-Windows-x86-5.14.1.exe this is actually not QTZlib header files, speechless.
2.zlib libraries also need to compile their own, found here: https: //blog.csdn.net/wodownload2/article/details/104266901
After 3.clone the project is structured as follows:
4. certain adaptations
4.1 installed qtcreator After that, configure the environment variables:
After 4.2 qtcreator open, open project main.pro
to open the project.
4.3 pairs compiler environment settings:
Uncheck.
4.5 pairs brdf.pro file is modified as follows:
TEMPLATE = app
CONFIG += qt5 #debug
prefix = $$PWD
isEmpty(prefix) {
prefix = $$system(pf-makevar --absolute root 2>/dev/null)
}
isEmpty(prefix) {
error("$prefix is undefined. Please pass prefix=<path> to qmake")
}
DEST = $$prefix
isEmpty(LIBDIR) {
LIBDIR = $$system(pf-makevar lib 2>/dev/null)
}
isEmpty(LIBDIR) {
LIBDIR = lib
}
TARGET = brdf
target.path = $$DEST/bin
HEADERS = *.h
SOURCES = \
Quad.cpp \
Sphere.cpp \
BRDFAnalytic.cpp \
BRDFBase.cpp \
BRDFImageSlice.cpp \
BRDFMeasuredAniso.cpp \
BRDFMeasuredMERL.cpp \
ColorVarWidget.cpp \
FloatVarWidget.cpp \
DGLFrameBuffer.cpp \
DGLShader.cpp \
IBLWidget.cpp \
IBLWindow.cpp \
ImageSliceWidget.cpp \
ImageSliceWindow.cpp \
LitSphereWindow.cpp \
main.cpp \
glerror.cpp \
MainWindow.cpp \
ViewerWindow.cpp \
ParameterGroupWidget.cpp \
ParameterWindow.cpp \
SharedContextGLWidget.cpp \
ShowingDockWidget.cpp \
PlotCartesianWindow.cpp \
PlotCartesianWidget.cpp \
PlotPolarWidget.cpp \
Plot3DWidget.cpp \
LitSphereWidget.cpp \
SimpleModel.cpp \
Paths.cpp \
ptex/PtexReader.cpp \
ptex/PtexUtils.cpp \
ptex/PtexCache.cpp \
ptex/PtexHalf.cpp
QT += widgets opengl
DEFINES += PTEX_STATIC NOMINMAX
macx {
CONFIG -= app_bundle
}
brdfs.path = $$DEST/brdf/brdfs
brdfs.files = ../brdfs/*
data.path = $$DEST/brdf/data
data.files = ../data/*
images.path = $$DEST/brdf/images
images.files = ../images/*
probes.path = $$DEST/share/brdf/probes
probes.files = ../probes/*
shaderTemplates.path = $$DEST/share/brdf/shaderTemplates
shaderTemplates.files = ../shaderTemplates/*
pkgconfig.path = $$DEST/$$LIBDIR/pkgconfig
pkgconfig.files = brdf.pc
INSTALLS = target brdfs data images probes shaderTemplates pkgconfig
win32-msvc*{
INCLUDEPATH += ZLIB_DIR
DEFINES += ZLIB_WINAPI
LIBS += E:\workspace\x64\ZlibDllDebug\zlibwapi.lib
}
win32-g++*{
LIBS += -lz
}
unix*{
LIBS += -lz
}
# Windows cross compile at disney
linux-mingw32-custom{
WINDOWS_BUILD=/jobs2/soft/users/aselle/windows-build
LIBS += -static-libgcc
}
4.6 compiled zlib, use one of: E: \ workspace \ x64 \ ZlibDllDebug \ zlibwapi.lib
can.
4.7 zlib.h can not find the file, you need to read:
After these few settings, and can basically run correctly. But may also be an error, because more than opengl es3.0 limit, I changed computer configuration is successful, the reason is unknown, of course, the whole selection:
when the direct collapse, and load the model:
not the correct display problems, but also For further troubleshooting.
The basic configuration of all of the above is the original language of brdf process, the pit has not stepped finished, still need to continue reading the source code will also be analyzed in a future article, so stay tuned.
To select open after brdf file, it does not complain: