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

Research: custom culling #174

Open
ElmarJ opened this issue Sep 26, 2024 · 0 comments
Open

Research: custom culling #174

ElmarJ opened this issue Sep 26, 2024 · 0 comments
Milestone

Comments

@ElmarJ
Copy link
Owner

ElmarJ commented Sep 26, 2024

Currently, all GameObjects (such as buildings, bridges and canal islands) within the camera frustrum (even those very far away) are rendered every frame. Only a small fraction of these GameObjects is visible from any specific position.

The built in occlusion culling system is not feasible as none of these objects are static (because of time traveling) and may not be effective due to the extra CPU-overload.

A custom solution might work. I'm thinking about the following approach:

  • A separate thread runs (about) every second going over a (cached?) list of all GameObjects. Objects are disabled whenever:
    • Not present in currently selected year (TimeMachine)
    • Not currently visible, and at least 100 meters away

This would significantly reduce the number of rendered objects. I should research how much this would impact performance / frame rate. Some buildings might appear with a slight delay, but that is not a big problem.

Note: after this run, shadows should also be recalculated.

@ElmarJ ElmarJ added this to the v2.5 milestone Sep 26, 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

No branches or pull requests

1 participant