Skip to content
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

[Feature]: Enhance text embossing with grayscale height mapping #13

Open
3 of 5 tasks
chrisreddington opened this issue Dec 1, 2024 · 0 comments · May be fixed by #27
Open
3 of 5 tasks

[Feature]: Enhance text embossing with grayscale height mapping #13

chrisreddington opened this issue Dec 1, 2024 · 0 comments · May be fixed by #27
Assignees
Labels
enhancement New feature or request good first issue Good for newcomers help wanted Extra attention is needed

Comments

@chrisreddington
Copy link
Collaborator

chrisreddington commented Dec 1, 2024

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

  • Text rendering uses grayscale values to determine embossing height
  • Anti-aliased edges of text are preserved in the 3D output
  • Documentation is updated to reflect the new behavior
  • Unit tests cover various pixel intensity scenarios
  • Visual regression tests show improved quality at text edges

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
@chrisreddington chrisreddington added enhancement New feature or request good first issue Good for newcomers help wanted Extra attention is needed labels Dec 1, 2024
@chrisreddington chrisreddington changed the title Adjust text conversion approach Enhance Text Embossing with Grayscale Height Mapping Dec 1, 2024
@chrisreddington chrisreddington changed the title Enhance Text Embossing with Grayscale Height Mapping Enhance text embossing with grayscale height mapping Dec 1, 2024
@github-project-automation github-project-automation bot moved this to Needs Review in gh-skyline Dec 1, 2024
@chrisreddington chrisreddington moved this from Needs Review to Ready to Start in gh-skyline Dec 1, 2024
@chrisreddington chrisreddington changed the title Enhance text embossing with grayscale height mapping [Feature]: Enhance text embossing with grayscale height mapping Dec 2, 2024
@chrisreddington chrisreddington linked a pull request Dec 9, 2024 that will close this issue
@chrisreddington chrisreddington self-assigned this Dec 9, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request good first issue Good for newcomers help wanted Extra attention is needed
Projects
Status: Ready to Start
Development

Successfully merging a pull request may close this issue.

1 participant