{"id":24201319,"url":"https://github.com/takecx/obj2schematic","last_synced_at":"2025-09-22T00:31:34.757Z","repository":{"id":37220458,"uuid":"282818609","full_name":"takecx/obj2schematic","owner":"takecx","description":"Convert Wavefront .obj file to Minecraft Schematic file","archived":false,"fork":false,"pushed_at":"2022-12-08T11:17:09.000Z","size":1412,"stargazers_count":9,"open_issues_count":16,"forks_count":2,"subscribers_count":3,"default_branch":"master","last_synced_at":"2023-03-04T12:40:47.527Z","etag":null,"topics":["minecraft","obj","schematic"],"latest_commit_sha":null,"homepage":"","language":"Jupyter Notebook","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/takecx.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}},"created_at":"2020-07-27T06:57:49.000Z","updated_at":"2023-02-11T22:49:13.000Z","dependencies_parsed_at":"2023-01-25T12:15:41.662Z","dependency_job_id":null,"html_url":"https://github.com/takecx/obj2schematic","commit_stats":null,"previous_names":[],"tags_count":null,"template":null,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/takecx%2Fobj2schematic","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/takecx%2Fobj2schematic/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/takecx%2Fobj2schematic/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/takecx%2Fobj2schematic/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/takecx","download_url":"https://codeload.github.com/takecx/obj2schematic/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":233808775,"owners_count":18733601,"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":["minecraft","obj","schematic"],"created_at":"2025-01-13T21:15:32.591Z","updated_at":"2025-09-22T00:31:29.374Z","avatar_url":"https://github.com/takecx.png","language":"Jupyter Notebook","readme":"# obj2schematic\n\nConvert [Wavefront `.obj` file](#Supported-`.obj`-format) to [Minecraft `.schematic` file](https://minecraft.gamepedia.com/Schematic_file_format)\n\n**input `.obj`**\n![obj file](images/sample_obj_view.png)\n\n**output `.schematic`**\n![schematic file](images/sample_schematic_view.png)\n\n## Supported `.obj` format\n\n### 1. geometric vertices with `(x, y, z, r, g, b)`\n\nFrom [Wavefront .obj file Wiki](https://en.wikipedia.org/wiki/Wavefront_.obj_file)\n\n\u003e Geometric vertex\nA vertex can be specified in a line starting with the letter v. That is followed by (x,y,z[,w]) coordinates. W is optional and defaults to 1.0. **Some applications support vertex colors, by putting red, green and blue values after x y and z. The color values range from 0 to 1.**\n\n\n*`.obj` sample*\n\n```txt\n# v (x) (y) (z) (red) (green) (blue)\nv -0.3438 -0.1250 0.0312 0.4563 0.3357 0.2624\nv -0.3438 -0.1250 0.0296 0.4552 0.3348 0.2617\nv -0.3438 -0.1256 0.0312 0.4548 0.3343 0.2613\nv -0.3438 -0.1250 0.0369 0.4579 0.3367 0.2631\nv -0.3444 -0.1172 0.0234 0.4736 0.3508 0.2737\nv -0.3438 -0.1172 0.0186 0.4751 0.3515 0.2738\nv -0.3438 -0.1223 0.0234 0.4610 0.3400 0.2655\nv -0.3448 -0.1172 0.0312 0.4752 0.3522 0.2750\nv -0.3438 -0.1247 0.0391 0.4596 0.3380 0.2640\nv -0.3446 -0.1172 0.0391 0.4747 0.3515 0.2741\n:\n```\n\n### 2. `.obj` with `.mtl`\n\n*`.obj` sample*\n\n```txt\n# OBJ File:\n\nmtllib ./result.mtl\n\n# vertices:\nv -9.1863 9.1863 -5.0000\nv -8.8947 9.1863 -5.0000\nv -8.6904 9.2796 -6.0667\n:\n\n# vertice textures:\nvt 0.0000 1.0000\nvt 0.0159 1.0000\nvt 0.0317 1.0000\n:\n\n# vertice normals:\nvn -0.0000 0.0000 1.0000\nvn -0.0000 0.0000 1.0000\nvn -0.0000 0.0000 1.0000\n:\n\n# faces:\n\nusemtl tex\nf 1/1/1 65/65/65 4097/4097/4097\nf 2/2/2 66/66/66 4098/4098/4098\nf 3/3/3 67/67/67 4099/4099/4099\n:\n```\n\n*`.mtl` sample*\n\n```txt\nnewmtl tex\nKa 1.0000 1.0000 1.0000\nKd 1.0000 1.0000 1.0000\nKs 0.0000 0.0000 0.0000\nd 1.0\nillum 0\nmap_Kd ./img.png\n```\n\n## How to Use\n\n### 1. Clone this repo\n\n```bash\n$ git clone https://github.com/takecx/obj2schematic.git\n$ cd obj2schematic\n```\n\n### 2. Create Environment\n\nYou should create python environment using `requirements.txt`.\n\n```bash\n$ conda create -n obj2schematic python=3.7\n$ conda activate obj2schematic\n$ pip install -r requirements.txt\n```\n\n### 3. Prepare input `.obj` file\n\nPut input `.obj` file to `./data/` dir for example.\n\n### 4. Run script\n\nRun `Obj2SchematicConverter.py` with some arguments.\n\n```bash\n$ python Obj2SchemticConverter.py (.obj_file) --output_dir (output dir) --h_max (height max value) --w_max (width max value)\n```\n\n#### Arguments\n\n1. input `.obj` file (**required**)\n2. `--output_dir` : Output dir of generated .schematic file (optional)\n3. `--h_max` : max height of converted schematic (optional)\n4. `--w_max` : max width(length) of converted schematic (optional)\n\nFor example, \n\n- input `.obj` file : `./data/sample_data.obj`\n- `--output_dir` : `./output/`\n- `--h_max` : `100`\n- `--w_max` : `150`\n\nthen, you run \n\n```bash\n$ python Obj2SchemticConverter.py ./data/sample_data.obj --output_dir ./output/ --h_max 100 --w_max 150\n```\n\n### 5. Import `.schematic` to your Minecraft World!!\n\nImport generated `.schematic` file to your own Minecraft World using [WorldEdit mod](https://www.curseforge.com/minecraft/mc-mods/worldedit).\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftakecx%2Fobj2schematic","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ftakecx%2Fobj2schematic","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftakecx%2Fobj2schematic/lists"}