{"id":25578759,"url":"https://github.com/langurmonkey/virtualtexture-tools","last_synced_at":"2026-03-28T09:30:21.350Z","repository":{"id":278146151,"uuid":"885238847","full_name":"langurmonkey/virtualtexture-tools","owner":"langurmonkey","description":"Tools and scripts to help prepare Sparse Virtual Texture (SVT) datasets for Gaia Sky. The format is quite universal, so they can be used equally for other software packages that support virtual texturing.","archived":false,"fork":false,"pushed_at":"2025-02-18T07:57:20.000Z","size":16,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-02-18T08:38:30.142Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"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/langurmonkey.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE.txt","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":"2024-11-08T08:14:50.000Z","updated_at":"2025-02-18T07:57:24.000Z","dependencies_parsed_at":"2025-02-18T08:38:38.288Z","dependency_job_id":"7d57d907-0f7c-4abe-b300-86821d70c028","html_url":"https://github.com/langurmonkey/virtualtexture-tools","commit_stats":null,"previous_names":["langurmonkey/virtualtexture-tools"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/langurmonkey%2Fvirtualtexture-tools","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/langurmonkey%2Fvirtualtexture-tools/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/langurmonkey%2Fvirtualtexture-tools/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/langurmonkey%2Fvirtualtexture-tools/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/langurmonkey","download_url":"https://codeload.github.com/langurmonkey/virtualtexture-tools/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":239946882,"owners_count":19723018,"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":[],"created_at":"2025-02-21T03:17:30.557Z","updated_at":"2026-03-28T09:30:21.249Z","avatar_url":"https://github.com/langurmonkey.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Virtual Texture Tools\n\nThis project contains a couple of scripts to help prepare Sparse Virtual Texture (SVT) datasets for [Gaia Sky](https://codeberg.org/gaiasky/gaiasky). The format is quite universal, so they can be used equally for other software packages that support virtual texturing.\n\nThis project provides two scripts: `split-tiles.py` and `generate-lod.py`.\n\n## Split tiles \n\nThe `split-tiles.py` script takes in a tile size and an image file and splits it up in tiles of the given size. The script can only split images into square (1:1) tiles.\n\nFor example, if you have a 1024x512 texture in an image file `image.jpg` that you want to split in 64x64 tiles, you would run:\n\n```bash\nsplit-tiles.py 64 ./image.jpg\n```\n\nThat will create a list of `tx_[col]_[row].jpg` image files which correspond to the [col,row] tile. In this case, it will produce 128 tile files ($16*8$). \n\nYou can specify the output format with `-f` and the quality (if the format is JPG) with `-q`. Here are all the options:\n\n```bash\nusage: split-tiles [-h] [-c STARTCOL] [-r STARTROW] [-f {jpg,png}] [-q QUALITY] RESOLUTION FILE\n\nSplit the given input image into tiles of NxN pixels, named tx_C_R.ext, where C is the column and R is the\nrow, all zero-based.\n\npositional arguments:\n  RESOLUTION            Resolution of the produced tiles.\n  FILE                  The input image. Must have a 1:1 or 2:1 aspect ratio.\n\noptions:\n  -h, --help            show this help message and exit\n  -c STARTCOL, --startcol STARTCOL\n                        Starting column to use in the file names of the produced tiles.\n  -r STARTROW, --startrow STARTROW\n                        Starting row to use in the file names of the produced tiles.\n  -f {jpg,png}, --format {jpg,png}\n                        Defines the format of the output images. Defaults to jpg.\n  -q QUALITY, --quality QUALITY\n                        If the format is JPG, this defines the quality setting in [1,100]. Defaults to 95.\n```\n\n## Generate LOD levels\n\nThe `generate-lod.py` script generates the upper LOD level tiles from a directory with the tiles for a certain level. For example, if we move the 128 tiles, which are level-3 tiles ($log_2(8)=3$), to a `level3` directory, we can generate levels 2, 1 and 0 with:\n\n```bash\ngenerate-lod.py 3 ./level3\n```\n\nThis creates the directories `./level2`, `./level1` and `./level0`, with the corresponding tiles inside.\n\nYou can specify the output format with `-f` and the quality (if the format is JPG) with `-q`. Here are all the options:\n\n```bash\nusage: generate-lod [-h] [-f {jpg,png}] [-q QUALITY] LEVEL DIRECTORY\n\nGenerate the upper LOD levels from a certain level tile files. Each level L is put in the 'levelL' directory.\n\npositional arguments:\n  LEVEL                 The level of the input directory.\n  DIRECTORY             The input directory, containing the tiles for the specified level.\n\noptions:\n  -h, --help            show this help message and exit\n  -f {jpg,png}, --format {jpg,png}\n                        Defines the format of the output images. Defaults to jpg.\n  -q QUALITY, --quality QUALITY\n                        If the format is JPG, this defines the quality setting in [1,100]. Defaults to 95.\n```\n\n## Dependencies\n\nYou need Python to run the scripts. The project only depends on `argparse`, `numpy` and `opencv-python`. You can install the right versions with `pip install -r requirements.txt`.\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flangurmonkey%2Fvirtualtexture-tools","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Flangurmonkey%2Fvirtualtexture-tools","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flangurmonkey%2Fvirtualtexture-tools/lists"}