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 Hidden-surface determination #4

Open
CaptainDeathead opened this issue May 5, 2024 · 2 comments
Open

Add Hidden-surface determination #4

CaptainDeathead opened this issue May 5, 2024 · 2 comments
Assignees
Labels
enhancement New feature or request

Comments

@CaptainDeathead
Copy link
Contributor

CaptainDeathead commented May 5, 2024

A large contributor to the slower performance on more polygons is pythons for loop's sluggishness and the more polygons there are to draw, the more sluggish it gets.

To reduce the amount of polygons that need to be drawn perhaps some Hidden-surface determination would be beneficial, thus increasing performance and allowing more real-time rendering.

A Wikipedia article on this topic

@CaptainDeathead
Copy link
Contributor Author

Occlusion culling and Back-face culling could be 2 pretty decent ones to consider.

@Lincoln-Murray Lincoln-Murray self-assigned this May 6, 2024
@Lincoln-Murray Lincoln-Murray added the enhancement New feature or request label May 6, 2024
@Lincoln-Murray
Copy link
Owner

Note: Back-face culling is already implemented at Main.py, line: 120 'if nz <=0:' checks the length of the normal in the Z axis for the given triangle, if the value is negative it indicates that it is facing towards the camera, if it is positive that indicates its normal on the Z axis is running in the same direction as the camera, and hence is facing away from the camera. The nz value is set to -1 at Main.py, line: 116 'nz = -1', this is for the 'wiremesh' feature which displays a transparent surface and requires Back-face culling to be turned off.

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

No branches or pull requests

2 participants