{"id":19797888,"url":"https://github.com/podgorskiy/envmaptool","last_synced_at":"2025-05-01T04:30:25.014Z","repository":{"id":35779152,"uuid":"40059039","full_name":"podgorskiy/EnvMapTooL","owner":"podgorskiy","description":null,"archived":false,"fork":false,"pushed_at":"2015-08-23T07:13:35.000Z","size":10112,"stargazers_count":31,"open_issues_count":1,"forks_count":5,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-04-06T08:27:10.653Z","etag":null,"topics":["converts-cube-map","cubemap","dds","dds-format","environment","environment-mapping","map","sphere","sphere-map","texture","tga"],"latest_commit_sha":null,"homepage":null,"language":"C","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/podgorskiy.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":"2015-08-01T20:24:58.000Z","updated_at":"2024-09-05T18:56:57.000Z","dependencies_parsed_at":"2022-09-24T12:20:48.948Z","dependency_job_id":null,"html_url":"https://github.com/podgorskiy/EnvMapTooL","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/podgorskiy%2FEnvMapTooL","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/podgorskiy%2FEnvMapTooL/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/podgorskiy%2FEnvMapTooL/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/podgorskiy%2FEnvMapTooL/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/podgorskiy","download_url":"https://codeload.github.com/podgorskiy/EnvMapTooL/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":251823988,"owners_count":21649781,"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":["converts-cube-map","cubemap","dds","dds-format","environment","environment-mapping","map","sphere","sphere-map","texture","tga"],"created_at":"2024-11-12T07:27:15.508Z","updated_at":"2025-05-01T04:30:22.914Z","avatar_url":"https://github.com/podgorskiy.png","language":"C","funding_links":[],"categories":[],"sub_categories":[],"readme":"#[EnvMapTool](https://github.com/podgorskiy/EnvMapTool) - Cross-platform tool for working with environmental maps. \n============================================================================\n\nPerforms a set of different actions:\n\n * Converts cube map to sphere map\n * Converts sphere map to cube map\n * Blurs cubmap\n * Assembles cubemaps from a set of images\n * Disassembles cubemap to a set of images \n\nSupported formats fow read/write:\n\n * DDS. Not compressed.\n * TARGA\n * PNG\n\n#Usage:\nInput and output files can be specified in two ways:\n\n * As single file. Use keys -i / -o\n * As six files that represent x+, x-, y+, y-, z+, z- faces, use keys -I / -O \n\nSpecify output format with key -f. It can be: TGA, PNG, DDS. For example `-f PNG`. Default is TGA.\n\nSpecify desired action:\n\n * `cube2sphere` - converts cube map to sphere map\n * `sphere2cube` - converts sphere map to cube map\n * `blurCubemap` - blurs cubemap using Monte Carlo method. Accurate but slow approach.\n * `fastBlurCubemap` - blurs cubemap using Monte Carlo method. Inaccurate but fast approach.\n * `convert` - this action does nothing. Should be used to convert cubemap from one format to other.\n\nIf you specifed a single file for output, that does not support multiple faces (not DDS format), than omly one face will be written. This face can be specified by flag `-F`\n\nYou may specify gamma for input texture `-g`, and gamma for output texture `-G`. Default is 2.2\n\nYou may specify size of output texture using keys `-W` and `-H`.\n\nFor actions *blurCubemap* and *fastBlurCubemap* you may set bluring radius by use of key `-b`\n\nFor action *blurCubemap* blur quality can be specified by key `-q`. Effects the number of samples in Monte Carlo integration. Reasonable values are between 4 - 10. Large values will increase calculation time dramatically. Default is 4\n\n#Exapmles\n----------------------------------------------------------------------------\n##Converting DDS to a series of png files: \nLet we have cubemap in DDS format: uffizi_cros.dds\nTo convert it to six *.png files that represent x+, x-, y+, y-, z+, z- faces you need to execite following command:\n```\nEnvMapTool -i uffizi_cros.dds -O 1.png -O 2.png -O 3.png -O 4.png -O 5.png -O 6.png -f PNG convert\n```\nThe output will be:\n\n![xp](https://cloud.githubusercontent.com/assets/3229783/9427142/57dc08f4-493a-11e5-9345-2d78482f615d.png)\n![xm](https://cloud.githubusercontent.com/assets/3229783/9427145/73e78fc8-493a-11e5-945c-bf870b41db3a.png)\n![yp](https://cloud.githubusercontent.com/assets/3229783/9427148/9a02fba2-493a-11e5-9a3b-519753b706c8.png)\n![ym](https://cloud.githubusercontent.com/assets/3229783/9427150/9c48470a-493a-11e5-9fe7-d879d4271c33.png)\n![zp](https://cloud.githubusercontent.com/assets/3229783/9427151/9e4ef850-493a-11e5-812c-1740b645658b.png)\n![zm](https://cloud.githubusercontent.com/assets/3229783/9427153/b51c0488-493a-11e5-8a87-4adeae8d2d97.png)\n\n##Converting DDS cubemap to sphere map\nLets convert uffizi_cros.dds to sphere map and specify size of sphere map of 765x765:\n```\nEnvMapTool -i uffizi_cros.dds -o sphere.png -W 765 -H 765 -f PNG cube2sphere\n```\n![sphere](https://cloud.githubusercontent.com/assets/3229783/9427205/38cc2576-493e-11e5-830b-140eb3495635.png)\n\n##Converting sphere map to cubemap\nLets convert generated in previous example sphere map to a series of png texture of size 256x256:\n```\nEnvMapTool -i sphere.png -O xp_.png -O xm_.png -O yp_.png -O ym_.png -O zp_.png -O zm_.png -W 256 -H 256 -f PNG sphere2cube\n```\n\n![xp_](https://cloud.githubusercontent.com/assets/3229783/9427223/d79eb7fe-493e-11e5-96cb-b2e19ceaf6b0.png)\n![xm_](https://cloud.githubusercontent.com/assets/3229783/9427221/d5a96bf6-493e-11e5-9279-7b00cec3cfa8.png)\n![yp_](https://cloud.githubusercontent.com/assets/3229783/9427225/dc91d07a-493e-11e5-936e-7b9587a209ed.png)\n![ym_](https://cloud.githubusercontent.com/assets/3229783/9427224/da638cb2-493e-11e5-9e1a-fd43d17ae7aa.png)\n![zp_](https://cloud.githubusercontent.com/assets/3229783/9427228/e0585396-493e-11e5-843b-fedc8914b3b3.png)\n![zm_](https://cloud.githubusercontent.com/assets/3229783/9427227/de91b318-493e-11e5-92d6-50c1e24426cb.png)\n\n##Bluring cubemap using Monte-Carlo approach and converting it to spheremap:\n```\nEnvMapTool -i uffizi_cros.dds -O 1.png -O 2.png -O 3.png -O 4.png -O 5.png -O 6.png -W 256 -H 256 -f PNG blurCubemap -b 60 -q 10\nEnvMapTool -I 1.png -I 2.png -I 3.png -I 4.png -I 5.png -I 6.png -o bluredSphere.png -W 765 -H 765 -f PNG cube2sphere\n```\n![bluredsphere](https://cloud.githubusercontent.com/assets/3229783/9427291/0fa9994e-4943-11e5-8561-ab076144bc67.png)\n\n##The same as above, but using fast blur:\n```\nEnvMapTool -i uffizi_cros.dds -O 1.png -O 2.png -O 3.png -O 4.png -O 5.png -O 6.png -f PNG fastBlurCubemap -b 30\nEnvMapTool -I 1.png -I 2.png -I 3.png -I 4.png -I 5.png -I 6.png -o fastBluredSphere.png -W 765 -H 765 -f PNG cube2sphere\n```\n![fastbluredsphere](https://cloud.githubusercontent.com/assets/3229783/9427292/1b0e2e8a-4943-11e5-8d9a-07ba8844a7d2.png)\n\n##Detailed usage:\n```\nUSAGE: \n\n   ./EnvMapTool  {-o \u003cOutput file\u003e|-O \u003cOutput files\u003e ... } {-i \u003cInput file\u003e\n                 |-I \u003cInput files\u003e ... } [-f \u003cOutput format\u003e] [-F \u003cFace to\n                 write\u003e] [-q \u003cBlur quality\u003e] [-b \u003cBlur radius\u003e] [-l] [-g\n                 \u003cInput gamma\u003e] [-G \u003cOutput gamma\u003e] [-H \u003cOutput texture\n                 height\u003e] [-W \u003cOutput texture width\u003e] [--version] [-h]\n                 \u003ccube2sphere|sphere2cube|blurCubemap|fastBlurCubemap\n                 |convert\u003e\n\n\nWhere: \n\n   -o \u003cOutput file\u003e,  --output \u003cOutput file\u003e\n     (OR required)  The output texture file.\n         -- OR --\n   -O \u003cOutput files\u003e,  --outputSequence \u003cOutput files\u003e  (accepted multiple\n      times)\n     (OR required)  The output texture files for cube map. You need specify\n     six files: xp, xn yp, yn, zp, zn\n\n\n   -i \u003cInput file\u003e,  --input \u003cInput file\u003e\n     (OR required)  The input texture file. Can be of the following\n     formats: *.tga, *.png, *.dds\n         -- OR --\n   -I \u003cInput files\u003e,  --inputSequence \u003cInput files\u003e  (accepted multiple\n      times)\n     (OR required)  The input texture files for cube map. You need specify\n     six files: xp, xn yp, yn, zp, zn. WARNING! All the files MUST be the\n     same format and size!\n\n\n   -f \u003cOutput format\u003e,  --format \u003cOutput format\u003e\n     Output texture file format. Can be one of the following \"TGA\", \"DDS\",\n     \"PNG\". Default TGA.\n\n   -F \u003cFace to write\u003e,  --faceToWrite \u003cFace to write\u003e\n     If cubemap texture is written to format that does not support faces,\n     this face will be written\n\n   -q \u003cBlur quality\u003e,  --blurQuality \u003cBlur quality\u003e\n     Effects the number of samples in Monte Carlo integration. Reasonable\n     values are between 4 - 8. Large values will increase calculation time\n     dramatically. Default is 4\n\n   -b \u003cBlur radius\u003e,  --blurRadius \u003cBlur radius\u003e\n     Gaussian blur radius. Default is 10.0\n\n   -l,  --leaveOuter\n     If flag is set, than while cubemap -\u003e sphere transform area around the\n     sphere circule are not filled black, but represent mathematical\n     extrapolation.\n\n   -g \u003cInput gamma\u003e,  --inputGamma \u003cInput gamma\u003e\n     Gamma of input texture. Default is 2.2\n\n   -G \u003cOutput gamma\u003e,  --outputGamma \u003cOutput gamma\u003e\n     Gamma of output texture. Default is 2.2\n\n   -H \u003cOutput texture height\u003e,  --outputHeight \u003cOutput texture height\u003e\n     Height of output texture. Default is the same as input, or 4 times\n     upscaled in case of cube2sphere transform, or 4 times downscaled in\n     case of sphere2cube transform\n\n   -W \u003cOutput texture width\u003e,  --outputWidth \u003cOutput texture width\u003e\n     Width of output texture. Default is the same as input, or 4 times\n     upscaled in case of cube2sphere transform, or 4 times downscaled in\n     case of sphere2cube transform\n\n   --version\n     Displays version information and exits.\n\n   -h,  --help\n     Displays usage information and exits.\n\n   \u003ccube2sphere|sphere2cube|blurCubemap|fastBlurCubemap|convert\u003e\n     (required)  Action. Can be:\n\n     \tcube2sphere - Converts cube map texture to spherical map\n\n     \tsphere2cube - Converts spherical map texture to cube map\n\n     \tblurCubemap - Gaussian blur of cubemap\n\n     \tconvert - Do nothing. Just to convert txture from one format to\n     other\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpodgorskiy%2Fenvmaptool","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fpodgorskiy%2Fenvmaptool","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpodgorskiy%2Fenvmaptool/lists"}