-
-
Notifications
You must be signed in to change notification settings - Fork 3.6k
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
Add debug wireframe rendering for Aabb, Frustum, and Sphere #4082
Comments
The way I imagined how this feature would works is not not inserting a mesh of the bounding box into the world, but having a general "draw these lines somehow" mechanism like bevy_polyline or bevy_debug_lines and having a system that iterates over Alternatively, there could be one "hollow box" mesh, and we add an |
I used It might be better - as @jakobhellermann mentions - to take an immediate mode rendering approach and convert all AABBs into wireframes in a function call without generating any entities. We could do this without needing any fancy line rendering to be implemented in bevy, just draw wireframe box meshes in the render subapp. |
I had started on this and was adding debug meshes similar to |
Any progress on this? |
An immediate mode rendering api was added and you can enable drawing oriented bounding boxes via |
We now have this for aabbs, spheres, and camera frusta, right @devil-ira ? |
The pr for frusta isn't merged yet, but I'll set this issue to be closed when it does |
What problem does this solve or what need does it fill?
Debugging intersections for the primitives currently used for culling for rendering is difficult without visualisation.
What solution would you like?
Add debug wireframe rendering for Aabb, Frustum, and Sphere. Mesh types exist for all but Frustum so those should probably be reused, and then there will need to be a way to differentiate debug meshes and general meshes so that it doesn’t create a feedback loop of a mesh having an Aabb, with a debug mesh for the Aabb that itself gets an Aabb that gets a debug mesh…
What alternative(s) have you considered?
None yet. Just noting that this would be good to do.
Additional context
@aevyrie ’s bevy_mod_bounding has support for this already and there’s the primitive shapes RFC.
The text was updated successfully, but these errors were encountered: