Implement a feature to display labels (e.g., star or planet names) on objects rendered in the OpenGL screen. Labels should dynamically adjust their position based on the camera's view and remain readable regardless of zoom level.
Objectives
Render text in OpenGL to represent labels.
Ensure labels are positioned correctly relative to their associated 3D objects.
Maintain readability by dynamically adjusting size and orientation.
Optimize rendering performance for multiple labels.
Technical Considerations
Text Rendering
Use bitmap fonts or a library like FreeType for text generation.
Create texture atlases to store character bitmaps efficiently.
Positioning
Use OpenGL's projection matrix to map 3D object coordinates to 2D screen space.
Update label positions dynamically as the camera moves or the user zooms in/out.
Scaling and Visibility
Adapt label size based on zoom level to ensure readability.
Hide labels for objects that are too small or far away to reduce clutter.
Proposed Steps
[ ] Research and select a suitable text rendering method (bitmap fonts, FreeType, stb_truetype).
[ ] Implement text rendering pipeline in OpenGL (texture generation, shaders).
[ ] Create a utility to map 3D coordinates to screen positions for label placement.
[ ] Add dynamic scaling and visibility rules for labels.
[ ] Optimize rendering for multiple labels to ensure smooth performance.
[ ] Test the feature with different object types (e.g., stars, planets).
Deliverables
Functional label rendering for objects in OpenGL.
Smooth and adaptive label positioning and scaling.
Performance-optimized implementation for real-time applications.
Note
As this task seems quite hard we aim to do it on this Sprint but it's realist to try it on next Sprint.
Description
Implement a feature to display labels (e.g., star or planet names) on objects rendered in the OpenGL screen. Labels should dynamically adjust their position based on the camera's view and remain readable regardless of zoom level.
Objectives
Technical Considerations
Text Rendering
Positioning
Scaling and Visibility
Proposed Steps
Deliverables
Note
As this task seems quite hard we aim to do it on this Sprint but it's realist to try it on next Sprint.