sp614x / optifine

1.81k stars 418 forks source link

[Suggestion] [Resource Packs] Block LOD #2221

Open JadeMonsuta opened 5 years ago

JadeMonsuta commented 5 years ago

tl;dr-The title really says it all I can't say it much better than that.

I'm a resource pack artist, and after months of fiddling with what I have made, I came to the conclusion that the leaves in my pack were causing a bit of a hit on the performance. I, however, don't want to sacrifice too much detail just to keep the game running above 60fps, and thought a great middle ground would be some sort of LOD system that would switch models out based on what is near the player and what isn't near the player. One possible method could be just having a near and far plane and after 4 chunks or so it'd use the low detail models instead of the high detail ones, or a pack creator could define multiple levels for distance.

sp614x commented 5 years ago

This quite complicated to be implemented. Side effects which can't be avoided:

Multiple LOD levels would slow chunk loading further.

sp614x commented 5 years ago

If the chunks are split in parts (non-LOD blocks, LOD blocks) it may be possible to reduce the side effects. This may conflict with some mods, the CPU rendering load would increase and LOD couldn't be used for translucent blocks as they need a specific sorting order and can't be split.

Render Regions may also be problematic.

sp614x commented 5 years ago

Adding LOD rendering layers may be used to switch between normal/LOD models. This wouldn't slow down the chunk generation so much. The rendering itself may be slowed down a bit as it has to go over more layers.

JadeMonsuta commented 5 years ago

The rendering itself may be slowed down a bit as it has to go over more layers.

Though it'd be a good trade off in the instance you have a very complicated recurring model (read : high detail leaves)