{"id":17465947,"url":"https://github.com/danielshervheim/unity-sdf-generator","last_synced_at":"2025-10-14T10:42:00.129Z","repository":{"id":49402535,"uuid":"170180401","full_name":"danielshervheim/unity-sdf-generator","owner":"danielshervheim","description":"A Unity tool to generate signed distance field volumes (as Texture3D assets) from meshes.","archived":false,"fork":false,"pushed_at":"2023-11-26T21:51:02.000Z","size":6589,"stargazers_count":181,"open_issues_count":0,"forks_count":21,"subscribers_count":9,"default_branch":"main","last_synced_at":"2025-08-21T06:55:53.190Z","etag":null,"topics":["meshes","sdf","sdf-generator","signed-distance-fields","tools","unity","utilities"],"latest_commit_sha":null,"homepage":"","language":"ShaderLab","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"bsd-3-clause","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/danielshervheim.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}},"created_at":"2019-02-11T18:33:45.000Z","updated_at":"2025-07-22T04:42:57.000Z","dependencies_parsed_at":"2024-01-14T01:17:57.361Z","dependency_job_id":"7b2b69a5-23e2-436f-a885-0b85f60ecd11","html_url":"https://github.com/danielshervheim/unity-sdf-generator","commit_stats":null,"previous_names":["danielshervheim/signed-distance-field-generator"],"tags_count":1,"template":false,"template_full_name":null,"purl":"pkg:github/danielshervheim/unity-sdf-generator","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/danielshervheim%2Funity-sdf-generator","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/danielshervheim%2Funity-sdf-generator/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/danielshervheim%2Funity-sdf-generator/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/danielshervheim%2Funity-sdf-generator/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/danielshervheim","download_url":"https://codeload.github.com/danielshervheim/unity-sdf-generator/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/danielshervheim%2Funity-sdf-generator/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":279018785,"owners_count":26086452,"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-10-14T02:00:06.444Z","response_time":60,"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":["meshes","sdf","sdf-generator","signed-distance-fields","tools","unity","utilities"],"created_at":"2024-10-18T13:07:12.675Z","updated_at":"2025-10-14T10:42:00.108Z","avatar_url":"https://github.com/danielshervheim.png","language":"ShaderLab","funding_links":[],"categories":[],"sub_categories":[],"readme":"# sdf-generator\n\nA Unity tool to generate signed distance field volumes (as `Texture3D` assets) from meshes.\n\n![demo](img/nHyQgX9.gif)\n\n## How To Install\n\nThe sdf-generator package uses the [scoped registry](https://docs.unity3d.com/Manual/upm-scoped.html) feature to import\ndependent packages. Please add the following sections to the package manifest\nfile (`Packages/manifest.json`).\n\nTo the `scopedRegistries` section:\n\n```\n{\n  \"name\": \"DSS\",\n  \"url\": \"https://registry.npmjs.com\",\n  \"scopes\": [ \"com.dss\" ]\n}\n```\n\nTo the `dependencies` section:\n\n```\n\"com.dss.sdf-generator\": \"1.0.2\"\n```\n\nAfter changes, the manifest file should look like below:\n\n```\n{\n  \"scopedRegistries\": [\n    {\n      \"name\": \"DSS\",\n      \"url\": \"https://registry.npmjs.com\",\n      \"scopes\": [ \"com.dss\" ]\n    }\n  ],\n  \"dependencies\": {\n    \"com.dss.sdf-generator\": \"1.0.2\",\n    ...\n```\n\n## To Use\n\n**In Editor**\n\n1. Select `SDF \u003e Generator` from the Unity menu bar, the tool window will pop up.\n2. Set the relevant options (described in the next section).\n3. Press `Create` and a save dialog will pop up.\n3. Choose a location and name to save your SDF to.\n\n**Through a Script**\n\n```csharp\n// create a new generator instance\nDSS.SDF.Generator generator = new DSS.SDF.Generator();\n\n// set the relevant options (described in the next section)\ngenerator.Mesh = someMeshInstance;\ngenerator.Resolution = 32;\n// ...etc...\n\n// generate the Texture3D\n// note: this can take a long time, so definitely don't do it each frame\n// and probably only do it once when the application first starts\nTexture3D sdf = generator.Generate();\n```\n\n## Options\n\n**Mesh**: the mesh you want to generate an SDF from.\n\n**Resolution**: the resulting `Texture3D` resolution (I recommend that you keep this below 64).\n\n**Submesh Index**: for multi-part meshes, the index of the sub-mesh you want to use.\n\n**Padding**: the padding to surround your mesh within the SDF (only set this to be non-zero if you see artifacts).","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdanielshervheim%2Funity-sdf-generator","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdanielshervheim%2Funity-sdf-generator","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdanielshervheim%2Funity-sdf-generator/lists"}