Skip to content

Loaded Mesh::new(PrimitiveTopology::TriangleList) disappear/appear randomly #9572

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
davids91 opened this issue Aug 25, 2023 · 3 comments
Closed
Labels
A-Rendering Drawing game state to the screen C-Bug An unexpected or incorrect behavior S-Needs-Investigation This issue requires detective work to figure out what's going wrong

Comments

@davids91
Copy link

Bevy version

0.11.2

[Optional] Relevant system information

If you cannot get Bevy to build or run on your machine, please include:

  • the Rust version you're using (you can get this by running cargo --version)
    • Bevy relies on the "latest stable release" of Rust
    • nightly should generally work, but there are sometimes regressions: please let us know!
  • the operating system or browser used, including its version
    • e.g. Windows 10, Ubuntu 18.04, iOS 14

If your bug is rendering-related, copy the adapter info that appears when you run Bevy.
AdapterInfo { name: "AMD Radeon RX 6650 XT (RADV NAVI23)", vendor: 4098, device: 29679, device_type: DiscreteGpu, driver: "radv", driver_info: "Mesa 23.1.5", backend: Vulkan }

You should also consider testing the examples of our upstream dependencies to help isolate any setup-specific issue:

  • wgpu for rendering problems
  • winit for input and window management
  • gilrs for gamepad inputs

What you did

Generated

What went wrong

Textured meshes on screen disappear/appear based on camera view.
(Please read Additional information, I would like to expand this section once I can reproduce the issue)

Additional information

image
image

I tried to reproduce this but to no success.. I isolated a minimal mesh display without textures, but there
I couldn't reproduce the issue. I am actually at a loss how to reproduce this, as the meshes are generated by a random function and it only seem to affect the meshes I manually add.

I would think it is related to frustum based display cuts, because the meshes disappearing are temporary, and only seems to do it if some part of them are out of the field of view. See screen below(relevant part is at bottom right):

image

image

Are there any tips on how can I reproduce the problem? I've set up an environment fairly isolated for this, so if I can reproduce it I'd be more than happy to post a minimal example of it, right now I'm just not sure about the next steps.

@davids91 davids91 added C-Bug An unexpected or incorrect behavior S-Needs-Triage This issue needs to be labelled labels Aug 25, 2023
@alice-i-cecile alice-i-cecile added A-Rendering Drawing game state to the screen S-Needs-Investigation This issue requires detective work to figure out what's going wrong and removed S-Needs-Triage This issue needs to be labelled labels Aug 25, 2023
@Lemonzyy
Copy link

It could be frustum culling that is causing that if your generated meshes doesn't have a correct AABB.
By any chance, are you updating the mesh handle / mesh asset after spawning the entity? If so, it may be related with the issue #4294.

@davids91
Copy link
Author

What I do is to generate different meshes ( for every nnn square) with an Asnyc Task. This task is placed inside an entity, and when done, it switches the optionally already available meshes with the new ones, or insert the new meshes. ( physics mesh and display ) .

I think the issue you linked might be related to it!

@davids91
Copy link
Author

davids91 commented Aug 28, 2023

(somewhat)Confirmed! The workaround there fixed the problem ( briefly tested it, once I confirmed for sure I'Ll close this issue ); Thank you so much!

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-Needs-Investigation This issue requires detective work to figure out what's going wrong
Projects
None yet
Development

No branches or pull requests

3 participants