Skip to content

MultiMeshInstance3D Fade Mode Culling doesn't respect AABB #102799

@TokisanGames

Description

@TokisanGames

Tested versions

4.3-stable, 4.4-beta3

System information

Godot v4.3.stable - Windows 10.0.22631 - Vulkan (Forward+) - dedicated NVIDIA GeForce RTX 3070 Laptop GPU (NVIDIA; 32.0.15.6614) - 12th Gen Intel(R) Core(TM) i9-12900H (20 Threads)

Issue description

Normally, both MeshInstance3Ds and MMIs cull based on comparing the AABB of the visible meshes with the visibility_ranges.

This means, even if the MMI instance transforms are far from the location of the MMI node, they are still culled based upon distance to the center of the AABBs encompassing the instances. The MMI location is ignored.

However, if visibility_range_fade_mode = self, this is not true. Shadows correctly cull based on the AABB. The visual mesh is incorrectly culled by something else, so the shadows show but the mesh does not.

This is preventing us from providing fading between instance LODs in Terrain3D.

MMI location in the center of the instances AABB

Image

MMI location far from the instances AABB

Image

Steps to reproduce

Open the MRP. Look at TestArea3. Move the camera towards the center of the grey areas. Read the README node for more info.

Minimal reproduction project (MRP)

test-mmi-margin.zip

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    Status

    Done

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions