stride3d / stride3d/stride

Frustrum culling with displacement issue

Open
#3,026 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

bug
Dominant language
C#
Stars
7.8k
Forks
1.2k
Avg merge
2d 17h
Merged PRs (30d)
49

Description

Release Type: Official Release

Version: 4.3.0.2507

Platform(s): Win

Describe the bug
When applying vertex displacement on a mesh (plane rn) it gets culled when the original mesh's bounding box gets outside of the view frustrum, adjusting the bounding box of the mesh from code doesnt seem seem to do anything.

To Reproduce

  1. Create a mesh (plane for ex)
  2. add a displacement map to it
  3. when the pivot of the mesh gets outside of the frustrum, the mesh gets culled, even when there are parts of it that are still visible (cuz of displacement)
  4. adjust the mesh's bounding box/sphere so it fits the modified mesh
    issue persists
    EDIT:
    the reason for 4. not working could be this part
Image

another solution would be adding a "bypass culling" bool in the render object class, and reading that in the visibility group etc.
(this is kinda whacky tho)

Expected behavior
I thought adjusting the bounding box size to fit the modified mesh would keep it from getting culled.

Screenshots
If applicable, add screenshots to help explain your problem (use GitHub drag & drop)

Image Image

https://github.com/user-attachments/assets/47570e7b-0483-4cbe-b69b-57d552186866
(this is in the editor ik, but same thing happens in play mode too)

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Reproduce the issue with a displaced plane in the editor and in play mode, then trace the render object's bounding-box handling through the visibility group and frustum-culling path. Check why changing the mesh bounds does not affect visibility. Done means displaced geometry remains visible when it extends beyond the original bounds, without unnecessarily disabling culling.

Written by the indexing model from the issue text.

Assessment

Tech stack
csharp
Domain
computer-graphics, game-dev
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.