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

Add MatCap texture option #851

Merged
merged 3 commits into from
Jun 8, 2023
Merged

Add MatCap texture option #851

merged 3 commits into from
Jun 8, 2023

Conversation

Meakk
Copy link
Member

@Meakk Meakk commented Jun 7, 2023

Fixes #811

2023-06-07-230145_window

Add a new shading model based on MatCap textures.
These textures encode everything: ambient, diffuse, specular and baked lighting.
When the texture is given throught --texture-matcap option, all other materials and lights are ignored.

For example, the image above is generated using the following texture:
skin

Usually the textures will be squared and should look like a sphere touching the edge of the texture.

This PR also fixes an issue when textures given by the user have a depth of 16 or 32 bits per channel.

@Meakk Meakk self-assigned this Jun 7, 2023
@codecov
Copy link

codecov bot commented Jun 7, 2023

Codecov Report

Merging #851 (940abc5) into master (4b93b63) will increase coverage by 0.01%.
The diff coverage is 100.00%.

@@            Coverage Diff             @@
##           master     #851      +/-   ##
==========================================
+ Coverage   96.14%   96.16%   +0.01%     
==========================================
  Files         111      111              
  Lines        6335     6366      +31     
==========================================
+ Hits         6091     6122      +31     
  Misses        244      244              
Impacted Files Coverage Δ
...ary/VTKExtensions/Rendering/vtkF3DPolyDataMapper.h 100.00% <ø> (ø)
...KExtensions/Rendering/vtkF3DRendererWithColoring.h 100.00% <ø> (ø)
application/F3DOptionsParser.cxx 98.38% <100.00%> (+<0.01%) ⬆️
...y/VTKExtensions/Rendering/vtkF3DPolyDataMapper.cxx 89.89% <100.00%> (+2.71%) ⬆️
...xtensions/Rendering/vtkF3DRendererWithColoring.cxx 99.03% <100.00%> (+0.01%) ⬆️
library/src/options.cxx 93.11% <100.00%> (+0.03%) ⬆️
library/src/window_impl.cxx 98.59% <100.00%> (+<0.01%) ⬆️

📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more

doc/libf3d/OPTIONS.md Outdated Show resolved Hide resolved
@mwestphal
Copy link
Contributor

please improve descr and mention the bugfix

@Meakk Meakk merged commit 0030068 into f3d-app:master Jun 8, 2023
@Meakk Meakk deleted the matcap branch June 8, 2023 12:43
mwestphal pushed a commit that referenced this pull request Feb 10, 2024
mwestphalnew pushed a commit to mwestphalnew/f3d that referenced this pull request Feb 10, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Add Support for MatCap
3 participants