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 blend_uv_seams #12

Merged
merged 16 commits into from
Jan 5, 2024
Merged

!feat: add blend_uv_seams #12

merged 16 commits into from
Jan 5, 2024

Conversation

Olaf-Wolf3D
Copy link
Collaborator

Description

Split color mode funcs to prevent circular imports. Load all functions in draw into its namespace for brevity.

Type of change

Please delete options that are not relevant.

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • 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.

  • Test A
  • Test B

Test Configuration:

  • Did you use the test environment provided by the project (e.g. a hatch action)?

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-334

Olaf Haag and others added 2 commits December 14, 2023 22:57
Split color mode funcs to prevent circular imports. Load all functions in draw into its namespace for brevity.

---------

Co-authored-by: Daniel-Ionut Rancea <[email protected]>
@TechyDaniel TechyDaniel self-assigned this Dec 15, 2023
@TechyDaniel TechyDaniel marked this pull request as ready for review December 15, 2023 14:38
@TechyDaniel TechyDaniel self-requested a review as a code owner December 15, 2023 14:38
move color funcs from mesh to colors. move rasterize funcs into image.
TechyDaniel
TechyDaniel previously approved these changes Dec 15, 2023
Copy link
Contributor

@TechyDaniel TechyDaniel left a comment

Choose a reason for hiding this comment

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

tested :
overall performance :

0.664 main  mytester.py:517
├─ 0.406 blend_uv_seams  draw\image.py:253
│  ├─ 0.340 rasterize  draw\image.py:195
│  │  ├─ 0.209 draw_lines  draw\image.py:158
│  │  │  ├─ 0.112 __getattr__  lazy_loader\__init__.py:72
│  │  │  │     [4 frames hidden]  lazy_loader, importlib, <built-in>
│  │  │  ├─ 0.041 interpolate_values  draw\color.py:89
│  │  │  │  └─ 0.038 [self]  draw\color.py
│  │  │  ├─ 0.034 [self]  draw\image.py
│  │  │  └─ 0.018 line  skimage\draw\draw.py:353
│  │  ├─ 0.087 lerp_nans_horizontally  draw\image.py:126
│  │  │  └─ 0.087 apply_along_axis  numpy\lib\shape_base.py:267
│  │  │        [2 frames hidden]  numpy
│  │  │           0.076 interpolate_segment  draw\image.py:94
│  │  │           ├─ 0.029 [self]  draw\image.py
│  │  │           ├─ 0.026 interp  numpy\lib\function_base.py:1461
│  │  │           │     [2 frames hidden]  numpy, <built-in>
│  │  │           └─ 0.012 any  numpy\core\fromnumeric.py:2322
│  │  │                 [2 frames hidden]  numpy
│  │  └─ 0.043 clip_image  draw\image.py:36
│  │     ├─ 0.021 [self]  draw\image.py
│  │     ├─ 0.015 nan_to_num  numpy\lib\type_check.py:403
│  │     └─ 0.008 clip  numpy\core\fromnumeric.py:2100
│  │           [3 frames hidden]  numpy
│  ├─ 0.030 blend_images  draw\image.py:64
│  ├─ 0.017 gaussian_filter  scipy\ndimage\_filters.py:280
│  │     [4 frames hidden]  scipy, <built-in>
│  └─ 0.009 [self]  draw\image.py
├─ 0.197 Image.save  PIL\Image.py:2328
│     [8 frames hidden]  PIL, <built-in>
│        0.185 ImagingEncoder.encode  <built-in>
└─ 0.058 read_mesh  mesh.py:28
   └─ 0.058 read_gltf  mesh.py:46
      ├─ 0.050 load  trimesh\exchange\load.py:71
      │     [11 frames hidden]  trimesh, PIL, <built-in>
      └─ 0.008 from_trimesh_material  material.py:31

👍

@Olaf-Wolf3D Olaf-Wolf3D marked this pull request as draft December 18, 2023 12:17
@Olaf-Wolf3D Olaf-Wolf3D marked this pull request as ready for review December 18, 2023 12:17
Olaf Haag added 4 commits January 3, 2024 18:20
UVs are not loaded if there's no material
Mesh was just a protocol before.
UVs are all (0.5, 0.5). Limitation of trimesh.
Olaf Haag added 2 commits January 4, 2024 02:47
material was added to simple gltf previously, breaking this test.
add necessary functions and tests in mesh and image to create UV masks.
@Olaf-Wolf3D Olaf-Wolf3D marked this pull request as draft January 4, 2024 01:54
@Olaf-Wolf3D Olaf-Wolf3D self-assigned this Jan 4, 2024
@Olaf-Wolf3D Olaf-Wolf3D marked this pull request as ready for review January 5, 2024 02:32
tests pass locally on Windows and WSL Ubuntu, but fail on github action.
@Olaf-Wolf3D Olaf-Wolf3D marked this pull request as draft January 5, 2024 14:24
@Olaf-Wolf3D Olaf-Wolf3D marked this pull request as ready for review January 5, 2024 14:24
@Olaf-Wolf3D
Copy link
Collaborator Author

The integration test and unit tests for RGB and RGBA images pass locally on Windows and WSL Ubuntu, but fail on the github action. Skipping those tests for now.

@Olaf-Wolf3D Olaf-Wolf3D merged commit 14d26c3 into main Jan 5, 2024
1 check passed
@Olaf-Wolf3D Olaf-Wolf3D deleted the feature/blend-seams branch January 5, 2024 14:36
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