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

rethink LODs #433

Open
Trass3r opened this issue Apr 17, 2023 · 0 comments
Open

rethink LODs #433

Trass3r opened this issue Apr 17, 2023 · 0 comments

Comments

@Trass3r
Copy link
Collaborator

Trass3r commented Apr 17, 2023

#431 uncovered a few problems with the current LOD setup.

KMFs are divided into multiple mesh groups, usually to be able to assign different materials but sometimes also for high-poly models like GemHolder to overcome group size limitations.

1 group another

That leads to an unexpected distribution of triangle definitions over the groups and LODs, not the typical descending order.

KMFs define a global number of LODs and for a given level the corresponding mesh group levels are to be combined for the final mesh. If one is empty that group doesn't contribute to that level.
In JME otoh the LodControl determines the level to choose independently for each mesh group, leading to incorrect combinations.
One way to deal with this could be to merge mesh groups that use the same material. There's just this unknown variable mmFactor to consider (inverse factor in mipmap level decision (falloff?)?)

This hasn't surfaced yet cause the way LodControl works, together with the low polycounts, means we currently almost exclusively use LOD 0 anyway. One could try to tune the heuristic via

        lc.setDistTolerance(0.1f);
        lc.setTrisPerPixel(0.1f);

But overall it's questionable if the complexity of dealing with all this is worth any potential runtime gains given the low polycounts.

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