Open RobertBeckebans opened 3 years ago
Maybe an index-based solution like meshoptimizer could be considered for automatic LOD generation. Godot just implemented it: https://github.com/godotengine/godot/pull/44468
Thanks for the hint. I thought meshoptimizer wasn't a poly reduction lib but only a vertex cache optimizer. I'll have a deeper look at it.
so you author the higher poly mesh only and the meshoptimizer creates the lower poly mesh on the fly?
@BielBdeLuna Indeed, that's what meshoptimizer does.
Then, those are quite interesting possibilities! :+1:
Are you sure it's meant to be used on the fly? It's not mentioned on the project page explicitly, but I always assumed it was meant to be used once when importing a mesh into the engine (and not on every model/level load)?
Are you sure it's meant to be used on the fly? It's not mentioned on the project page explicitly, but I always assumed it was meant to be used once when importing a mesh into the engine (and not on every model/level load)?
Indeed, meshoptimizer should be run at import-time (or perhaps load-time and then cached).
Storm Engine 2 has LOD system for static meshes. Worth checking out IMO :)
The engine should look up for _1 and _2 model suffices to autoload same objects in lower resolution and switch them based on projected bounding box size.
If there are no LOD models it could autogenerate them like Ritual / Splash Damage did in those good old days.
https://github.com/Sporesirius/fakk2/blob/master/source/utils/max2tan/calclod.cpp
This is potentially problematic for stencil shadows but should be a win for shadow mapping and general polycount reduction with new scenes.