belcour / alta Goto Github PK
View Code? Open in Web Editor NEWALTA: A BRDF Analysis Library
Home Page: http://alta.gforge.inria.fr/
License: Other
ALTA: A BRDF Analysis Library
Home Page: http://alta.gforge.inria.fr/
License: Other
Hi,
I am just making a new attempt to use alta for fitting models to measured BSDF. Unfortunately, I had no success building on my current MacOS Monterey 12.4. My guess is that this is mainly due to some python incompatibilies, but I cannot decipher the error messages. So some observations.
scons --cfg=configs/scons/config-macos-clang.py
Checking for C++ header file unsupported/Eigen/LevenbergMarquardt... yes
scons: warning: Calling missing SConscript without error is deprecated.
Transition by adding must_exist=False to SConscript calls.
Missing SConscript 'build/sources/plugins/rational_fitter_eigen/SConscript'
File "/Users/lars/git/alta/sources/plugins/SConscript", line 52, in build_plugin
scons: warning: Ignoring missing SConscript 'build/sources/plugins/rational_fitter_leastsquare/SConscript'
File "/Users/lars/git/alta/sources/plugins/SConscript", line 52, in build_plugin
scons: warning: Ignoring missing SConscript 'build/sources/plugins/rational_fitter_quadprog/SConscript'
File "/Users/lars/git/alta/sources/plugins/SConscript", line 52, in build_plugin
scons: warning: Ignoring missing SConscript 'build/sources/plugins/rational_fitter_parallel/SConscript'
File "/Users/lars/git/alta/sources/plugins/SConscript", line 52, in build_plugin
TypeError: 'NoneType' object is not iterable:
File "/Users/lars/git/alta/SConstruct", line 341:
plugins = alta_sconscript('sources/plugins/SConscript')
File "/Users/lars/git/alta/SConstruct", line 335:
return env.SConscript(script,
File "/opt/local/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages/SCons/Script/SConscript.py", line 597:
return _SConscript(self.fs, *files, **subst_kw)
File "/opt/local/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages/SCons/Script/SConscript.py", line 285:
exec(compile(scriptdata, scriptname, 'exec'), call_stack[-1].globals)
File "/Users/lars/git/alta/sources/plugins/SConscript", line 78:
a_flat_list_of_targets = list( itertools.chain(*(list(targets))))
I tried the tutorial ( http://alta.gforge.inria.fr/tutorial2.html ) and it was a success to generate '.func' file.
but when i tried this ( http://alta.gforge.inria.fr/tools.html )
brdf2data --input test.func --output test.binary --data data_merl
It failed.
ERROR failed to load '': No such file or directory.'
This command also has an error.
brdf2brdf --input test.func --output test.shader --export explorer
INFO parsed input parametrization STARK_2D from name "STARK_2D"
ERROR not implemented virtual void alta::rational_function_1d::save_body(std::ostream&, const alta::arguments&) const in file sources/core/rational_function.cpp:147
terminate called without an active exception
Aborted
Hello,
I meet some compilation issues.
Compiler:
Visual Studio 2013 - x64
I modify my config.py by adding:
MSVC_VERSION = '12.0'
TARGET_ARCH = 'x86_64'
And:
OPENEXR_INC = ['#external/build/include/OpenEXR']
OPENEXR_LIB = ['Half.lib', 'Iex-2_2.lib', 'IexMath-2_2.lib', 'IlmImf-2_2.lib', 'IlmThread-2_2.lib', 'IlmImfUtil-2_2.lib', 'Imath-2_2.lib']
OPENEXR_DIR = ['#external/build/lib']
OpenEXR was compiled by myself using the lastest from (same compiler etc...):
https://github.com/openexr/openexr (6f6d9ce)
Eigen 3 was installed and pass all the test but I still have:
Checking for eigen3 using pkg-config... (cached) no
Checking for C++ header file Eigen/Core... (cached) yes
Checking for C++ header file unsupported/Eigen/LevenbergMarquardt... (cached) yes
Why "eigen3 "no""?
For OpenEXR still ok:
Checking for C++ library Half.lib... (cached) yes
Checking for C++ header file ImfStdIO.h... (cached) yes
I want to use brdf_slide but I have linking issues:
scons: done reading SConscript files.
scons: Building targets ...
link /dll /out:build\plugins\data_brdf_slice.dll /implib:build\plugins\data_brdf_slice.lib /LIBPATH:external\b
uild\lib /LIBPATH:build\core Half.lib Iex-2_2.lib IexMath-2_2.lib IlmImf-2_2.lib IlmThread-2_2.lib IlmImfUtil-
2_2.lib Imath-2_2.lib Half.lib core.lib build\sources\plugins\data_io\slice.obj
Microsoft (R) Incremental Linker Version 12.00.31101.0
Copyright (C) Microsoft Corporation. All rights reserved.
Creating library build\plugins\data_brdf_slice.lib and object build\plugins\data_brdf_slice.exp
slice.obj : error LNK2001: unresolved external symbol "private: static union half::uif const * const half::_to
Float" (?_toFloat@half@@0QBTuif@1@B)
slice.obj : error LNK2001: unresolved external symbol "private: static unsigned short const * const half::_eLu
t" (?_eLut@half@@0QBGB)
build\plugins\data_brdf_slice.dll : fatal error LNK1120: 2 unresolved externals
scons: *** [build\plugins\data_brdf_slice.dll] Error 1120
scons: building terminated because of errors.
If I check the Mangling name from the dll/lib:
?_eLut@half@@0QBGB
?_toFloat@half@@0QBTuif@1@B
As you can see it is different:
ATLA expect "?_toFloat@half@@0QBTuif@1@B" the compiler generate "?_toFloat@half@@0QBTuif@1@B"
ATLA expect "?_eLut@half@@0QBGB" the compiler generate "?_eLut@half@@0QBGB"
The website (http://alta.gforge.inria.fr/install.html) do not provide the version of OpenEXR for now I'm using 2.2.0.
Did you know how could I by pass those issues.
The rest compile correctly thanks.
Best Regards
Chkone
For me the Python module could not be compiled with SCons, until the PYTHON_LIB variable was added to config-windows-cl.py
I tried the tutorial on this page with the same material.
http://alta.gforge.inria.fr/tutorial2.html
However, my L2 error is bigger than what was provided in the tutorial page.
This is the header from ' http://alta.gforge.inria.fr/rational-example-01.brdf '.
#CMD --L2 0.0142601 --Linf 0.240069 --fitter rational_fitter_leastsquare --func rational_function_chebychev
This is the header following the tutorial.
#CMD --L2 3.25913 --Linf 231.828 --fitter rational_fitter_leastsquare --func rational_function_chebychev
My L2 error is bigger than what it should be.
Could it be any bug in the code ?
Hi,
Another suggestion will be to support OSL as an equivalent of "save_body" to make it more portable.
Best,
Stéphane
Bonjour ;-)
First of all, thank you very much, it is a great Swiss army knife for BRDFs !
I was playing with it, and I got an issue with BRDFGrid. This is what I did :
./softs/data2data --input ./softs/red-fabric.binary --in-data data_merl --output red-fabric.grid --out-data data_grid
./softs/data2data --input ./red-fabric.grid --in-data data_grid --output red-fabric.exr --out-data data_brdf_slice --param RUSIN_TH_TD_PD --angle 90
That seems normal ( based on the source code ) because you are calling abort() in plugins/data_interpolation/grid.cpp:376
Why are you doing this, is it safe to bypass it ?
The question is how to convert Alta's BRDF to something else ?
Many thanks,
Stéphane
I tried using 'scons' to build the project but eigen seems to be not working.
The auto download might be pointing to an empty URL.
After I built with scons, I tried testing with
scons tests
There was an error about downloading file.
error: downloaded file 'build/tests/gold-metallic-paint.binary' is inauthentic.
error: got sha256 hash 7df0af666610f38658b54d8a8b32a7cdabdb0aadef37c66c3af9d93e709a4a8f but expected 69c493d7f36fa5267d15948a616056f9bc84e352ec6db49b64afe6ff232e27d6
scons: *** [build/tests/gold-metallic-paint.binary] build/tests/gold-metallic-paint.binary: downloaded file is inauthentic
scons: building terminated because of errors.
A .pyd is not created during build process. The solution was to rename alta.dll to alta.pyd in the built python folder.
Hi,
while having a simple gnuplot interface would be very useful, the use of brdf2gnuplot
is not really documented. I got that far by now:
brdf2gnuplot --polar-plot --inc_angle 0.5 --samples 180 --data-file gold-metallic-paint.dat --input gold-metallic-paint_lafortune_diffuse_Eigen.func --output gold-metallic-paint_lafortune_diffuse_Eigen.gpl
This produces a file with six columns and 145800 rows. Unfortunately, there is no header explaining the field contents. The first column monotonously increases from 0 to approx 1.6. The second also contains values in that range, possibly interleaved with the first. The third is in the range 0 to 3.2. And the next three must be related to the BRDF.
Is there any documentation available on the format, or an example how to use it to produce a gnuplot figure?
Best, Lars.
Hi Laurent,
if I want to submit code to ALTA I can't do that via its gitlab repo at INRIA, but I could use this clone of yours, couldn't I?
Greets,
Marko
Hi,
Recently PBRT (v3) and Mitsuba started to support FourrierBSDF
(https://github.com/mmp/pbrt-v3/blob/master/src/materials/fourier.cpp)
and the creation pipeline is based on https://github.com/wjakob/layerlab.
So supporting this new format as a plugin for input and output will be really usefull.
Best Regards,
stephane-lb
Associated publication : "A Comprehensive Framework for Rendering Layered Materials' by
Wenzel Jakob, Eugene D'Eon, Otto Jakob and Steve Marschner"
P.S : Could do to do it soon.
import alta
d1 = alta.get_data('data_merl')
Traceback (most recent call last):
File "", line 1, in
TypeError: get_data(): incompatible function arguments. The following argument types are supported:
1. (arg0: str, arg1: int, arg2: alta.parameters) -> alta.data
2. (arg0: str, arg1: int, arg2: alta.parameters, arg3: alta::arguments) -> alta.data
Invoked with: 'data_merl'
I think this is a bug in python binding.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.