Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[qtAliceVision] Add new image viewer with Blinn-Phong model #72

Open
wants to merge 7 commits into
base: dev/qt6.6
Choose a base branch
from

Conversation

gregoire-dl
Copy link
Member

@gregoire-dl gregoire-dl commented Jun 19, 2024

Description

Add a new image viewer (Albedo + Normal) with Blinn-Phong model, the PhongImageViewer.
With customizable shader parameters and light direction.

A normal map with two light directions using the new viewer in Meshroom.

Features list

  • First implementation of the new PhongImageViewer.
  • Add support for base color and texture opacity in PhongImageViewer shader.
  • Fix some errors with FloatImageViewer especially when reactivated.

Implementation remarks

This PR is based on the Qt6 migration branch: https://github.com/alicevision/QtAliceVision/tree/dev/qt6.6
Linked to Meshroom PR: alicevision/Meshroom#2444

cbentejac and others added 6 commits July 9, 2024 17:49
Clamp negative values in the FloatImageViewer fragment shader before
performing the successive `pow`. The result of `pow` is undefined when
it is provided negative values. On Linux platforms, it still gives the
expected result, but on Windows this leads to issues.
Using sequence player by default may cause errors when `FloatImageViewer` is reactivated.
Source texture should always be initialized to avoid errors (texture binding) when no image is loaded, especially when `FloatImageViewer` is reactivated.
Allows to load and display image (albedo and normal) with a given light direction.
Shading is done using Blinn-Phong reflection model.
`std::powf` fails to compile with gcc which is not compliant with C++17
when it comes to libstdc++.

Additionally, static casts are performed to fix warnings.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants