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(MeshObjectUtility): convert quads to triangles #1127

Merged

Conversation

MartinSmeyer
Copy link
Member

@MartinSmeyer MartinSmeyer commented Jul 8, 2024

@cla-bot cla-bot bot added the cla-signed label Jul 8, 2024
@cornerfarmer
Copy link
Member

cornerfarmer commented Jul 8, 2024

BlenderProcHelper result for run 585:

Done with: [amass_human_poses_python 41s, auto_shading_python 9s, basic_python 12s, blenderkit_python 18s, bop_object_on_surface_sampling_python 180s, bop_object_physics_positioning_python 208s, bop_object_pose_sampling_python 75s, bop_scene_replication_python 141s, camera_depth_of_field_python 18s, camera_object_pose_python 22s, camera_random_trajectories_python 41s, camera_sampling_python 19s, coco_annotations_python 13s, diffuse_color_image_python 19s, dust_python 32s, entity_displacement_modifier_python 14s, entity_manipulation_python 10s, front_3d_object_sampling_python 85s, front_3d_python 103s, front_3d_with_improved_mat_python 108s, git_log 1s, haven_python 26s, ikea_python 18s, kinect_azure_noise_python 13s, lens_distortion_python 15s, lens_distortion_python 11s, light_sampling_python 11s, material_manipulation_python 10s, material_randomizer_python 12s, matterport3d_python 74s, motion_blur_rolling_shutter_python 34s, motion_blur_rolling_shutter_python 22s, multi_render_python 244s, nocs_python 17s, object_pose_sampling_python 10s, on_surface_object_sampling_python 10s, optical_flow_python 24s, physics_convex_decomposition_python 140s, physics_positioning_python 23s, pix3d_python 16s, point_clouds_python 26s, random_backgrounds_python 16s, random_room_constructor_python 119s, replica_python 336s, scenenet_python 51s, scenenet_with_cctextures_python 66s, semantic_segmentation_python 12s, shapenet_python 18s, shapenet_with_scenenet_python 50s, shapenet_with_suncg_python 70s, spotlight_python 20s, stereo_matching_python 43s, stereo_matching_with_projector_python 137s, suncg_basic_python 38s, suncg_with_cam_sampling_python 56s, suncg_with_improved_mat_python 69s, suncg_with_object_replacer_python 56s, tests_python 103s, urdf_loading_and_manipulation_python 47s]
Done with 59 of 59 tests.
There were errors:
Unit tests output:

${INTERNAL_NODES_DISC_SPACE}/Dominik_Winkelbauer/blender/blender-3.5.1-linux-x64/3.5/python/lib/python3.10/site-packages/numpy/core/getlimits.py:500: UserWarning: The value of the smallest subnormal for <class 'numpy.float64'> type is zero.
  setattr(self, word, getattr(machar, word).flat[0])
${INTERNAL_NODES_DISC_SPACE}/Dominik_Winkelbauer/blender/blender-3.5.1-linux-x64/3.5/python/lib/python3.10/site-packages/numpy/core/getlimits.py:89: UserWarning: The value of the smallest subnormal for <class 'numpy.float64'> type is zero.
  return self._float_to_str(self.smallest_subnormal)
${INTERNAL_NODES_DISC_SPACE}/Dominik_Winkelbauer/blender/blender-3.5.1-linux-x64/3.5/python/lib/python3.10/site-packages/numpy/core/getlimits.py:500: UserWarning: The value of the smallest subnormal for <class 'numpy.float32'> type is zero.
  setattr(self, word, getattr(machar, word).flat[0])
${INTERNAL_NODES_DISC_SPACE}/Dominik_Winkelbauer/blender/blender-3.5.1-linux-x64/3.5/python/lib/python3.10/site-packages/numpy/core/getlimits.py:89: UserWarning: The value of the smallest subnormal for <class 'numpy.float32'> type is zero.
  return self._float_to_str(self.smallest_subnormal)
................
----------------------------------------------------------------------
Ran 16 tests in 97.826s

OK

urdf_loading_and_manipulation (main_python)

The output of urdf_loading_and_manipulation:main_python:000000_scene_gt_info_json has changed:

Expand
+ root['9'][2]['bbox_visib'][3]: 12
- root['9'][2]['bbox_visib'][3]: 14

stereo_matching (main_python)

The output of stereo_matching:main_python:disparity has changed: Diff: 0.0296, Pixel diff: 0.0046



Compare image Newly generated image

The output of stereo_matching:main_python:disparity has changed: Diff: 0.0253, Pixel diff: 0.0102



Compare image Newly generated image

The output of stereo_matching:main_python:stereo-depth has changed: Diff: 0.0020, Pixel diff: 0.0102



Compare image Newly generated image

Example: 'camera_random_trajectories' with Config: 'main_python' failed with:

Expand
Traceback (most recent call last):
  File "${INTERNAL_HOME_FOLDER}/Dominik_Winkelbauer/blender_proc_helper_runs_external/DLR-RM/BlenderProc/1127/temp_config_camera_random_trajectories_++++_main_python.py", line 60, in <module>
    bproc.writer.write_gif_animation(args.output_dir, data, frame_duration_in_ms=80)
  File "${INTERNAL_NODES_DISC_SPACE}/Dominik_Winkelbauer/temp_blender_proc_copy_271639/BlenderProc/blenderproc/python/writer/GifWriterUtility.py", line 50, in write_gif_animation
    to_animate = _GifWriterUtility.cache_png(keys_to_use, output_data_dict)
  File "${INTERNAL_NODES_DISC_SPACE}/Dominik_Winkelbauer/temp_blender_proc_copy_271639/BlenderProc/blenderproc/python/writer/GifWriterUtility.py", line 118, in cache_png
    vis_data(key=key,
  File "${INTERNAL_NODES_DISC_SPACE}/Dominik_Winkelbauer/temp_blender_proc_copy_271639/BlenderProc/blenderproc/scripts/visHdf5Files.py", line 78, in vis_data
    plt.figure()
  File "${INTERNAL_NODES_DISC_SPACE}/Dominik_Winkelbauer/blender/blender-3.5.1-linux-x64/custom-python-packages/lib/python3.10/site-packages/matplotlib/pyplot.py", line 1022, in figure
    manager = new_figure_manager(
  File "${INTERNAL_NODES_DISC_SPACE}/Dominik_Winkelbauer/blender/blender-3.5.1-linux-x64/custom-python-packages/lib/python3.10/site-packages/matplotlib/pyplot.py", line 544, in new_figure_manager
    _warn_if_gui_out_of_main_thread()
  File "${INTERNAL_NODES_DISC_SPACE}/Dominik_Winkelbauer/blender/blender-3.5.1-linux-x64/custom-python-packages/lib/python3.10/site-packages/matplotlib/pyplot.py", line 521, in _warn_if_gui_out_of_main_thread
    canvas_class = cast(type[FigureCanvasBase], _get_backend_mod().FigureCanvas)
  File "${INTERNAL_NODES_DISC_SPACE}/Dominik_Winkelbauer/blender/blender-3.5.1-linux-x64/custom-python-packages/lib/python3.10/site-packages/matplotlib/pyplot.py", line 353, in _get_backend_mod
    switch_backend(rcParams._get("backend"))
  File "${INTERNAL_NODES_DISC_SPACE}/Dominik_Winkelbauer/blender/blender-3.5.1-linux-x64/custom-python-packages/lib/python3.10/site-packages/matplotlib/pyplot.py", line 410, in switch_backend
    module = backend_registry.load_backend_module(newbackend)
  File "${INTERNAL_NODES_DISC_SPACE}/Dominik_Winkelbauer/blender/blender-3.5.1-linux-x64/custom-python-packages/lib/python3.10/site-packages/matplotlib/backends/registry.py", line 316, in load_backend_module
    return importlib.import_module(module_name)
  File "${INTERNAL_NODES_DISC_SPACE}/Dominik_Winkelbauer/blender/blender-3.5.1-linux-x64/3.5/python/lib/python3.10/importlib/__init__.py", line 126, in import_module
    return _bootstrap._gcd_import(name[level:], package, level)
  File "<frozen importlib._bootstrap>", line 1050, in _gcd_import
  File "<frozen importlib._bootstrap>", line 1027, in _find_and_load
  File "<frozen importlib._bootstrap>", line 1006, in _find_and_load_unlocked
  File "<frozen importlib._bootstrap>", line 688, in _load_unlocked
  File "<frozen importlib._bootstrap_external>", line 883, in exec_module
  File "<frozen importlib._bootstrap>", line 241, in _call_with_frames_removed
  File "${INTERNAL_NODES_DISC_SPACE}/Dominik_Winkelbauer/blender/blender-3.5.1-linux-x64/custom-python-packages/lib/python3.10/site-packages/matplotlib/backends/backend_tkagg.py", line 1, in <module>
    from . import _backend_tk
  File "${INTERNAL_NODES_DISC_SPACE}/Dominik_Winkelbauer/blender/blender-3.5.1-linux-x64/custom-python-packages/lib/python3.10/site-packages/matplotlib/backends/_backend_tk.py", line 9, in <module>
    import tkinter as tk
ModuleNotFoundError: No module named 'tkinter'
Finished rendering after 34.345 seconds
Merging data for frame 0 into /tmp/delete_me_blender_proc_res_1127/advanced/camera_random_trajectories/main_py/0.hdf5
Merging data for frame 1 into /tmp/delete_me_blender_proc_res_1127/advanced/camera_random_trajectories/main_py/1.hdf5
Merging data for frame 2 into /tmp/delete_me_blender_proc_res_1127/advanced/camera_random_trajectories/main_py/2.hdf5
Merging data for frame 3 into /tmp/delete_me_blender_proc_res_1127/advanced/camera_random_trajectories/main_py/3.hdf5
Merging data for frame 4 into /tmp/delete_me_blender_proc_res_1127/advanced/camera_random_trajectories/main_py/4.hdf5
Merging data for frame 5 into /tmp/delete_me_blender_proc_res_1127/advanced/camera_random_trajectories/main_py/5.hdf5
Merging data for frame 6 into /tmp/delete_me_blender_proc_res_1127/advanced/camera_random_trajectories/main_py/6.hdf5
Merging data for frame 7 into /tmp/delete_me_blender_proc_res_1127/advanced/camera_random_trajectories/main_py/7.hdf5
Merging data for frame 8 into /tmp/delete_me_blender_proc_res_1127/advanced/camera_random_trajectories/main_py/8.hdf5
Merging data for frame 9 into /tmp/delete_me_blender_proc_res_1127/advanced/camera_random_trajectories/main_py/9.hdf5
Merging data for frame 10 into /tmp/delete_me_blender_proc_res_1127/advanced/camera_random_trajectories/main_py/10.hdf5
Merging data for frame 11 into /tmp/delete_me_blender_proc_res_1127/advanced/camera_random_trajectories/main_py/11.hdf5
Merging data for frame 12 into /tmp/delete_me_blender_proc_res_1127/advanced/camera_random_trajectories/main_py/12.hdf5
Merging data for frame 13 into /tmp/delete_me_blender_proc_res_1127/advanced/camera_random_trajectories/main_py/13.hdf5
Merging data for frame 14 into /tmp/delete_me_blender_proc_res_1127/advanced/camera_random_trajectories/main_py/14.hdf5
Merging data for frame 15 into /tmp/delete_me_blender_proc_res_1127/advanced/camera_random_trajectories/main_py/15.hdf5
Merging data for frame 16 into /tmp/delete_me_blender_proc_res_1127/advanced/camera_random_trajectories/main_py/16.hdf5
Merging data for frame 17 into /tmp/delete_me_blender_proc_res_1127/advanced/camera_random_trajectories/main_py/17.hdf5
Merging data for frame 18 into /tmp/delete_me_blender_proc_res_1127/advanced/camera_random_trajectories/main_py/18.hdf5
Merging data for frame 19 into /tmp/delete_me_blender_proc_res_1127/advanced/camera_random_trajectories/main_py/19.hdf5
Merging data for frame 20 into /tmp/delete_me_blender_proc_res_1127/advanced/camera_random_trajectories/main_py/20.hdf5
Merging data for frame 21 into /tmp/delete_me_blender_proc_res_1127/advanced/camera_random_trajectories/main_py/21.hdf5
Merging data for frame 22 into /tmp/delete_me_blender_proc_res_1127/advanced/camera_random_trajectories/main_py/22.hdf5
Merging data for frame 23 into /tmp/delete_me_blender_proc_res_1127/advanced/camera_random_trajectories/main_py/23.hdf5
Merging data for frame 24 into /tmp/delete_me_blender_proc_res_1127/advanced/camera_random_trajectories/main_py/24.hdf5

 Generate output folder: /tmp/delete_me_blender_proc_res_1127/advanced/camera_random_trajectories/main_py/gif_animations
Using blender in ${INTERNAL_NODES_DISC_SPACE}/Dominik_Winkelbauer/blender/blender-3.5.1-linux-x64
Using temporary directory: /dev/shm/blender_proc_9bff511a17544ea393a16d5329b18ab6
Cleaning temporary directory

Pylint output

Expand

Messages

Module blenderproc (blenderproc/__init__.py)

Line Col. Type Symbol ID Obj Message
12 44 convention trailing-whitespace C0303
Trailing whitespace

Module blenderproc.python.camera.CameraProjection (blenderproc/python/camera/CameraProjection.py)

Line Col. Type Symbol ID Obj Message
4 0 warning unused-import W0611
Unused create_primitive imported from blenderproc.python.types.MeshObjectUtility
10 0 convention ungrouped-imports C0412
Imports from package blenderproc are not grouped
29 31 convention trailing-whitespace C0303
Trailing whitespace
35 0 convention trailing-whitespace C0303
Trailing whitespace
41 0 convention line-too-long C0301
Line too long (147/120)
85 8 refactor no-else-return R1705 depth_at_points_via_raytracing
Unnecessary "else" after "return", remove the "else" and de-indent the code inside it
89 0 convention trailing-whitespace C0303
Trailing whitespace
90 0 convention line-too-long C0301
Line too long (134/120)
141 0 convention trailing-whitespace C0303
Trailing whitespace
159 7 convention trailing-whitespace C0303
Trailing whitespace
161 33 convention trailing-whitespace C0303
Trailing whitespace
165 0 convention line-too-long C0301
Line too long (132/120)
167 0 convention trailing-newlines C0305
Trailing newlines

Module blenderproc.python.loader.CCMaterialLoader (blenderproc/python/loader/CCMaterialLoader.py)

Line Col. Type Symbol ID Obj Message
73 0 convention line-too-long C0301
Line too long (152/120)

Module blenderproc.python.postprocessing.PostProcessingUtility (blenderproc/python/postprocessing/PostProcessingUtility.py)

Line Col. Type Symbol ID Obj Message
15 0 convention line-too-long C0301
Line too long (137/120)

Module blenderproc.python.types.EntityUtility (blenderproc/python/types/EntityUtility.py)

Line Col. Type Symbol ID Obj Message
168 11 convention unidiomatic-typecheck C0123 Entity.duplicate
Use isinstance() rather than type() for a typecheck.

Module blenderproc.python.types.LightUtility (blenderproc/python/types/LightUtility.py)

Line Col. Type Symbol ID Obj Message
125 12 refactor consider-using-augmented-assign R6104 Light.setup_as_projector
Use '/=' to do an augmented assign directly
216 0 convention trailing-whitespace C0303
Trailing whitespace

Module blenderproc.python.types.MeshObjectUtility (blenderproc/python/types/MeshObjectUtility.py)

Line Col. Type Symbol ID Obj Message
510 0 warning bad-indentation W0311
Bad indentation. Found 9 spaces, expected 8
514 0 convention trailing-whitespace C0303
Trailing whitespace
516 0 warning bad-indentation W0311
Bad indentation. Found 9 spaces, expected 8
517 0 convention trailing-whitespace C0303
Trailing whitespace
519 0 warning bad-indentation W0311
Bad indentation. Found 9 spaces, expected 8
521 0 warning bad-indentation W0311
Bad indentation. Found 13 spaces, expected 12
522 0 warning bad-indentation W0311
Bad indentation. Found 13 spaces, expected 12
523 0 warning bad-indentation W0311
Bad indentation. Found 13 spaces, expected 12
524 90 convention trailing-whitespace C0303
Trailing whitespace
524 0 warning bad-indentation W0311
Bad indentation. Found 13 spaces, expected 12
525 0 warning bad-indentation W0311
Bad indentation. Found 13 spaces, expected 12
526 0 warning bad-indentation W0311
Bad indentation. Found 13 spaces, expected 12
527 0 convention trailing-whitespace C0303
Trailing whitespace
528 23 convention trailing-whitespace C0303
Trailing whitespace
529 0 warning bad-indentation W0311
Bad indentation. Found 9 spaces, expected 8
531 0 warning bad-indentation W0311
Bad indentation. Found 9 spaces, expected 8
532 20 convention trailing-whitespace C0303
Trailing whitespace
533 0 warning bad-indentation W0311
Bad indentation. Found 9 spaces, expected 8
534 0 convention trailing-whitespace C0303
Trailing whitespace
535 0 warning bad-indentation W0311
Bad indentation. Found 9 spaces, expected 8
561 0 convention line-too-long C0301
Line too long (130/120)
572 7 convention trailing-whitespace C0303
Trailing whitespace
580 8 warning unused-variable W0612 create_from_point_cloud
Unused variable 'p'
608 0 convention trailing-whitespace C0303
Trailing whitespace
683 28 convention trailing-whitespace C0303
Trailing whitespace

Module blenderproc.python.utility.InstallUtility (blenderproc/python/utility/InstallUtility.py)

Line Col. Type Symbol ID Obj Message
129 0 convention trailing-whitespace C0303
Trailing whitespace

Module blenderproc.python.writer.BopWriterUtility (blenderproc/python/writer/BopWriterUtility.py)

Line Col. Type Symbol ID Obj Message
9 0 convention wrong-import-order C0411
standard import "from typing import List, Optional, Dict, Tuple" should be placed before "import trimesh"
10 0 convention wrong-import-order C0411
standard import "import warnings" should be placed before "import trimesh"
11 0 convention wrong-import-order C0411
standard import "import datetime" should be placed before "import trimesh"
18 0 convention wrong-import-order C0411
standard import "import sys" should be placed before "import trimesh"
62 0 convention line-too-long C0301
Line too long (131/120)
79 8 warning redefined-outer-name W0621 write_bop
Redefining name 'dataset_objects' from outer scope (line 536)
172 44 warning protected-access W0212 write_bop
Access to a protected member _pyrender_init of a client class
172 15 refactor consider-using-with R1732 write_bop
Consider using 'with' for resource-allocating operations
176 0 convention trailing-whitespace C0303
Trailing whitespace
182 0 convention trailing-whitespace C0303
Trailing whitespace
305 21 warning redefined-outer-name W0621 _BopWriterUtility.get_frame_gt
Redefining name 'dataset_objects' from outer scope (line 536)
392 38 warning redefined-outer-name W0621 _BopWriterUtility.write_frames
Redefining name 'dataset_objects' from outer scope (line 536)
518 0 convention trailing-whitespace C0303
Trailing whitespace
530 78 convention trailing-whitespace C0303
Trailing whitespace
534 8 warning global-variable-undefined W0601 _BopWriterUtility._pyrender_init
Global variable 'renderer' undefined at the module level
534 8 warning global-variable-undefined W0601 _BopWriterUtility._pyrender_init
Global variable 'renderer_large' undefined at the module level
534 8 warning global-variable-undefined W0601 _BopWriterUtility._pyrender_init
Global variable 'dataset_objects' undefined at the module level
552 0 convention line-too-long C0301
Line too long (173/120)
567 78 convention trailing-whitespace C0303
Trailing whitespace
573 8 warning global-variable-not-assigned W0602 _BopWriterUtility._calc_gt_masks_iteration
Using global for 'renderer' but no assignment is done
573 8 warning global-variable-not-assigned W0602 _BopWriterUtility._calc_gt_masks_iteration
Using global for 'dataset_objects' but no assignment is done
580 0 convention trailing-whitespace C0303
Trailing whitespace
670 0 convention line-too-long C0301
Line too long (160/120)
671 0 convention trailing-whitespace C0303
Trailing whitespace
672 0 convention trailing-whitespace C0303
Trailing whitespace
675 0 convention line-too-long C0301
Line too long (196/120)
688 11 convention trailing-whitespace C0303
Trailing whitespace
690 78 convention trailing-whitespace C0303
Trailing whitespace
696 8 warning global-variable-not-assigned W0602 _BopWriterUtility._calc_gt_info_iteration
Using global for 'renderer_large' but no assignment is done
696 8 warning global-variable-not-assigned W0602 _BopWriterUtility._calc_gt_info_iteration
Using global for 'dataset_objects' but no assignment is done
696 8 warning global-variable-not-assigned W0602 _BopWriterUtility._calc_gt_info_iteration
Using global for 'renderer' but no assignment is done
700 11 warning protected-access W0212 _BopWriterUtility._calc_gt_info_iteration
Access to a protected member _renderer of a client class
701 12 warning protected-access W0212 _BopWriterUtility._calc_gt_info_iteration
Access to a protected member _renderer of a client class
702 12 warning protected-access W0212 _BopWriterUtility._calc_gt_info_iteration
Access to a protected member _renderer of a client class
709 0 convention trailing-whitespace C0303
Trailing whitespace
837 0 convention line-too-long C0301
Line too long (202/120)
838 0 convention trailing-whitespace C0303
Trailing whitespace
846 44 warning redefined-outer-name W0621 _BopWriterUtility.calc_gt_coco
Redefining name 'dataset_objects' from outer scope (line 536)

Module blenderproc.scripts.quickstart (blenderproc/scripts/quickstart.py)

Line Col. Type Symbol ID Obj Message
1 0 convention missing-module-docstring C0114
Missing module docstring
11 -1 warning pointless-string-statement W0105
String statement has no effect
13 0 convention wrong-import-position C0413
Import "import numpy as np" should be placed at the top of the module

Metrics

Count per types

Name Count
convention 51
refactor 3
warning 32

Count per messages

Name Count
trailing-whitespace 31
line-too-long 11
trailing-newlines 1
no-else-return 1
ungrouped-imports 1
unused-import 1
unidiomatic-typecheck 1
consider-using-augmented-assign 1
bad-indentation 13
unused-variable 1
redefined-outer-name 4
protected-access 4
consider-using-with 1
global-variable-undefined 3
global-variable-not-assigned 5
wrong-import-order 4
missing-module-docstring 1
pointless-string-statement 1
wrong-import-position 1

Count per modules

Name Count
blenderproc 1
blenderproc.python.camera.CameraProjection 13
blenderproc.python.loader.CCMaterialLoader 1
blenderproc.python.postprocessing.PostProcessingUtility 1
blenderproc.python.types.EntityUtility 1
blenderproc.python.types.LightUtility 2
blenderproc.python.types.MeshObjectUtility 25
blenderproc.python.utility.InstallUtility 1
blenderproc.python.writer.BopWriterUtility 38
blenderproc.scripts.quickstart 3

Count per path

Name Count
blenderproc/__init__.py 1
blenderproc/python/camera/CameraProjection.py 13
blenderproc/python/loader/CCMaterialLoader.py 1
blenderproc/python/postprocessing/PostProcessingUtility.py 1
blenderproc/python/types/EntityUtility.py 1
blenderproc/python/types/LightUtility.py 2
blenderproc/python/types/MeshObjectUtility.py 25
blenderproc/python/utility/InstallUtility.py 1
blenderproc/python/writer/BopWriterUtility.py 38
blenderproc/scripts/quickstart.py 3
***The tests are done.*** Check the log:

Last update: 07/08/2024, 18:50:08

Copy link
Member

@cornerfarmer cornerfarmer left a comment

Choose a reason for hiding this comment

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

Thanks Martin!

@cornerfarmer cornerfarmer merged commit 610aa3f into main Jul 8, 2024
3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants