Skip to content

Meshes in Scenes will be culled while in camera #18168

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
homebrewmellow opened this issue Mar 5, 2025 · 7 comments
Closed

Meshes in Scenes will be culled while in camera #18168

homebrewmellow opened this issue Mar 5, 2025 · 7 comments
Labels
A-Rendering Drawing game state to the screen C-Bug An unexpected or incorrect behavior S-Waiting-on-Author The author needs to make changes or address concerns before this can be merged

Comments

@homebrewmellow
Copy link

i rely on:
bevy::render::view::NoFrustumCulling
to make sure my scenes aren't culled. Otherwise I have to fickle around with positions of my meshes in my scenes because some positions cause them to dissapear even when they are in camera. Which means I can't build the scenes in the way I want to.

Now i am completely missing the feature. Which worries me for the future. But Culling shouldn't work this way anyways. Never in a million years should something be culled while in Camera. just because the meshes position leaves some arbitrary (very short: 8-12 units of distance) threshhold.

@alice-i-cecile alice-i-cecile added C-Bug An unexpected or incorrect behavior A-Rendering Drawing game state to the screen S-Waiting-on-Author The author needs to make changes or address concerns before this can be merged labels Mar 5, 2025
@alice-i-cecile
Copy link
Member

alice-i-cecile commented Mar 5, 2025

I'm having a lot of trouble understanding what you mean here.

Has NoFrustrumCulling been removed? It certainly appears to still exist: https://dev-docs.bevyengine.org/bevy/render/view/struct.NoFrustumCulling.html Why are your objects getting culled while you're looking at them? What's your camera far plane set to?

@JMS55
Copy link
Contributor

JMS55 commented Mar 6, 2025

If frustum culling is culling meshes that shouldn't be culled, you might need to expand your entity's bounding box (Aabb).

@homebrewmellow
Copy link
Author

you've misunderstood what i mean by
"i rely on: bevy::render::view::NoFrustumCulling"
I meant without it I would be f$%^&. I'm glad it exists.
When I don't use it this problem happens

@homebrewmellow
Copy link
Author

the scene is defined in a gltf file btw. so basically on_load. if I use FrustumCulling and I am unlucky. some meshes in my scene don't appear, even if it is in camera

@greeble-dev
Copy link
Contributor

@homebrewmellow, do the meshes that disappear happen to be skinned meshes? I'm asking because there's a known issue with skinned meshes in particular (#4971). I'm aiming to get a proper fix into the engine in some future version - I agree that relying on NoFrustumCulling is bad.

@homebrewmellow
Copy link
Author

@greeble-dev yes skinned mesh

@greeble-dev
Copy link
Contributor

Ok, hopefully I can get this fixed in the engine at some point. I also have a crate the fixes it automatically (https://github.com/greeble-dev/bevy_mod_skinned_aabb) - that's still not a great solution but saves having to manually insert NoFrustumCulling everywhere.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-Rendering Drawing game state to the screen C-Bug An unexpected or incorrect behavior S-Waiting-on-Author The author needs to make changes or address concerns before this can be merged
Projects
None yet
Development

No branches or pull requests

4 participants