MRF issueshttps://gitlab.inria.fr/pacanows/MRF/-/issues2022-10-06T14:46:37+02:00https://gitlab.inria.fr/pacanows/MRF/-/issues/106Refactor and clarify the specification of Image containers2022-10-06T14:46:37+02:00Alban FichetRefactor and clarify the specification of Image containers# What are the problems?
## Colour image
There is currently no clear specification about what shall contain a `ColorImage`. Is it sRGB, is it RGB?
### Why is this an issue?
The colour image have several save function which more or less...# What are the problems?
## Colour image
There is currently no clear specification about what shall contain a `ColorImage`. Is it sRGB, is it RGB?
### Why is this an issue?
The colour image have several save function which more or less write the raw colour value to the file regardless of the format. But, a EXR is generally a linear RGB while a PNG is sRGB if no ICC profile is provided.
Hence, doing
```
colorImage.save("img.exr");
colorImage.save("img.png");
```
does not have a very clear behaviour.
Furthermore, `savePNG` multiply the values by 255... So, it is already applying a conversion.
### What do I suggest?
A - `ColorImage` shall be an abstract class (will develop on that later)
B - `ColorImage` shall assume the pixels are linear values (XYZ, RGB ? I would be for XYZ)
C - `ColorImage` shall be renamed accordingly (`XYZImage` or `RGBImage`)
## Refactoring
I suggest a refactoring of the hierarchy of the Image classes. I am not an UML expert so excuse the approximations but here it is.
![image](/uploads/937bb0ed7b875c6eab0060fe89ccfa4c/image.png)
Each of the Image shall implement the copy operator. This will ease image conversion.
Also, I would avoid public load instance functions. I would prefer constructor in the corresponding class (for instance `SpectralImage *img = new EnviSpectralImage("foo.hdr");`). That does not mean we cannot have static load factories in each class.
Since this architecture is highly a personal taste and not the only way to implement it, I am opening discussion (and probably trolls ;) ) threw this issue.
## Questions about colour conversion / tonemapping
I have the feeling that we do it wrong for Reinhard tonemapping.
I think we shall consider this tonemapping function (and any tomemapping function) transforming a linear RGB space into another RGB space represented as linear value.
What do I mean? I think we shall apply anyway a sRGB gamma correction whatever the tonemapping function we are using in case we intend to display the result on a 8bit / channel monitor or on a image without an ICC profile. If there is an ICC profile, the colours shall be consider as linear RGB and then converted in the specified ICC colourspace.
Why? A tonemapping function is "just" a luminance / colour adaptation. sRGB is an old standard still in used to colour correct an RGB colour on a non linear monitor (cathodic monitor). This have nothing to do with the perceptive tonemapping function.
Am I correct there or do I miss something?https://gitlab.inria.fr/pacanows/MRF/-/issues/105ART Raw warnings2021-07-22T15:23:50+02:00Alban FichetART Raw warningsWindows compiler complains about not using fscanf_sWindows compiler complains about not using fscanf_sAlban FichetAlban Fichethttps://gitlab.inria.fr/pacanows/MRF/-/issues/104Interactive : Broken on the fly scene loading2020-03-30T15:41:12+02:00MURRAY DavidInteractive : Broken on the fly scene loadingIt seems our recent developments broke the loading feature.
Any attempt to load is met with a black output.It seems our recent developments broke the loading feature.
Any attempt to load is met with a black output.MURRAY DavidMURRAY Davidhttps://gitlab.inria.fr/pacanows/MRF/-/issues/103Checks and test for Spectrum conversion2020-05-05T15:14:37+02:00Alban FichetChecks and test for Spectrum conversionReview the conversion spectrum code and ensure having proper conversion to tristimulus using the new test infrastucture.Review the conversion spectrum code and ensure having proper conversion to tristimulus using the new test infrastucture.Malia 1.0.0 Beta 1Alban FichetAlban Fichethttps://gitlab.inria.fr/pacanows/MRF/-/issues/102Refactor: Put correct header inclusion2020-03-23T11:29:34+01:00PACANOWSKI RomainRefactor: Put correct header inclusionIn the refactor branch, we should ensure a more robust include syntax: includes should be "mrf/MODULE_NAME/file.hpp" and not "MODULE_NAME/file.hpp" or just "file.hpp".In the refactor branch, we should ensure a more robust include syntax: includes should be "mrf/MODULE_NAME/file.hpp" and not "MODULE_NAME/file.hpp" or just "file.hpp".https://gitlab.inria.fr/pacanows/MRF/-/issues/101Malia. UI Shaders. The path to the display shaders should not be hard-coded d...2020-04-07T09:23:43+02:00PACANOWSKI RomainMalia. UI Shaders. The path to the display shaders should not be hard-coded during compilationThe path to the display shaders should not be hard-coded during compilation :
For example here in mrf_baseUI
```
void BaseUI::initializeUIRenderingResources(int w, int h, bool v_sync)
{
createContext(w, h, v_sync);
...The path to the display shaders should not be hard-coded during compilation :
For example here in mrf_baseUI
```
void BaseUI::initializeUIRenderingResources(int w, int h, bool v_sync)
{
createContext(w, h, v_sync);
//TODO better handle this to allow custom display shader ?
std::string pathToShaders = std::string(getenv("MRF_DIR")) + "/apps/malia/gui/gl_src/shaders/";
```
I would recommend to code something like that :
```
#MRF_DEV_COMPILATION
std::string pathToShaders = std::string(getenv("MRF_DIR")) + "/apps/malia/gui/gl_src/shaders/";
#else // MEANING THIS IS TO RELEASE THE APPLICATION
std::string pathToShaders = getExecutioPath() + "/shaders/";
#
```MURRAY DavidMURRAY Davidhttps://gitlab.inria.fr/pacanows/MRF/-/issues/100MALIA COMPILATION FAILS on REFACTOR_RENDER Branch2020-03-19T09:59:57+01:00PACANOWSKI RomainMALIA COMPILATION FAILS on REFACTOR_RENDER BranchOn my Ubuntu compilation fails (not for the same reason as MRF!)
Cheers
Romain
>
```
> [ 94%] Building CXX object CMakeFiles/malia.dir/ext/imgui/imgui_impl_glfw.cpp.o
> /home/pac/Projets/GitlabINRIA_MRF/MRF/apps/malia/gui/mrf_baseUI...On my Ubuntu compilation fails (not for the same reason as MRF!)
Cheers
Romain
>
```
> [ 94%] Building CXX object CMakeFiles/malia.dir/ext/imgui/imgui_impl_glfw.cpp.o
> /home/pac/Projets/GitlabINRIA_MRF/MRF/apps/malia/gui/mrf_baseUI.cpp: In member function ‘void mrf::gui::BaseUI::initSensitivityBuffer()’:
> /home/pac/Projets/GitlabINRIA_MRF/MRF/apps/malia/gui/mrf_baseUI.cpp:350:21: error: ‘SENSITIVITY_BUFFER’ was not declared in this scope
> _texture_list[SENSITIVITY_BUFFER] = Texture(sensitivity_curve_size, GL_RGBA32F, "sensitivity_buffer", false, curve);
> ^~~~~~~~~~~~~~~~~~
> /home/pac/Projets/GitlabINRIA_MRF/MRF/apps/malia/gui/mrf_baseUI.cpp:350:21: note: suggested alternative: ‘OUTPUT_BUFFER’
> _texture_list[SENSITIVITY_BUFFER] = Texture(sensitivity_curve_size, GL_RGBA32F, "sensitivity_buffer", false, curve);
> ^~~~~~~~~~~~~~~~~~
> OUTPUT_BUFFER
> /home/pac/Projets/GitlabINRIA_MRF/MRF/apps/malia/gui/mrf_baseUI.cpp: In member function ‘void mrf::gui::BaseUI::initIlluminantBuffer()’:
> /home/pac/Projets/GitlabINRIA_MRF/MRF/apps/malia/gui/mrf_baseUI.cpp:361:21: error: ‘ILLUMINANT_BUFFER’ was not declared in this scope
> _texture_list[ILLUMINANT_BUFFER] = Texture(illuminant_size, GL_R32F, "illuminant_buffer", false, illuminant);
> ^~~~~~~~~~~~~~~~~
> /home/pac/Projets/GitlabINRIA_MRF/MRF/apps/malia/gui/mrf_baseUI.cpp:361:21: note: suggested alternative: ‘ILLUMINANT’
> _texture_list[ILLUMINANT_BUFFER] = Texture(illuminant_size, GL_R32F, "illuminant_buffer", false, illuminant);
> ^~~~~~~~~~~~~~~~~
> ILLUMINANT
> /home/pac/Projets/GitlabINRIA_MRF/MRF/apps/malia/gui/mrf_baseUI.cpp: In member function ‘void mrf::gui::BaseUI::initWavelengthBuffer()’:
> /home/pac/Projets/GitlabINRIA_MRF/MRF/apps/malia/gui/mrf_baseUI.cpp:372:21: error: ‘WAVELENGTH_BUFFER’ was not declared in this scope
> _texture_list[WAVELENGTH_BUFFER] = Texture(size, GL_R32F, "wavelength_buffer", false, wavelengths);
> ^~~~~~~~~~~~~~~~~
> /home/pac/Projets/GitlabINRIA_MRF/MRF/apps/malia/gui/mrf_baseUI.cpp:372:21: note: suggested alternative: ‘GL_DEPTH_BUFFER’
> _texture_list[WAVELENGTH_BUFFER] = Texture(size, GL_R32F, "wavelength_buffer", false, wavelengths);
> ^~~~~~~~~~~~~~~~~
> GL_DEPTH_BUFFER
>
```MURRAY DavidMURRAY Davidhttps://gitlab.inria.fr/pacanows/MRF/-/issues/99MRF Compilation fails on Branch refactor_renderer2020-03-19T10:00:07+01:00PACANOWSKI RomainMRF Compilation fails on Branch refactor_rendererSomething Wrong with Eigen and the 2D array.
Did you experience something simumlar ?
R
> [ 89%] Building CXX object CMakeFiles/obj_compiled_files.dir/externals/tinyxml2/tinyxml2.cpp.o
> /usr/bin/c++ -DMRF_BUILD -DMRF_RENDERING_MODE_...Something Wrong with Eigen and the 2D array.
Did you experience something simumlar ?
R
> [ 89%] Building CXX object CMakeFiles/obj_compiled_files.dir/externals/tinyxml2/tinyxml2.cpp.o
> /usr/bin/c++ -DMRF_BUILD -DMRF_RENDERING_MODE_SPECTRAL -DMRF_WITH_EIGEN_SUPPORT -I/home/pac/Projets/GitlabINRIA_MRF/MRF/build -I/home/pac/Projets/GitlabINRIA_MRF/MRF -I/home/pac/Projets/GitlabINRIA_MRF/MRF/mrf -I/home/pac/Projets/GitlabINRIA_MRF/MRF/externals -I/home/pac/Projets/GitlabINRIA_MRF/MRF/externals/MRF -I/home/pac/Projets/GitlabINRIA_MRF/MRF/externals/MRF/mrf -I/usr/include/eigen3 -I/home/pac/Projets/GitlabINRIA_MRF/MRF/apps/rgb2spec/externals -O3 -DNDEBUG -fPIC -std=gnu++14 -o CMakeFiles/obj_compiled_files.dir/externals/tinyxml2/tinyxml2.cpp.o -c /home/pac/Projets/GitlabINRIA_MRF/MRF/externals/tinyxml2/tinyxml2.cpp
> In file included from /usr/include/eigen3/Eigen/Core:366,
> from /home/pac/Projets/GitlabINRIA_MRF/MRF/mrf/data_struct/eigen_array2d.hpp:17,
> from /home/pac/Projets/GitlabINRIA_MRF/MRF/mrf/data_struct/array2d.hpp:14,
> from /home/pac/Projets/GitlabINRIA_MRF/MRF/mrf/image/uniform_spectral_image.hpp:15,
> from /home/pac/Projets/GitlabINRIA_MRF/MRF/mrf/rendering/renderer.hpp:23,
> from /home/pac/Projets/GitlabINRIA_MRF/MRF/mrf/rendering/renderer.cpp:1:
> /usr/include/eigen3/Eigen/src/Core/DenseCoeffsBase.h: In instantiation of ‘Eigen::DenseCoeffsBase<Derived, 1>::Scalar& Eigen::DenseCoeffsBase<Derived, 1>::operator[](Eigen::Index) [with Derived = Eigen::Array<float, -1, -1, 1, -1, -1>; Eigen::DenseCoeffsBase<Derived, 1>::Scalar = float; Eigen::Index = long int]’:
> /home/pac/Projets/GitlabINRIA_MRF/MRF/mrf/rendering/renderer.cpp:176:22: required from here
> /usr/include/eigen3/Eigen/src/Core/DenseCoeffsBase.h:406:27: error: static assertion failed: THE_BRACKET_OPERATOR_IS_ONLY_FOR_VECTORS__USE_THE_PARENTHESIS_OPERATOR_INSTEAD
> EIGEN_STATIC_ASSERT(Derived::IsVectorAtCompileTime,
> ^~~~~~~
> /usr/include/eigen3/Eigen/src/Core/util/StaticAssert.h:33:54: note: in definition of macro ‘EIGEN_STATIC_ASSERT’
> #define EIGEN_STATIC_ASSERT(X,MSG) static_assert(X,#MSG);
MURRAY DavidMURRAY Davidhttps://gitlab.inria.fr/pacanows/MRF/-/issues/98Update GitLab CI to allow manual builds2020-03-19T09:59:45+01:00MURRAY DavidUpdate GitLab CI to allow manual buildsThe giltlab-ci.yml controls the run pipelines and runners, currently limiting them to run only on master when changes are merged into it.
These pipelines should also be triggered manually in order to fully test our branches before mergin...The giltlab-ci.yml controls the run pipelines and runners, currently limiting them to run only on master when changes are merged into it.
These pipelines should also be triggered manually in order to fully test our branches before merging them, as well as testing important development branches.MURRAY DavidMURRAY Davidhttps://gitlab.inria.fr/pacanows/MRF/-/issues/97[WIP] Master: compilation error with artraw2020-03-23T11:29:26+01:00MURRAY David[WIP] Master: compilation error with artrawThe artraw_image.cpp does not compile due to following error on line 20 (also on line 44):
> C:\Dev\MRF_source\mrf\image\artraw_image.cpp(20): error C2512: 'mrf::util::_Array2D<float>': no appropriate default constructor available
Alb...The artraw_image.cpp does not compile due to following error on line 20 (also on line 44):
> C:\Dev\MRF_source\mrf\image\artraw_image.cpp(20): error C2512: 'mrf::util::_Array2D<float>': no appropriate default constructor available
Alban, can you please take a look to either use another constructor, or add a proper default constructor ?
Also, for msvc, <functional> needs to be included in artraw_image.cppAlban FichetAlban Fichethttps://gitlab.inria.fr/pacanows/MRF/-/issues/96To implement: walter_bsdf2020-07-21T14:31:00+02:00MURRAY DavidTo implement: walter_bsdfIt seems that the material type "walter_bsdf" (in .msf file, converted to ggx for rendering) is causing a crash when multiplexing:
> OptiX Error: 'Variable not found (Details: Function "_rtContextLaunch2D" caught exception: Variable "Un...It seems that the material type "walter_bsdf" (in .msf file, converted to ggx for rendering) is causing a crash when multiplexing:
> OptiX Error: 'Variable not found (Details: Function "_rtContextLaunch2D" caught exception: Variable "Unresolved reference to variable diffuse_color from _Z13material_evalv" not found in scope)'
To reproduce, launch malia spectral with:
-i -wr 400:700:30 -wpp 10 -scene "path_to_scene/prism.msf"
-i -wr 400:700:30 -wpp 10 -scene "path_to_scene/material_export.msf"
Both scenes contain at least one walter_bsdf material. In the latter, I identified walter_bsdf to be the cause by replacing all materials with lambert, and replacing back one by one.
The problem does not occur when not doing multiplexing.
Could you test on your side to see if you also have a this crash?MURRAY DavidMURRAY Davidhttps://gitlab.inria.fr/pacanows/MRF/-/issues/95Interactive: GUI wrongly displayed when window fills the screen.2021-07-22T14:00:16+02:00MURRAY DavidInteractive: GUI wrongly displayed when window fills the screen.When the requested number of pixel equals the number of the screen, the GUI is added "outside" the screen as it is an offset.
In this case, it should be displayed on top of the image, or the render area (the OpenGL render area, not the ...When the requested number of pixel equals the number of the screen, the GUI is added "outside" the screen as it is an offset.
In this case, it should be displayed on top of the image, or the render area (the OpenGL render area, not the Optix one) should be shrinked to fit.Malia 1.0 patchMURRAY DavidMURRAY Davidhttps://gitlab.inria.fr/pacanows/MRF/-/issues/94SPECTRAL TEST SCENES2020-03-23T14:47:38+01:00PACANOWSKI RomainSPECTRAL TEST SCENESSome ideas for Spectral scenes
- Cornell BOX
- Color Chart illuminated by different Illuminants
- Scene with different illuminants (analytical) and also measuredSome ideas for Spectral scenes
- Cornell BOX
- Color Chart illuminated by different Illuminants
- Scene with different illuminants (analytical) and also measuredhttps://gitlab.inria.fr/pacanows/MRF/-/issues/93[BUG] Phong Normalized does not set pdf + possibly wrong brdf value2021-02-22T15:14:39+01:00MURRAY David[BUG] Phong Normalized does not set pdf + possibly wrong brdf valueIn the phong.cu, in function "sample_and_eval", the varying parameter "pdf" is not set, leading to potential in the MIS computation.
Also, I think the BRDF value is wrongly computed in this same function. The process is as follows:
1 - ...In the phong.cu, in function "sample_and_eval", the varying parameter "pdf" is not set, leading to potential in the MIS computation.
Also, I think the BRDF value is wrongly computed in this same function. The process is as follows:
1 - choose if sampling the diffuse or specular part.
2 - if sampling the diffuse part: sample cos weighted hemisphere and brdf = diffuse_color.
3 - if sampling the diffuse part: sample phong lobe and brdf = specular_color * phong_blahblah.
While I agree on the fact that we must "randomly" choose between sampling using cos or the phong lobe, I disagree that the BRDF should be only a restriction and not the full phong brdf (diffuse_color + specular_color).
Or if it should, then the function "brdf_eval" must also use the same principle, whereas it currently evaluate the full phong BRDF without choose between diffuse or specular.PACANOWSKI RomainPACANOWSKI Romainhttps://gitlab.inria.fr/pacanows/MRF/-/issues/92[Bug | refactor_renderer] Segfault on save image in interactive mode2020-02-26T11:44:53+01:00Alban Fichet[Bug | refactor_renderer] Segfault on save image in interactive modeCrashes when trying to save image from the interactive GUI.
Line 1262 of `mrf/rendering/optix_renderer.cpp` seems to return an error (missing rtBufferGLUnregister?).
When adding a `rtBufferGLUnregister` prior to the `rtBufferMap`, crash...Crashes when trying to save image from the interactive GUI.
Line 1262 of `mrf/rendering/optix_renderer.cpp` seems to return an error (missing rtBufferGLUnregister?).
When adding a `rtBufferGLUnregister` prior to the `rtBufferMap`, crashes anyway, content of imageData is null.MURRAY DavidMURRAY Davidhttps://gitlab.inria.fr/pacanows/MRF/-/issues/91[Bug | refactor_renderer] Tone mapper interactive mode2020-03-19T10:49:22+01:00Alban Fichet[Bug | refactor_renderer] Tone mapper interactive modeTone mapping problem on Linux
```
./bin/malia -scene ../assets/scenes/cornellbox.msf -i
```
![Screenshot_from_2020-02-17_16-14-37](/uploads/472576b6dd56796742c789b56c2a8219/Screenshot_from_2020-02-17_16-14-37.png)Tone mapping problem on Linux
```
./bin/malia -scene ../assets/scenes/cornellbox.msf -i
```
![Screenshot_from_2020-02-17_16-14-37](/uploads/472576b6dd56796742c789b56c2a8219/Screenshot_from_2020-02-17_16-14-37.png)Alban FichetAlban Fichethttps://gitlab.inria.fr/pacanows/MRF/-/issues/89ART Raw image support2020-02-17T16:25:21+01:00Alban FichetART Raw image supportSupport for save / read ART Raw file format (http://cgg.mff.cuni.cz/ART/).
No support planed for:
- ART Raw with CIE XYZ
- ART Raw with polarisationSupport for save / read ART Raw file format (http://cgg.mff.cuni.cz/ART/).
No support planed for:
- ART Raw with CIE XYZ
- ART Raw with polarisationAlban FichetAlban Fichethttps://gitlab.inria.fr/pacanows/MRF/-/issues/88Options -width and -height have no effect2020-04-07T14:23:05+02:00PACANOWSKI RomainOptions -width and -height have no effecthttps://gitlab.inria.fr/pacanows/MRF/-/issues/87[WIP] UI Problem with exposition2020-03-19T14:28:03+01:00PACANOWSKI Romain[WIP] UI Problem with expositionAlban FichetAlban Fichethttps://gitlab.inria.fr/pacanows/MRF/-/issues/85Cmake Refactor2022-10-06T14:46:10+02:00MURRAY DavidCmake RefactorNeed to wait for https://gitlab.inria.fr/pacanows/MRF/issues/2Need to wait for https://gitlab.inria.fr/pacanows/MRF/issues/2Malia 1.0.0 Beta 1MURRAY DavidMURRAY David