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

feat: Add rasterization and interpolation features #7

Merged
merged 9 commits into from
Dec 4, 2023

Conversation

TechyDaniel
Copy link
Contributor

@TechyDaniel TechyDaniel commented Nov 27, 2023

  • Implement vectorized interpolation for colors, both horizontally and vertically.
  • Include robust error handling to manage edge cases and invalid inputs in interpolation functions.
  • Develop comprehensive unit tests to validate the rasterization and interpolation functionality.
  • Ensure tests cover a variety of scenarios, including edge cases and expected failures.

Description

Rasterizer of pixel data (colors, normals, alpha), into a W,H image. The rasterizer interpolates the value between points and inside the new triangle.

Type of change

Please delete options that are not relevant.

  • Bug fix (non-breaking change which fixes an issue)
  • [ x] New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • [ x] This change requires a documentation update

How Has This Been Tested?

Please describe the tests that you ran to verify your changes.
Provide instructions so we can reproduce.
Please also list any relevant details for your test configuration.

  • Unit tests
  • Functional Tests

Checklist

  • I confirm that the changes meet the user experience and goals outlined in the design plan (if there is one).
  • My code follows the style guidelines of this project
  • I have performed a self-review of my code
  • I have commented my code, particularly in hard-to-understand areas
  • I have made corresponding changes to the documentation
  • I have updated any version info, if necessary.
  • My changes generate no new warnings
  • I have added tests that prove my fix is effective or that my feature works
  • New and existing unit tests pass locally with my changes

Task: TECHART-329

- Implement vectorized interpolation for colors, both horizontally and vertically.
- Include robust error handling to manage edge cases and invalid inputs in interpolation functions.
- Develop comprehensive unit tests to validate the rasterization and interpolation functionality.
- Ensure tests cover a variety of scenarios, including edge cases and expected failures.
Copy link
Collaborator

@Olaf-Wolf3D Olaf-Wolf3D left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks like the right direction, I like how the interpolation in set up into several functions. Only a few bits and pieces requested for change.

tests/readyplayerme/meshops/unit/conftest.py Outdated Show resolved Hide resolved
tests/readyplayerme/meshops/unit/test_rasterizer.py Outdated Show resolved Hide resolved
src/readyplayerme/meshops/draw/rasterize.py Show resolved Hide resolved
src/readyplayerme/meshops/draw/rasterize.py Outdated Show resolved Hide resolved
src/readyplayerme/meshops/draw/rasterize.py Outdated Show resolved Hide resolved
src/readyplayerme/meshops/draw/rasterize.py Outdated Show resolved Hide resolved
src/readyplayerme/meshops/draw/rasterize.py Outdated Show resolved Hide resolved
tests/readyplayerme/meshops/unit/test_rasterizer.py Outdated Show resolved Hide resolved
tests/readyplayerme/meshops/unit/test_rasterizer.py Outdated Show resolved Hide resolved
tests/readyplayerme/meshops/unit/test_rasterizer.py Outdated Show resolved Hide resolved
- Fixed naming output for profiler to not have invalid characters.
- Addressed feedback for docstrings and some lines.
@TechyDaniel TechyDaniel self-assigned this Dec 1, 2023
@TechyDaniel TechyDaniel marked this pull request as ready for review December 1, 2023 11:54
tests/readyplayerme/meshops/unit/conftest.py Outdated Show resolved Hide resolved
src/readyplayerme/meshops/draw/rasterize.py Outdated Show resolved Hide resolved
src/readyplayerme/meshops/draw/rasterize.py Outdated Show resolved Hide resolved
src/readyplayerme/meshops/draw/rasterize.py Outdated Show resolved Hide resolved
src/readyplayerme/meshops/draw/rasterize.py Outdated Show resolved Hide resolved
src/readyplayerme/meshops/draw/rasterize.py Outdated Show resolved Hide resolved
tests/readyplayerme/meshops/unit/test_rasterizer.py Outdated Show resolved Hide resolved
@TechyDaniel TechyDaniel marked this pull request as draft December 2, 2023 08:19
@TechyDaniel TechyDaniel marked this pull request as ready for review December 2, 2023 08:19
Olaf Haag added 4 commits December 4, 2023 10:04
return new array each time to avoid side effects on fixtures
avoid implementation detail in variable name.
rename cleanup func to use imperative mood.
to avoid side-effects, inplace is False by default.
@Olaf-Wolf3D Olaf-Wolf3D marked this pull request as draft December 4, 2023 10:08
@Olaf-Wolf3D Olaf-Wolf3D marked this pull request as ready for review December 4, 2023 10:08
@Olaf-Wolf3D Olaf-Wolf3D merged commit 98ee8b0 into main Dec 4, 2023
1 check passed
@Olaf-Wolf3D Olaf-Wolf3D deleted the feat/Rasaterize-triangles branch December 4, 2023 10:12
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants