{"id":13444131,"url":"https://github.com/weiaicunzai/blender_shapenet_render","last_synced_at":"2025-10-26T08:36:59.280Z","repository":{"id":111638775,"uuid":"89446581","full_name":"weiaicunzai/blender_shapenet_render","owner":"weiaicunzai","description":"Blender render script for ShapeNet models","archived":false,"fork":false,"pushed_at":"2018-10-16T08:20:33.000Z","size":36579,"stargazers_count":75,"open_issues_count":4,"forks_count":28,"subscribers_count":8,"default_branch":"master","last_synced_at":"2025-03-26T03:51:18.232Z","etag":null,"topics":["blender-scripts","python"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/weiaicunzai.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null}},"created_at":"2017-04-26T06:34:34.000Z","updated_at":"2025-03-20T03:13:43.000Z","dependencies_parsed_at":"2023-05-24T23:00:08.318Z","dependency_job_id":null,"html_url":"https://github.com/weiaicunzai/blender_shapenet_render","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/weiaicunzai%2Fblender_shapenet_render","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/weiaicunzai%2Fblender_shapenet_render/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/weiaicunzai%2Fblender_shapenet_render/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/weiaicunzai%2Fblender_shapenet_render/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/weiaicunzai","download_url":"https://codeload.github.com/weiaicunzai/blender_shapenet_render/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248543752,"owners_count":21121837,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["blender-scripts","python"],"created_at":"2024-07-31T03:02:19.855Z","updated_at":"2025-10-26T08:36:54.244Z","avatar_url":"https://github.com/weiaicunzai.png","language":"Python","funding_links":[],"categories":["Python"],"sub_categories":[],"readme":"# Blender script for rendering ShapeNet models\n\nThis repo contains the implementation of Blender Python script for rendering \nShapeNet obj files\n\n## example:\n\n### rendered rgb images with random background images\n\n\u003cimg src=\"samples/blender-000001.color.png\" height=\"300\"\u003e\u003c/a\u003e\n\n\n### rendered depth images:\n\n\u003cimg src=\"samples/blender-000001.depth.png\" height=\"300\"\u003e\u003c/a\u003e\n\n### pose:\n\n```text\n4.374694554125504453e-01 -4.180723275263726890e-01 7.961381881998743637e-01 1.691706400439716873e+00\n8.974623655743290129e-01 1.474515273040246655e-01 -4.157154855070874788e-01 -8.246252502494784142e-01\n5.640734111112344351e-02 8.963668844113694689e-01 4.397097116636921044e-01 9.232025044714089468e-01\n0.000000000000000000e+00 0.000000000000000000e+00 0.000000000000000000e+00 1.000000000000000000e+00\n```\nthis matrix contains rotation matrix and translation vector, transforms coordinates from \nobject coordinates to camera coordinates(actually is original camera pose to rotated camera \npose since Blender computes everything in world coordinates system). I've verified the rotation \nmatrix using CPP [Eigen](http://eigen.tuxfamily.org/index.php?title=Main_Page) library, Python\n[Tansforms3d](https://pypi.org/project/transforms3d/) library, CPP [Opencv](https://opencv.org/) \nlibrary, but if im wrong, plz let me know.  \n\n## useage for Python code\n\n### 0. requirement\n\nPython 3.5\n\nBlender 2.79\n\nShapeNet Dataset(if not, you need to modify the code yourself)\n\nbackground images(recommend PASCAL VOC)\n\n### 1. configuration file\n\n**you need to change the settings.py file before you run the python file!!!**\n\nall the configurations needed are in '''settings.py''', you need to set your own:  \n- ShapeNet dataset path: ```g_shapenet_path```\n- Blender executable path: ```g_blender_excutable_path```\n\n\nand other configurations you might want to change:\n- background image folder path: ```g_background_image_path```\n- synthetic rgb image folder path: ```g_syn_rgb_folder```\n- synthetic depth image folder path: ```g_syn_depth_folder```\n- pose folder: ```g_syn_pose_foloder```\n\nfor more configuration informations, plz refer to [Blender API Document](https://docs.blender.org/api/2.79/)\n### 2. viewpoint file\n\nAll txt files in the folder view_points are viewpoints file, you can generate new viewpoints file using [render for cnn](https://github.com/ShapeNet/RenderForCNN)\n- you can change the the camera clip distance by modifying varibale ```distance_min``` and ```distance_max``` in ```RenderForCNN/blob/master/render_pipeline/kde/sample_viewpoints.m```, \n\n- and view point number generated per categlory by modifying ```num_samples``` in ```RenderForCNN/blob/master/render_pipeline/kde/run_sampling.m```\n\n### 3. start rendering\n\n```text\npython run_render.py\n```\n\nthis command will render the rgb, depth image and generate pose file.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fweiaicunzai%2Fblender_shapenet_render","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fweiaicunzai%2Fblender_shapenet_render","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fweiaicunzai%2Fblender_shapenet_render/lists"}