Description
Currently, the text rendering in gh-skyline uses a binary threshold for pixel values when creating the 3D text geometry. This results in a "hard" embossing effect where pixels are either fully raised or not at all. We can improve the visual quality by using the pixel's grayscale/whiteness value to determine the embossing height, which would preserve font anti-aliasing in the 3D output.
Requirements
- Modify the text rendering logic to use pixel whiteness values (0-1) to scale embossing height
- Update
isPixelActive() to return a float value representing pixel intensity instead of boolean
- Scale the voxel depth based on the pixel intensity value
- Maintain backward compatibility with existing cube generation functions
- Handle edge cases (completely black/white pixels) appropriately
Definition of Done
Additional Notes
- Consider adding a configuration option to toggle between binary and grayscale modes
- Pixel intensity calculation should account for RGB channels appropriately
- May need to adjust overall embossing depth to maintain visual balance
- Consider impact on STL file size due to increased geometry complexity
Description
Currently, the text rendering in
gh-skylineuses a binary threshold for pixel values when creating the 3D text geometry. This results in a "hard" embossing effect where pixels are either fully raised or not at all. We can improve the visual quality by using the pixel's grayscale/whiteness value to determine the embossing height, which would preserve font anti-aliasing in the 3D output.Requirements
isPixelActive()to return a float value representing pixel intensity instead of booleanDefinition of Done
Additional Notes