-
-
Notifications
You must be signed in to change notification settings - Fork 21.4k
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
Implement automatic LOD (Level of Detail) #44468
Conversation
Vulkan-only or can it be ported to 3.x? |
I believe this approach is Vulkan-only or would require major compatibility-breaking changes to be backported to 3.2.x. It relies on the new 3D import system which was rewritten to make this kind of post-import processing easier. In 3.2.x, you can use the godot-lod add-on. |
(p_normal.x > 0) ? -half_extents.x : half_extents.x, | ||
(p_normal.y > 0) ? -half_extents.y : half_extents.y, | ||
(p_normal.z > 0) ? -half_extents.z : half_extents.z) + | ||
(p_normal.x > 0) ? half_extents.x : -half_extents.x, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is this a bugfix? is this worth backporting?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ah I am not sure if this function exists in 3.x, (I have the feeling I added it recently but I may be wrong) but if it does probably should be.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This does exist in 3.2, but backporting this would break compatibility.
Can you expose the pixel area of the lod array anywhere as info? Nevermind:
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks like the meshoptimizer code was re-formatted, which makes it hard to track what actually changed. Other than that and the couple of typos mentioned by Clay, everything looks OK.
Nice catch, I had overlooked this. I'll fix it as I guess it's not @reduz's forte to prevent automatic formatting (and revert it when wrong). |
c8f3bf8
to
56b554a
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
All "threshold" words are perfectly written 😛
@akien-mga ah I pushed a fix on my own with the fixed meshoptimizer |
-Happens on import by default for all models -Just works (tm) -Biasing can be later adjusted per node or per viewport (as well as globally) -Disabled AABB.get_support test because its broken
c22eb0a
to
d2302f5
Compare
Thanks! |
-Happens on import by default for all models
-Just works (tm)
-Biasing can be later adjusted per node or per viewport (as well as globally)