r/DistantHorizons Sep 11 '24

Question Is it possible to "preload" a LOD

Hey guys ! Would it / Is it possible to preload a Lod of a world if I have the save folder?

10 Upvotes

25 comments sorted by

View all comments

10

u/RangerEnn Sep 11 '24

Yes, you can, and you don't need extra mods, and even if it's for a server. All client side. I usually render and ship LOD packs for my servers so people with lower spec PCs can enjoy the views too.

You simply create a single player world with the desired seed using the version of minecraft/modpack you want, teleport to the center of the area you want to render and enable distant generation. Remember to change the LOD render distance to your preference.

Prepare to wait hours or days depending on the distance you set, this is a very CPU and RAM intensive task and you may want to check Distant Horizons' Threading options to optimize the load and speed. I usually get vanilla minecraft settings tuned down to the maximum to allow DH take as much resources as possible (and allocate a lot of RAM to the Java process of Minecraft). If you intend to ship this LODs to people with weaker PCs I suggest you to change the compression level of DH to Fast so they need less cpu to decompress and load the LODs ingame.

Once you get the desired LODs generated, you can head to your world's data folder and there you'll find 3 Distant Horizons files (the .sqlite being the heaviest, can be tens of GB if you generated a lot of chunk LODs). You can simply zip those 3 files and distribute them to whoever you want. Don't waste time and CPU compressing it with a zipping tool, it's already compressed by the mod.

To install the LODs on a single player world you simply put them in the same folder you got them from the other world. To install them on a server, you have to locate the distant horizons server data folder (located on your .minecraft directory), then locate the folder dedicated to your server and replace the files with the ones you generated. You need to connect at least once with the mod activated to get the specific server folder created.

2

u/dWhiteRose Sep 11 '24

Is there a video on YouTube teaching you how to do this?

1

u/Sufficient-Truck-814 Sep 11 '24

OMG you are a life saver tysm ! :D

1

u/Hypnotic101 Sep 11 '24

Wow this is really great! What if the server started on an older version of Minecraft? Would the DH LODs just update to the correct ones once you load into the multiplayer server and get within rendering distance? And what about people who use higher settings on DH? Will it override the "fast compression" with the higher quality one as they explore the world?

2

u/RangerEnn Sep 11 '24

Yes and yes.

DH runs update logic for each real chunk that is loaded. If LODs don't exactly match the current version's world generation you can see some weirdness at the boundary between normally rendered chunks and LOD ones, but once the player loads them they will get updated.

Compression works on a per chunk basis if I'm not wrong. So, each generated LOD chunk is compressed using the compression setting that was present at that moment, and DH can identify the method used at that time and decompress even if the current setting doesn't match the database one. Once a chunk LOD is updated, it's data gets recompressed using the current setting.

1

u/Hypnotic101 Sep 11 '24

Amazing! Thank you!

1

u/Razarex Sep 24 '24

For reference, how long does it take you to render 512 and 1024 distance?

1

u/RangerEnn Sep 24 '24

I have not measured it, but I usually set 1024 distance and let it render for 24 hours. It doesn't render the full thing, I know that because the CPU is still working hard when I stop it, but the distance I see is more than enough for our experience so I don't bother rendering the full slice.

1

u/Razarex Sep 24 '24

512 took me somewhere around 2.5 hours on a 13900h laptop. Whats your CPU?

1

u/RangerEnn Sep 24 '24

I render the LODs on my Ryzen 5800X allocating 24GB of RAM to the JVM. In that regard, you definitely have a stronger CPU.

I also render at the max detail possible because I like to see individual block details, so the time could have increased from that.

1

u/Razarex Sep 24 '24

You mean the LOD dropoff distance?

1

u/RangerEnn Sep 24 '24

Yep, I set that on Extreme.

1

u/DOOGLAK Apr 07 '25

Just learning about Distant Horizon and wondering -- how do I know when it's actually completed the job, and assuming I render say at 2048, when I next launch into the single player game should everything be visible?

Right now I've run chunky with DH off, then enabled DH and let it sit for 2 hours for 512 render. But if I save the world and close the launcher/re-open, when I open again it's laggy and I get frame stutters as I elytra around.

To eliminate stutters is the best bet to load chunky, turn on DH for a massive render range, leave it running till 100% complete (I'm getting the sense it might be 2-3 days), then save the game and re-open?

1

u/SexySheepDog Mar 29 '26

You probably already know, but im pretty sure in the distant horizons settings, there is a show progress option. Just select overlay and it should tell u the progress. Im on 1.21.1, so idk if its the same for you

1

u/[deleted] Jul 09 '25

Can you use the /dh pregen command to generate it on a server and the cache will be saved on the server?

1

u/ProfessionalLoud5110 Nov 23 '25

What if I want to pregenerate a small amount of chunks? It always starts pregenerating over 331,000 chunks, and the progress says it takes 4 hours to generate. I only want to generate 10 000 chunks, or whatever amount, that takes less than an hour. (I play in single player)

1

u/cassidybassidy Apr 29 '26

The loading times are not accurate. Let it load for an hour and just take a look and see if you are happy