GithubHelp home page GithubHelp logo

wdas / brdf Goto Github PK

View Code? Open in Web Editor NEW
2.0K 2.0K 361.0 6.55 MB

BRDF Explorer

License: Other

Shell 0.02% C++ 89.34% C 3.37% Objective-C 2.87% QMake 0.10% GLSL 4.16% CMake 0.11% Makefile 0.03%

brdf's People

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

brdf's Issues

Warnings during build on OSX 10.10 due to deprecated functions and stuff

Deprecated functions:

/Users/marko/WC/GIT/brdf/src/brdf/IBLWidget.cpp:68: warning: 'gluErrorString' is deprecated: first deprecated in OS X 10.9 [-Wdeprecated-declarations]
        const char *errDescr = (const char *)gluErrorString(glErr);
                                             ^
/Users/marko/WC/GIT/brdf/src/brdf/IBLWidget.cpp:321: warning: 'gluLookAt' is deprecated: first deprecated in OS X 10.9 - "Use GLKMatrix4MakeLookAt" [-Wdeprecated-declarations]
    gluLookAt( lookVec[0], lookVec[1], lookVec[2],
    ^

/Users/marko/WC/GIT/brdf/src/brdf/IBLWidget.cpp:566: warning: 'gluOrtho2D' is deprecated: first deprecated in OS X 10.9 - "Use GLKMatrix4MakeOrtho" [-Wdeprecated-declarations]
    gluOrtho2D(0.0, (float)width(), 0.0, (float)height());
    ^

/Users/marko/WC/GIT/brdf/src/brdf/Plot3DWidget.cpp:176: warning: 'gluPerspective' is deprecated: first deprecated in OS X 10.9 - "Use GLKMatrix4MakePerspective" [-Wdeprecated-declarations]
    gluPerspective(FOV_Y, float(width()) / float(height()), nearPlane, farPlane);
    ^

Malformed header guards:

/Users/marko/WC/GIT/brdf/src/brdf/MainWindow.h:46: warning: 'MAIMWINDOW_H' is used as a header guard here, followed by #define of a different macro [-Wheader-guard]

/Users/marko/WC/GIT/brdf/src/brdf/geodesicHemisphere.h:46: warning: '_GEODESIC_HEMI_H_' is used as a header guard here, followed by #define of a different macro [-Wheader-guard]

Wrong expressions?

/Users/marko/WC/GIT/brdf/src/brdf/ptex/PtexUtils.cpp:48: warning: comparison of constant 2 with expression of type 'Ptex::MeshType' is always false [-Wtautological-constant-out-of-range-compare]
    if (mt < 0 || mt >= int(sizeof(names)/sizeof(const char*)))
                  ~~ ^  ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

/Users/marko/WC/GIT/brdf/src/brdf/ptex/PtexUtils.cpp:57: warning: comparison of constant 4 with expression of type 'Ptex::DataType' is always false [-Wtautological-constant-out-of-range-compare]
    if (dt < 0 || dt >= int(sizeof(names)/sizeof(const char*)))
                  ~~ ^  ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

/Users/marko/WC/GIT/brdf/src/brdf/ptex/PtexUtils.cpp:75: warning: comparison of constant 4 with expression of type 'Ptex::EdgeId' is always false [-Wtautological-constant-out-of-range-compare]
    if (eid < 0 || eid >= int(sizeof(names)/sizeof(const char*)))
                   ~~~ ^  ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

Linux build fix

Building brdf on Arch Linux 64 failed on my machine. Adding

LIBS += -lz -lGLEW -lGLU -lglut to src/bin/brdf.pro

fixed that issue. Would be great if you could add that.

Is it possible to use this tool with BTDFs (and thus with BSDFs) ?

I haven't seen any BTDF nor BSDF in the brdfs folder, so I'm wondering if this tool can be used to preview transparent/translucent materials, and how. I admit that accurate refraction cannot be expected from OpenGL --unless very advanced GPU coding is used-- but, even if refractions are non-accurate, reasonable good results (color-wise) could be achieved...

Who should I credit?

I'm including some images generated by this program in my thesis. Should I put WDAS as the author of this package, or Andrew Selle?

build fixes for OSX

Hey all, in case it's useful:

To build on OSX, I had to add -lz to the Makefile to pick up the zlib symbols. Also, I had to modify Paths.cpp to allow it to find files. I hardcoded my own path to get past that hurdle, so I'm not providing a patch here, there's probably a proper way to resolve the problem.

Couldn't render on Ubuntu 18.04

This error presents on my system. I don't see anything on the screen.
Compiler: g++ (Ubuntu 7.3.0-27ubuntu1~18.04) 7.3.0
Qt: QMake 3.1, Qt 5.9.5
GPU: GTX 1050Ti
Driver: NVIDIA 418.56

Screenshot_2019-04-10_17-11-23

Console output

DGLShader: Error reading file ./shaderTemplates/Plots.vert
DGLShader: Error reading file ./shaderTemplates/Plots.vert
opening ./probes/beach.penv... OpenGL Error invalid operation (1282) in file ../../../brdf/src/brdf/IBLWidget.cpp:595
success
opening ./data/sphere.obj...  Time to load OBJ: 383 ms
success
DGLShader: Error reading file ./shaderTemplates/Quad.vert
DGLShader: Error reading file ./shaderTemplates/Quad.vert
libpng warning: iCCP: known incorrect sRGB profile
DGLShader: Error reading file ./shaderTemplates/Plots.vert
OpenGL Error invalid operation (1282) in file ../../../brdf/src/brdf/PlotPolarWidget.cpp:184
OpenGL Error invalid operation (1282) in file ../../../brdf/src/brdf/PlotPolarWidget.cpp:297
OpenGL Error invalid operation (1282) in file ../../../brdf/src/brdf/PlotPolarWidget.cpp:297

dont use glsl reserved keywords as variable names

i've made a few modifications to make the radeon driver (fglrx 12.9) compiles brdftemplateAnglePlotAlbedo.vert, and measured.func, ie don't use half as a variable name and proper float litterals (0.0)

Question about license - if I create derivative work, does Disney own it?

The license states that:

Subject to the terms of this license, including the license
conditions and limitations in section 3, each contributor grants you a non-exclusive,
worldwide, royalty-free copyright license to reproduce its contribution, prepare
derivative works of its contribution, and distribute its contribution or any derivative
works that you create.

If I create derivative work (i.e. fork on GitHub and make some modifications), does Disney own the copyright to the derivative work? If I create derivative work, am I granting Disney a non-exclusive, worldwide, royalty-free copyright license?

Fails to run on late 2009 iMac with "ERROR: 0:46: '' : version '130' is not supported"

Although the BRDF explorer built and ran fine (after a little .pro file tweaking) it fails when trying to get it to output a 3D graph with this:

ERROR: 0:46: '' :  version '130' is not supported
WARNING: 0:47: extension 'EXT_gpu_shader4' is not supported

System: late 2009-iMac running OSX 10.10 with additional libs installed via MacPorts
Graphics card built-in: ATI Radeon HD 4670 256 MB

Project ERROR: $prefix is undefined. Please pass prefix=<path> to qmake

Hello,

When I try to qmake then make install

I get this error :

cd src/brdf/ && ( test -e Makefile || /usr/lib/qt5/bin/qmake -o Makefile /path/to/brdf.pro ) && make -f Makefile 
Project ERROR: $prefix is undefined. Please pass prefix=<path> to qmake
Makefile:44: recipe for target 'sub-src-brdf-make_first-ordered' failed
make: *** [sub-src-brdf-make_first-ordered] Error 3

I tried doing this from : https://stackoverflow.com/questions/14639459/how-to-change-qmake-prefix-location :

qmake -set prefix /path/to/repo

But I still get the same error, so I don't know what to do... Please help?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.