{"id":20325117,"url":"https://github.com/mphe/wireframe-generator","last_synced_at":"2025-09-01T03:32:55.285Z","repository":{"id":174195298,"uuid":"651906981","full_name":"mphe/wireframe-generator","owner":"mphe","description":"A simple tool to generate (clean) wireframe textures from an 3D .obj model.","archived":false,"fork":false,"pushed_at":"2023-06-10T13:19:36.000Z","size":48,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-03-04T10:29:42.817Z","etag":null,"topics":["3d","generator","obj","texture","wireframe"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/mphe.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2023-06-10T13:07:40.000Z","updated_at":"2024-08-29T21:53:35.000Z","dependencies_parsed_at":null,"dependency_job_id":"e6b1a55a-eb36-4206-aae8-d7bca60f3739","html_url":"https://github.com/mphe/wireframe-generator","commit_stats":null,"previous_names":["mphe/wireframe-generator"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/mphe/wireframe-generator","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mphe%2Fwireframe-generator","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mphe%2Fwireframe-generator/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mphe%2Fwireframe-generator/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mphe%2Fwireframe-generator/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/mphe","download_url":"https://codeload.github.com/mphe/wireframe-generator/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mphe%2Fwireframe-generator/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":273069522,"owners_count":25040060,"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","status":"online","status_checked_at":"2025-09-01T02:00:09.058Z","response_time":120,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"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":["3d","generator","obj","texture","wireframe"],"created_at":"2024-11-14T19:38:46.435Z","updated_at":"2025-09-01T03:32:55.256Z","avatar_url":"https://github.com/mphe.png","language":"Python","readme":"# Wireframe Generator\n\nThis is a simple tool that takes an `.obj` model and generates a corresponding (clean) wireframe texture.\nUnless specified otherwise, the generated wireframe will contain no support edges, i.e. additional edges that\ntechnically don't contribute to the shape of the geometry and only exist due to triangulation,\navoiding N-Gons, or to prevent impossible geometry.\n\nThe following table shows some example screenshots.\n\n|            | Model                  | Wireframe                            | Clean wireframe                        |\n|------------|------------------------|--------------------------------------|----------------------------------------|\n| Model view | ![](example/model.png) | ![](example/model_wireframe_all.png) | ![](example/model_wireframe_clean.png) |\n| UV view    | ![](example/uv.png)    | ![](example/wireframe.png)           | ![](example/wireframe_clean.png)       |\n\n\n# Installation\n\nRequires Python 3.7+.\n\nInstall requirements using `pip install -r requirements.txt`.\n\n\n# Usage\n\nSee also `./wireframe.py -h`\n\n```text\nusage: wireframe.py [-h] [--flipy] [-r RESOLUTION] [-w WIDTH] [-ss SUPERSAMPLE] [-a] obj_file out_file\n\nGenerate a clean wireframe for a given .obj model.\n\npositional arguments:\n  obj_file              Input obj file.\n  out_file              Output image file path.\n\noptions:\n  -h, --help            show this help message and exit\n  --flipy               Flip Y UVs.\n  -r RESOLUTION, --resolution RESOLUTION\n                        Texture resolution. Default: 1024.\n  -w WIDTH, --width WIDTH\n                        Line width. Default: 1.\n  -ss SUPERSAMPLE, --supersample SUPERSAMPLE\n                        Use super-sampling to produce anti-aliased lines. A value \u003c= 1 means no super-sampling\n                        (default). Default: 1\n  -a, --all             Render all edges, don't remove support edges.\n```\n\n## Examples\n\n```sh\n# Render a wireframe of example.obj to wireframe.png with a resolution of 2048x2048\n./wireframe.py example/example.obj wireframe.png -r 2048\n\n# Render a wireframe with line width of 3px\n./wireframe.py example/example.obj wireframe.png -w 3\n\n# Render a wireframe with 2x super-sampling to produce anti-aliased lines\n./wireframe.py example/example.obj wireframe.png -ss 2\n\n# Render a wireframe with all edges and without removing support edges.\n./wireframe.py example/example.obj wireframe.png --all\n```\n\n\n# How it works\n\n- Load the `.obj`\n- For each unique edge in the model:\n  - Store each face it is part of\n  - If there is more than one face:\n    - Compute face normals\n    - If all connected faces have the same normal (i.e. are all part of a larger planar surface):\n      - Remove the edge\n- For all remaining edges:\n  - Render them to an image\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmphe%2Fwireframe-generator","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmphe%2Fwireframe-generator","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmphe%2Fwireframe-generator/lists"}