Comments (11)
What picture is incorrect ? do you have backface culling enabled on the incorrect picture ?
from vtk-js.
Backface culling is enabled on all pictures, the last picture (larger mandible with the full jawbone) is the incorrect one
from vtk-js.
I forgot to mention that this problem does not appear when using camera.setParallelProjection(true);
from vtk-js.
What's the difference between the 3rd picture and the last picture ? Only the mesh is different ?
from vtk-js.
The color of the bone is too dark, and you can see a big contrast between the bone and the teeth sockets (dark red vs bright red). It is supposed to be like this I believe:
from vtk-js.
Gotcha.
It would be great if you could attach that STL file to the issue.
The shader code should be investigated...
from vtk-js.
Here are the files used to reproduce it:
from vtk-js.
You might want to check the magnitude of your normals (maybe it is different between the teeth triangles and the jaw triangles).
Alternatively, you might also want to test without diffuse light coefficient, only ambient, and see if the problem is light related.
Finally, you might want to consider the OrderIndependentTranslucentPass code...
from vtk-js.
@finetjul It looks like it has something to do with the diffuse light coefficient. When I put it to zero, it looks like this.
![Screenshot 2024-05-15 at 17 04 18](https://private-user-images.githubusercontent.com/114484998/330858349-cbe9bed5-0287-4479-981e-d28ae946b5b6.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3MTgwNDE1NTQsIm5iZiI6MTcxODA0MTI1NCwicGF0aCI6Ii8xMTQ0ODQ5OTgvMzMwODU4MzQ5LWNiZTliZWQ1LTAyODctNDQ3OS05ODFlLWQyOGFlOTQ2YjViNi5wbmc_WC1BbXotQWxnb3JpdGhtPUFXUzQtSE1BQy1TSEEyNTYmWC1BbXotQ3JlZGVudGlhbD1BS0lBVkNPRFlMU0E1M1BRSzRaQSUyRjIwMjQwNjEwJTJGdXMtZWFzdC0xJTJGczMlMkZhd3M0X3JlcXVlc3QmWC1BbXotRGF0ZT0yMDI0MDYxMFQxNzQwNTRaJlgtQW16LUV4cGlyZXM9MzAwJlgtQW16LVNpZ25hdHVyZT02ZTVkNGUxMThlYTg5YmU2ZDBjNTY1OWJhZmVjOGQxOTc3MTIwODgzMGZjYzhjMjI4ZGUwZjJhMTMyMjc2NThjJlgtQW16LVNpZ25lZEhlYWRlcnM9aG9zdCZhY3Rvcl9pZD0wJmtleV9pZD0wJnJlcG9faWQ9MCJ9.w-B6H3FAP6bVMIi2iFW1OEVPDOvvac7-tk-4XBLlDiA)
I guess that depending on the distance from the camera to the object, the intensity of the diffuse component changes? Do you have an idea where to investigate this issue?
from vtk-js.
And this blackness does not happen if it is opaque? Do you have ambient lighting?
from vtk-js.
Yes, it is caused because I do not have ambient lighting I believe. The blackness also occurs when the mesh is opaque
from vtk-js.
Related Issues (20)
- [Bug] prevent unexpected error in renderPassAll if polyData mapper does not exist HOT 1
- How to slice the polydata (cfd volume grid data) with vtk.js and see the grid on the slice? HOT 9
- Optimise matrices copy when multiplying in vtkMath HOT 2
- [Feature]
- [Bug] Headless Chrome - Cannot read property 'blendFuncSeparate' of null HOT 5
- [Bug] Cannot display Float32 images on iOS Safari HOT 13
- [Bug] Handling of clamped arrays? HOT 2
- [Bug] `vtkStringArray.newClone` raises error HOT 4
- [Feature] Support for LZMA vtk files HOT 5
- The vtkPLYReader parseAsText method reported an error [Bug] HOT 5
- [Bug] Incorrect interface for `insertNextPoint` on `vtkPoints` HOT 1
- STLReader and ORJReader parsing obj file with incorrect number of points[Bug]
- Middle and right mouse button interactor issue on Safari HOT 2
- [Feature] Rendering with OffscreenCanvas HOT 3
- [Bug] Issues in PR(Share GPU ressources across render windows) HOT 1
- [Bug] Memory leak in WidgetState HOT 2
- Can vtk.js read VTK files with the 'DATASET UNSTRUCTURED_GRID' format? HOT 7
- Mobile end lag issue HOT 1
- [Bug] ESM doesn't work without "type": "module" in node HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from vtk-js.