-
-
Notifications
You must be signed in to change notification settings - Fork 97
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
Improve automatic mesh LOD generation to better preserve silhouettes at high simplification levels #3861
Comments
In a game with complex meshes, perfect symmetry in meshes is uncommon. A realistic character will never use a symmetric mesh, simply because humans (and their clothing) are not symmetric in the first place 🙂
Blender's Decimate modifier doesn't have a great reputation among 3D modellers (not to mention its code is GPL-licensed, which means we can't copy it). Its proprietary competitors like Simplygon are much more renowned in comparison. Remember that Godot's automatic LOD is only meant to kick in when far away from the mesh. It doesn't matter if the mesh looks all garbled when up close if it looks fine when it occupies 10 pixels on the screen. |
I know it's GPL licensed and cannot be used in here, so it's more of a suggestion of what sort of thing to aim for.. Also the Pictures were taken at the Same distance to show the gigantic difference in quality, which would translate into better quality at a distance too, albeit very slight, but also a Massive improvement in performance due to a Colossal reduction in triangles rendered at each of the LODs. The 1% poly mesh is using only ~300 triangles while the lowest Godot's Auto LOD renders is ~3000 triangles which matters a Ton when you've got a thousand or so instances visible on screen.. Not to mention the fact that the 25% polycount decimated LOD can be used where the current 50% polycount Auto Generated Godot LOD can be used, which translates into ~7500 triangles less can be utilized for the same distance, and you can more aggressive with reducing triangles closer by without massive quality loss, which can yield massive performance improvements. Anyhow as I know this is a bit of a tall order, I've opened #3860 to provide an alternative to Auto Generated LODs without creating dozens of Mesh Instances to do HLOD or Creating elaborate scripts to switch LODs on Meshes. |
Can you post tests based on pixel size (edge length) on screen? If you post the sample, I want to also see if we can tune the Edited: The way the LOD tool works is it requires the mesh triangles are evenly distributed and if the mesh is not the algorithm cannot pick vertex indices to reduce the lod. I was looking into intrinsic triangulation for better Godot Engine LODs. http://geometry-central.net/surface/intrinsic_triangulations/basics/ I am also looking into quad retopo for external use. |
Here's the Sample's Blend file used. I've tried some tweaking of the mesh LOD settings and I didn't get very far with the results. The Mesh Triangles are very much NOT evenly distributed in the sample, the Face and Hair have much denser topology compared to the suit, and also another thing that's possibly throwing off the LOD are the Tongue and Teeth inside.. |
I'll write about this more.
Set to lod bias 8. Nothing conclusive though. |
As part of godotengine/godot#73734, I was looking into this with mesh lod set to 8 and 8 bone influences. There appears to be corruption. This appears to be a bug in godot engine. |
Testing as part of godotengine/godot#73734 pr. LOD biased to 12023-02-22.12-40-38.mp4LOD biased to 82023-02-22.12-41-17.mp4 |
@mrjustaguy Can you test the |
It is significantly better, at 25% polycount in Godot the results are similar to the 10% polycount in blender, however below that it starts falling apart just the same, and there seems to still be a limit on how low it'll decimate it (so gets stuck at just under 10% polycount) and still looks at that level basically the same. |
Describe the project you are working on
Game
Describe the problem or limitation you are having in your project
See Images Below
GODOT
Full Mesh
50% Polycount
25% Polycount
10% Polycount (LOWEST)
BLENDER
Full Mesh
50% Polycount
25% Polycount
10% Polycount
1% Polycount (Could go a little Lower still)
Describe the feature / enhancement and how it helps to overcome the problem or limitation
Godot's auto LOD has problems.
This is all in Comparison to Blender's Decimate Modifier that was used for the Images above in the Collapse Mode. Implementing Something like That would Significantly Improve Quality, and Would also Improve Performance when the Meshes are farther away, significantly when there are many Auto LOD Meshes far away.
Describe how your proposal will work, with code, pseudo-code, mock-ups, and/or diagrams
Instead of using the current Auto LOD generation methods, Try doing something similar to Blender's Decimate in Collapse Mode, as that gets way better results, while also being very easy to control how many polygons are being cut as it just cuts a percentage of triangles you specify, and also supports symmetry that can be somewhat important in keeping quality consistent for quite a few meshes as it's quite a common thing.
If this enhancement will not be used often, can it be worked around with a few lines of script?
No.
Is there a reason why this should be core and not an add-on in the asset library?
Auto LOD is Core.
The text was updated successfully, but these errors were encountered: