
[DH] Ships invisible (in part) due to LOD fade — Needs RenderableBoxGroup integration
nuttyNaoko opened this issue · 0 comments
Mod Name
Distant Horizons
This issue occurs when only Valkyrien Skies, addons, and the mod I have specified are installed and no other mods
- I have tested this issue and it occurs with only Valkyrien Skies, addons, and the mod I have specified
Minecraft Version
1.20.x
Mod Loader
Forge
Issue description
There are two behaviors (w/ shaders & w/o shaders), both are caused by the same core issue: VS should declare ships as a RenderableBoxGroup
to the render pass so that Distant Horizons becomes aware of their depth within the scene.
Video: https://streamable.com/q2v8cq

DH Render API: https://distant-horizons-team.gitlab.io/distant-horizons/com/seibel/distanthorizons/api/interfaces/render/package-summary.html
It looks like CustomRenderRegister
is expecting a RenderableBoxGroup
, which can be generated using the CustomRenderObjectFactory
. If you can feed the ship’s AABB information into that RenderableBoxGroup
, there could be a clean solution here.
The reason we cannot see ships (anymore) is because of the LOD-to-vanilla chunk fading feature that was added in newer versions of Distant Horizons. LOD chunks render “on top” of vanilla chunks in their own layer, and they use a gradient sphere around the player to fade from full to transparent, which then reveals the underlying chunk. This can be tested in DH Debug settings by only rendering LODs.
When shaders are enabled, fading isn’t done (probably due to its complexity). Instead, DH falls back to the original method of cutting off LODs where vanilla chunks exist. This means we can see ships on top of the LOD, but that’s always the case, which isn’t what we want in all cases. As seen in the video, the tree exists in front of the ship, yet the tree’s LOD shows behind the ship as soon as we get far enough for it to load in.
VS obviously already handles depth properly with vanilla chunks. The issue is that DH is unaware of ship placement in 3D space, so it just draws over them (when fading applies) until the ship is inside the loaded chunk.
Issue reproduction
Make sure DH is running and LODs are generated
- Create a small Valkyrien Skies ship
- Decrease render distance < 6 chunks
- Fly far away to unload the real chunk containing the ship
- Observe the ship becoming invisible as you move away, despite the ship itself being loaded.
- Behaves differently with shaders. No fading, but also no depth context.
Logs
No response