-
-
Notifications
You must be signed in to change notification settings - Fork 380
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
After setUserMatrix, Actor become pure black. #3148
Comments
This is likely not a bug, it is because your user matrix "flips" the point normals. It is therefore assumed that the normals are pointing towards the center of the object instead of pointing outward. The lighting mechanism needs to have the dot product between the normals and the light direction is negative so that it lit correctly. |
How to update the point normals to make it towards the center? I think, this should be done in method: setUserMatrix. |
No, it shouldn't be done in UserMatrix. The flip might be intentional. You can look at |
Where to see the flipped normals? I do not know when and where to update the normals. |
You can't see them (because the user matrix is applied at render time), but the blackness is explained by flipepd normals.
You can set the output of the vtkPolyDataNormals filter as the input of the mapper. |
Bug description
Loading polydata with vtkSTLReader from stl file, then create an vtkActor, setUserMatrix,
the actor looks strange, it become pure black.
Steps to reproduce
Please see, demo
Detailed Behavior
No response
Expected Behavior
Just play right as without setUserMatrix.
Environment
The text was updated successfully, but these errors were encountered: