bevy
bevy copied to clipboard
Tracking issue: Amazing Gizmos
This issue tracks the progress on Gizmo features
Contributing
Want to check off one of those checkboxes? Nothing easier!
- Open a feature request you can copy/paste the description if you feel lazy!
- Implement the feature and open a PR!
All related issues will be listed in this tracking issue.
The (IMO) easy ones
- Linecaps
- Dotted lines
- more gizmo shapes
- light source gizmos
All features
Not sorted in any specific order:
- [X] Gizmos MVP #6529 Make it possible to draw lines on screen, for them to be immediately despawned next frame
- [X] AABB gizmos #8468 Draw entity bounding boxes
- [ ] Light source gizmos: Gizmos that show where light sources are placed, potentially their intensity, color & direction
- [ ] UI layout gizmos: show outline of CSS flexbox and grid UI elements. #11237
- [x] More than one gizmo kind: Gizmo line width/depth bias/render layer should be configurable at call site, not just in a resource (system level: #10342)
- [x] multiple line width
- [x] multiple depth bias
- [x] multiple render layers
- [ ] Retained gizmos: We want to give shape to invisible things such as physics collider. It would make more sense to have a retained API for this. Would supersede wireframe rendering #9178
- [ ]
FixedUpdategizmos: Currently gizmos do not work if used in theFixedUpdateschedule. (#10973, #9153) - [ ] More gizmo shapes (#10571)
- [x] arrows (#10550)
- [ ] Double ended arrows
- [X] lines/linestrip/ray
- [X] cuboids/rectangles
- [X] spheres/circles
- [X] ellipses
- [X] Regular polygons
- [X] arcs/ semi-circles
- [ ] grids
- [ ] splines
- [ ] camera
- [ ] 3D meshes/2D meshes/wireframes (#10621)
- [X] axes
- [ ] light bulb
- [ ] rounded cuboid
- [x] Cylinder/arbitrary 3d shape extrusion
- [X] frustum (conical frustrum with 4 segments)
- [X] pyramid/cone (Cone with 4/N segments)
- [x] capsule
- [X] triangle
- [ ] tetrahedron
- [X] torus/donuts
- [ ] Rounded arbitrary shapes
- [x] arrows (#10550)
- [x] Gizmo registry: Allows plugin to register categories of gizmos and defer to user ability to toggle or control properties of gizmos within a category. See #9187 and #10342
- [ ] System-level gizmo registration: Automate the gizmo registration by inheriting a system-level registry assignation
- [ ] Actually-immediate-mode API: no
SystemParamrequired, just a macro/function call to draw gizmos, nothing more. No more need to modify the system signature to add gizmos, or even pass around the gizmo struct, in the style of https://github.com/nicopap/bevy-debug-text-overlay/) - [ ] dotted lines: Gizmo with a dotted line effect.
- [ ] Line caps: Gizmo squares have ugly corners because the line caps are not filled. See The tutorial that led to bevy_polyline
- [ ] Square caps: Extend the gizmo lines by the line width
- [ ] Round caps: Add a semi-circle of line-width radius to the end of lines
- [ ] Line Joints: Smooth out space between subsequent lines
- [ ] Round joints
- [ ] flat joints
- [ ] spiky joints
- [ ] Text gizmos: Draw text on screen without the
bevy_textsanctimonious rituals. Just agizmo_print!("foobar")and it would show on screen.- [ ] multiline text: Should support line returns
- [ ] user-provided font
- [ ] Text in 2d space: Gizmo should let print text on screen on arbitrary positions in 2D games.
- [ ] log-style text: Users would not provide a position, but it would show up on screen as event in a way similar to a console message in Garry's Mod or Minecraft. Note: This is already implemented as a 3rd party plugin in https://github.com/nicopap/bevy-debug-text-overlay/
- [ ] Text in 3d space: Gizmo should let print text in 3D games, may chose to keep the same size with distance or apply perspective.
- [ ] Oriented text: Text that always faces a specific direction.
- [ ] Non-overlapping text: There could be a toggle that allows text placed on screen through 2D or 3D API to not overlap, even if they should, given their provided position.
- [ ] Filled shape gizmos: We want to be able to draw filled shapes, this might be useful for special signaling or highlighting areas. See https://github.com/james-j-obrien/bevy_vector_shapes
- [ ] semitransparent filled shape gizmos: Semi-transparent this becomes apparently much more useful.
- [ ] Reactive gizmos: ability to associate Gizmos to game state; accept input from gizmos and modify game state from gizmos. It probably would look like an immediate mode UI, but 3D #9498
I'm now using gizmos extensively for debug visualizations.
Here's a +1 for filled shapes. One of my gizmos is visualizing a quadtree, another is the nav mesh (using the quadtree) and filled gizmos would let me make an Unreal-style navigable area preview. It works now, just not as easy to look at as it could be.
https://github.com/bevyengine/bevy/issues/9475 also seems relevant.
Could you also add regular and irregular polygons to the list of shapes?
Could you also add regular and irregular polygons to the list of shapes?
I think it could be better expressed as "2D meshes". I'll reword the post to be more inclusive.
Text in 3d space: Gizmo should let print text in 3D games, may chose to keep the same size with distance or apply perspective.
Should have the choice between the text being billboarded or facing a specific direction
Could write a polyhedron function with a similar interface to OpenSCAD's polyhedron() function. And by being less strict about the faces argument (since we only actually care about edges) it would work for polygons too.
Under arrows, could you add "double-ended"? thought of it just now but i'll forget by the time i can do it
I think passing a Mesh to the gizmos would be enough for the polyhedron API (it's listed in the issue as "3D Mesh")
Under arrows, could you add "double-ended"? thought of it just now but i'll forget by the time i can do it
Should have the choice between the text being billboarded or facing a specific direction
Added them!
Could you add "Compatibility with FixedUpdate"?
#11072 technically addressed support for tons of new shapes:
- Ellipse
- Capsule
- Plane (axes and surface normal in 3D)
- Triangle
- Regular polygon
- Cylinder
- Cone
- Conical frustum
- Torus
They don't have their own gizmo methods (except ellipses), but work through the primitive_2d and primitive_3d methods.
Just asking, but does "Round joints" mean that you can have round corners for the gizmos? Would love to be able to draw rectangles, polygons, etc. with rounded corners.
does "Round joints" mean that you can have round corners for the gizmos?
Not exactly. Try drawing a rectangle with the current gizmos and a large line width. You'll notice the corners are "cut". The joints would fill the corners. There are several ways to fill the corners, one of them is to fill it with a rounded shape, which we call "rounded joint".
Ah alright, thanks for the explanation. Should I make a new issue about this, or could this just be added to the list above?
Well, there is "Rounded cuboid" but not "rounded arbitrary shapes" which seems to be a bit harder to implement. Though no reasons to add them to the wish list: added!
I think we have to support a better way of using multiple windows with gizmos without having to create multiple configs for all windows
Can you mark grid as resolved and add a sub-section "cubic grid"?
Can you mark 3d grid #12430, dotted lines #12394 and line joints as resolved please?
Text gizmos... please
@nicopap double-ended can be ticked off. actually a good few can be ticked off. (unless i'm stupid and you're waiting for the features to actually ship)