Giter Club home page Giter Club logo

bsdfprocessor's Introduction

BSDF Processor

BSDF Processor is an application for interactive visualization of BSDF (bidirectional scattering distribution function). The user can investigate and edit BRDF (bidirectional reflectance distribution function) and BTDF (bidirectional transmittance distribution function). Basic functions are implemented using libbsdf.

Features

  • 3D plot using incoming angles and multiple display modes
  • Real-time rendering with directional and environment lighting
  • Table view of sample points
  • Property and characteristic views
  • Simple editor
  • File loaders and exporters for multiple formats
  • BRDF/BTDF generators using reflectance/transmittance models

BSDF Processor can load the following formats:

Format Extension Measured Data
Surface Scattering Distribution Data .ssdd
Integra Diffuse Distribution .ddr, .ddt
Integra Specular Distribution .sdr, .sdt
Zemax BSDF .bsdf RPC Photonics
LightTools BSDF .bsdf
ASTM E1392-96(2002) .astm Cornell University
MERL BRDF .binary MERL

BSDF Processor can export the following formats:

Format Extension
Surface Scattering Distribution Data .ssdd
Integra Diffuse Distribution .ddr, .ddt

Gallery

Screenshots

   

Movie

mov

License

BSDF Processor is licensed under the terms of the Mozilla Public License, version 2.0. See the LICENSE file.

Download

Windows (64bit):

BSDFProcessor-1.3.0-windows-x64.zip

Building BSDF Processor

BSDF Processor uses the following open source libraries:

CMake is used as the build system. Search paths for libraries are set through CMake variables: LIBBSDF_DIR, OSG_DIR, Eigen3_DIR, and Qt5_DIR.

Sponsor

bsdfprocessor's People

Contributors

kimuraryo avatar mkae avatar

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

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar

bsdfprocessor's Issues

Revbump

Hi Kimura,

with Minnaert you've added a new model...
Please revbump libbsdf and BSDFProcessor, if you find the time.

Thanks,
Marko

Windows7 & M$ VC++ 2013 & Qt Creator : Build failure for already successfully built ```libbsdf```. Why?

As shown in libbsdf's issue 2 I have been able to build it successfully:

...
Linking CXX static library libbsdf.lib
[100%] Built target libbsdf
18:55:26: The process "C:\Qt\Tools\QtCreator\bin\jom.exe" exited normally.

However, when I now run CMake for BSDFViewer with argument -DEIGEN3_INCLUDE_DIR=P:/freeformOPT/extlibs/include (still omitting OSG for now) I get into trouble:


CMake Error: Error required internal CMake variable not set, cmake may be not be built correctly.
Missing variable is:
CMAKE_C_COMPILER
CMake Error: Could not find cmake module file: P:/BSDFViewer-build/CMakeFiles/3.0.2/CMakeCCompiler.cmake
CMake Error: Error required internal CMake variable not set, cmake may be not be built correctly.
Missing variable is:
CMAKE_CXX_COMPILER_ENV_VAR
CMake Error: Error required internal CMake variable not set, cmake may be not be built correctly.
Missing variable is:
CMAKE_CXX_COMPILER
CMake Error: Could not find cmake module file: P:/BSDFViewer-build/CMakeFiles/3.0.2/CMakeCXXCompiler.cmake
CMake Error at P:/libbsdf/CMakeLists.txt:11 (project):
  No CMAKE_C_COMPILER could be found.

  Tell CMake where to find the compiler by setting the CMake cache entry
  CMAKE_C_COMPILER to the full path to the compiler, or to the compiler name
  if it is in the PATH.


CMake Error at P:/libbsdf/CMakeLists.txt:11 (project):
  No CMAKE_CXX_COMPILER could be found.

  Tell CMake where to find the compiler by setting the CMake cache entry
  CMAKE_CXX_COMPILER to the full path to the compiler, or to the compiler
  name if it is in the PATH.


CMake Error: CMAKE_C_COMPILER not set, after EnableLanguage
CMake Error: CMAKE_CXX_COMPILER not set, after EnableLanguage
CMake Error: Error required internal CMake variable not set, cmake may be not be built correctly.
Missing variable is:
CMAKE_C_COMPILER_ENV_VAR
CMake Error: CMake was unable to find a build program corresponding to "NMake Makefiles".  CMAKE_MAKE_PROGRAM is not set.  You probably need to select a different build tool.-- Configuring incomplete, errors occurred!

This looks like something doesn't work as expected in BSDFViewer's CMake files...
Any idea what they could be missing here on my end?

Bug in stream operator `lb::reader_utility::ignoreCommentLines` WAS "MSYS2-based application seems to have trouble with Windows line endings..."

If I let the debugger - while opening a LightTools bsdf file - run up to line 47 in file LightToolsBsdfReader.cpp:
else if (headStr == "Symmetry") {
the variable headStr contains the string ce.
In the next round it contains asured and then mmtry, etc.

So, it looks as if the application always swallows the first two characters!

Could that be caused by Windows' line endings or something like that??

Parallelizing of computations possible?

It would be really nice if one could have distributed the work on more than just a single core, in order to speed up the recalculations needed when changing a parameter in the GUI.

Feature request: Ability to load and view two BSDF files

It would come very handy if it was possible to load more than one (at least two) BSDF files and overlay them in the 3D view in such a way that they can easily be distinguished by color coding.

This would allow to visualize nicely differences between BSDF datasets.

(This would probably only make sense for a specific set of AOI, wavelength, etc. for each data file.)

Future Plans?

You state "loading of other file formats" and "displaying more information of BSDFs" as plans for the future on the main page. Anything else you think of?

What about interpolating the data? I saw the CatmullRomSplineInterpolator class in your code and wonder, whether this could be used to interpolate the BSDF values in regions which aren't measured correctly. This is interesting e.g. for the IS-SA's blind spot (caused by the camera objective's aperture) for BSDF as well as the hole at the direction of the incident beam for BRDF.

(I haven't looked at the code in detail, just asking whether this is usable for such a task.)

Feature request: Change mouse pointer when in "3D moving mode"

Hovering over the 3D output window allows the mouse to move the view to change view angle and object position. Left-clicking onto the view stops any movements. If this click hasn't been made yet mouse movements will change the view angle, which can appear with some lag on slower machines.

This is why I'd suggest to change the mouse pointer while the mouse is in view-control.

By doing so the user knows that the view is controlled by the mouse at a given point in time and thus can act more carefully.

What do you think about that?

Eigen issue using qt .pro file instead of cmake

Hi Ryo

I am using the BSDF processor in qt using .pro file instead of cmake. The following images shows the .pro file information

image

I am using MSVC 2015 compiler. I am getting the following eigen library linker error in qt

image

I tried to get solution for that. But i am not able to get one solution.

Tune transparency in such a way...

... that every dataset for each AOI can be seen and distinguishing from one another.

I found that to be a nice visualisation in case of nested diffuse distributions. Currently one can see the 2 or 3 outer ones, but what's inside isn't visible at is...

OSX: Unusual high system load with idling BSDFViewer

The BSDFViewer and the WindowServer process usually have each about 20-25% of the CPU on this late 2009 iMac with a CoreDuo processor once data is loaded.

Is that normal even when the application is idling?

find_package() needs to require newer minimum OSG version

Due to commit d29e51e one would need to set some other required OSG version in CMakeLists.txt:

find_package(OpenSceneGraph 3.0.0 REQUIRED osgDB osgGA osgManipulator osgQt osgText osgUtil osgViewer osgWidget)

being 3.3.0 or 3.4.0. Don't know when the member function renaming happened...

Color rendering of green-fabric.binary isn't green

While looking at MERL's blue-rubber.binary I noticed that green-fabric.binary should probably render green, no? While the first one appear indeed blueish in the render pane, the second is light grey, but no trace of green in there...

MSYS2-based mingw build throws warnings for eigen3

I see tons of deprecation warnings like this when building BSDFViewer:

C:/msys64/mingw64/include/eigen3/Eigen/src/Core/Functors.h:977:28: warning: 'template<class _Operation> class std::binder1st' is deprecated [-Wdeprecated-declarations]
 struct functor_traits<std::binder1st<T> >
                            ^
In file included from C:/msys64/mingw64/include/c++/5.3.0/bits/stl_function.h:1128:0,
                 from C:/msys64/mingw64/include/c++/5.3.0/string:48,
                 from C:/msys64/mingw64/include/c++/5.3.0/random:40,
                 from C:/msys64/mingw64/include/c++/5.3.0/bits/stl_algo.h:66,
                 from C:/msys64/mingw64/include/c++/5.3.0/algorithm:62,
                 from C:/msys64/mingw64/include/QtCore/qglobal.h:85,
                 from C:/msys64/mingw64/include/QtGui/qwindowdefs.h:37,
                 from C:/msys64/mingw64/include/QtGui/qevent.h:37,
                 from C:/msys64/mingw64/include/QtGui/QResizeEvent:1,
                 from C:/msys64/home/m.kaening/WC/BSDFViewer/src/GraphWidget.h:12,
                 from C:/msys64/home/m.kaening/WC/BSDFViewer/src/GraphWidget.cpp:9:

Looks like this is actually a Qt problem, right?!

Sliders for parameters like AOI need stepping controls

What I mean here is that it would simply be nicer to be able to click onto left and right arrow buttons to go to the adjacent parameters. Dragging the slider by mouse to the desired value isn't very accurate. This is especially disturbing when using a rather slow machine...

Not launching on windows 10 x64

I can not run BSDFProcessor.exe on my win 10 home x64.
exe doesn't show anything? in task manager it appears, and then just crash without any word

Windows: Development environment setup

Ryo, how do you set up the development environment on Windows?

OpenSceneGraph unfortunately doesn't supply binary installs anymore, if I am not mistaken. Building it together with all its dependencies looks like a painful task on first glance...

Any suggestions?

OSG needs to be build with Qt support

Hi Ryo,

now that I understood that OSG needs to be build with some Qt support I wanted to go for Qt4, but it fails with a warning for the SDK and an ERROR for Qt itself:

:debug:configure Executing command line:  cd "/opt/local/var/macports/build/_Users_marko_WC_MacPorts-test_dports_graphics_OpenSceneGraph/OpenSceneGraph/work/OpenSceneGraph-3.2.1" && /opt/local/bin/cmake -DCMAKE_INSTALL_PREFIX=/opt/local -DCMAKE_VERBOSE_MAKEFILE=ON -DCMAKE_COLOR_MAKEFILE=ON -DCMAKE_BUILD_TYPE=MacPorts -DCMAKE_BUILD_WITH_INSTALL_RPATH=ON -DCMAKE_INSTALL_RPATH="/opt/local/lib" -DCMAKE_INSTALL_NAME_DIR=/opt/local/lib -DCMAKE_SYSTEM_PREFIX_PATH="/opt/local;/usr" -DCMAKE_MODULE_PATH=/opt/local/share/cmake/Modules -DCMAKE_FIND_FRAMEWORK=LAST -DCMAKE_EXPORT_COMPILE_COMMANDS=ON -Wno-dev -DOSG_CONFIG_HAS_BEEN_RUN_BEFORE=YES -DOSG_DEFAULT_IMAGE_PLUGIN_FOR_OSX=imageio -DOSG_WINDOWING_SYSTEM=Cocoa -sdk macosx10.11 -DOSG_USE_QT:BOOL=ON -DDESIRED_QT_VERSION=4 -DINCLUDE_DIRECTORIES:PATH="-I/opt/local/include" -DCMAKE_OSX_ARCHITECTURES="x86_64" -DCMAKE_OSX_DEPLOYMENT_TARGET="10.10" -DCMAKE_OSX_SYSROOT="/" /opt/local/var/macports/build/_Users_marko_WC_MacPorts-test_dports_graphics_OpenSceneGraph/OpenSceneGraph/work/OpenSceneGraph-3.2.1
:info:configure -- The C compiler identification is AppleClang 7.0.2.7000181
:info:configure -- The CXX compiler identification is AppleClang 7.0.2.7000181
:info:configure CMake Warning at /opt/local/share/cmake-3.4/Modules/Platform/Darwin.cmake:197 (message):
:info:configure   The SDK Library/Frameworks path
:info:configure
:info:configure    //Library/Frameworks
:info:configure
:info:configure   is not set up correctly on this system.  This is known to occur when
:info:configure   installing Xcode 3.2.6:
:info:configure
:info:configure    http://bugs.python.org/issue14018
:info:configure
:info:configure   The problem may cause build errors that report missing system frameworks.
:info:configure   Fix your SDK symlinks to resolve this issue and avoid this warning.
:info:configure Call Stack (most recent call first):
:info:configure   /opt/local/share/cmake-3.4/Modules/CMakeSystemSpecificInformation.cmake:36 (include)
:info:configure   CMakeLists.txt:47 (PROJECT)
.
.
.
:info:configure -- Boost version: 1.59.0
:info:configure -- Found unsuitable Qt version "" from NOTFOUND
:info:configure -- Found TIFF: /opt/local/lib/libtiff.dylib (found version "4.0.6")
.
.
.

Wondering whether you have an idea how to fix this, for the case of MacPorts installing files of port:qt4-mac below /opt/local/libexec/qt4/:

$ port contents qt4-mac
Port qt4-mac contains:
  /Applications/MacPorts/Qt4/Assistant.app/Contents/Info.plist
.
.
.
  /Applications/MacPorts/Qt4/qttracereplay.app/Contents/Resources/empty.lproj
  /opt/local/libexec/qt4/Library/Frameworks/Qt3Support.framework/Contents/Info.plist
.
.
.
  /opt/local/libexec/qt4/Library/Frameworks/QtCore.framework/Contents/Info.plist
.
.
.
  /opt/local/libexec/qt4/bin/xmlpatternsvalidator
  /opt/local/libexec/qt4/include/Qt/q3accel.h
.
.
.
  /opt/local/libexec/qt4/lib/libQtXmlPatterns.prl
  /opt/local/libexec/qt4/lib/pkgconfig/Qt3Support.pc
.
.
.
  /opt/local/libexec/qt4/share/translations/qvfb_zh_TW.qm
$

App isn't building on OSX due to not found dependency on OSG

Hi Ryo,

I've installed the OpenSceneGraph MacPorts port on OSX 10.10 which puts its files below the prefix /opt/local on my system, but I still end up with this:

$ cmake -DEIGEN3_INCLUDE_DIR=/opt/local/include/eigen3 -DOPENSCENEGRAPH_INCLUDE_DIR=/opt/local ..
-- Could NOT find osgQt (missing:  OSGQT_LIBRARY OSGQT_INCLUDE_DIR) 
CMake Error at /opt/local/share/cmake-3.4/Modules/FindPackageHandleStandardArgs.cmake:148 (message):
  Could NOT find OpenSceneGraph (missing: OPENSCENEGRAPH_INCLUDE_DIR
  OSGQT_FOUND) (found suitable version "3.2.1", minimum required is "3.0.0")
Call Stack (most recent call first):
  /opt/local/share/cmake-3.4/Modules/FindPackageHandleStandardArgs.cmake:388 (_FPHSA_FAILURE_MESSAGE)
  /opt/local/share/cmake-3.4/Modules/FindOpenSceneGraph.cmake:234 (FIND_PACKAGE_HANDLE_STANDARD_ARGS)
  CMakeLists.txt:38 (find_package)


-- Configuring incomplete, errors occurred!
See also "/Users/marko/WC/GIT/BSDFViewer/build/CMakeFiles/CMakeOutput.log".
See also "/Users/marko/WC/GIT/BSDFViewer/build/CMakeFiles/CMakeError.log".

What am I doing wrong? I tried to append to OPENSCENEGRAPH_INCLUDE_DIR=/opt/local the subfolders /include or even /include/osg, but to no avail. Always the same error message here...

Eigen3 worked fine, thanks to your already made adaption to the code! :-)

Greets,
Marko

Loading MERL files fails

After the September commits for libbsdf and bsdfprocessor the latter can't load MERL files anymore and fails with this message:

[LightToolsBsdfReader::read] Invalid format.

This is probably some sort of regression.

Tested so far on a MSYS2-built Windows version of BSDFProcessor 1.1.6.

release tagging

Can you add release tags to your repo?!

So future ports or packages could easily learn from the repo which releases exist and thus allow for semi-automatic release version checks.

High processor load when idling after startup

I noticed here on my Core Duo, that both cores we at 100% after starting BSDFProcessor, which felt really strange, since no data gets loaded at the startup.

Once I had data loaded the average load went down to 10% if I didn't hover with the mouse above the application's window.

Thus it seems as if there is perhaps a problem with the program's initialisation, which fixes itself once real data gets loaded.


If I generate right after startup a BRDF using your new "Reflectance Model" functionality then the average load "sinks" to 95%, which isn't really an improvement. ;-)

Again, once a data file was loaded the idling load went down to 10%,

Link between editor and reflectance model unclear

The link between the new editor and reflectance model is a bit unclear:

  • There is for the Glossy Component a Shininess selectable, even if there is none in the model.
  • As far as I can see there is only the Lambertian model which makes use of the Diffuse Component/Intensity, is this correct? If so, the slider should be disabled for all other models.

As a side note: the default number of incoming polar angles could surely be reduced to something like 10, in order to speed up computation on older hardware. :)

Define publicly available BSDF data file for comparative tests of builds

A publicly available BSDF dataset for crosschecks of different builds (OSX, Linux, Windows, 32 bits, 64 bits, etc.) should be defined. This would help figuring out possible bottlenecks in BSDFProcessor (e.g. file loading or delays after changing of parameters as observed for OSX 10.10, 32 bit Vista and 64 W7) and allow unit testing of libbsdf.

Program's "busy bee" shown too late

Especially on slow hardware one notices that - in case the user changed a parameter somewhere in the GUI - computations get carried out while the mouse pointer hasn't been switched over to the standard "busy" mouse pointer symbol (animation).

But perhaps the animated busy mouse pointer (which I see here) comes directly from Windows and hadn't been set up by the application itself up to now...

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.