{"id":21630105,"url":"https://github.com/virtualritz/rust-diffusion-limited-aggregation","last_synced_at":"2025-03-18T21:23:41.837Z","repository":{"id":37827816,"uuid":"233978156","full_name":"virtualritz/rust-diffusion-limited-aggregation","owner":"virtualritz","description":"Just to play with something while testing the ɴsɪ crate.","archived":false,"fork":false,"pushed_at":"2023-03-14T05:57:42.000Z","size":4210,"stargazers_count":2,"open_issues_count":5,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-01-24T23:28:46.385Z","etag":null,"topics":["3delight","diffusion-limited-aggregation","nsi","rendering","rust"],"latest_commit_sha":null,"homepage":"","language":"Rust","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/virtualritz.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":".github/FUNDING.yml","license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null},"funding":{"github":null,"patreon":"virtualritz","open_collective":null,"ko_fi":null,"tidelift":null,"community_bridge":null,"liberapay":null,"issuehunt":null,"otechie":null,"custom":null}},"created_at":"2020-01-15T02:12:50.000Z","updated_at":"2024-11-14T14:32:23.000Z","dependencies_parsed_at":"2023-02-17T02:16:25.561Z","dependency_job_id":null,"html_url":"https://github.com/virtualritz/rust-diffusion-limited-aggregation","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/virtualritz%2Frust-diffusion-limited-aggregation","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/virtualritz%2Frust-diffusion-limited-aggregation/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/virtualritz%2Frust-diffusion-limited-aggregation/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/virtualritz%2Frust-diffusion-limited-aggregation/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/virtualritz","download_url":"https://codeload.github.com/virtualritz/rust-diffusion-limited-aggregation/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":244307255,"owners_count":20431995,"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":["3delight","diffusion-limited-aggregation","nsi","rendering","rust"],"created_at":"2024-11-25T02:09:47.421Z","updated_at":"2025-03-18T21:23:41.807Z","avatar_url":"https://github.com/virtualritz.png","language":"Rust","funding_links":["https://patreon.com/virtualritz"],"categories":[],"sub_categories":[],"readme":"# Diffusion Limited Aggregation in Rust\n\nJust to play with something while testing the\n[ɴsɪ crate](https://github.com/virtualritz/nsi).\n\n![Result of rendering with 3Delight|NSI from within the tool](dla.jpg)\n2k resolution, 66,666 instances of a scaffoldy dodecahedron.\n512 shading, 64 aa-samples. Rendered in about one minute via 3Delight\nCloud. Post-processing in [Darktable](https://www.darktable.org/).\n\n## Dependencies\n\nThis crate depends on [nsi-sys](https://github.com/virtualritz/nsi-sys) which in term requires a renderer that implements the ɴsɪ API.\nCurrently the only renderer that does is 3Delight which, though commercial, has been and is free for personal use since over twenty years.\n\n## Prerequisites\n\nBefore you start, [download a 3Delight package](https://www.3delight.com/download) for your platform \u0026 install it (supported: Linux, macOS, Windows).\nThis will set the `$DELIGHT` environment variable that the build script is looking for to find headers and the library to link against.\n\n\u003e **_Note:_** The free version of 3Delight will render with up to 12 cores on your machine. For crazier projects you can use their cheap cloud rendering service that gives you access to unlimited CPU cores. When you register you get 1,000 cloud minutes for free which ain’t too shabby and may come in handy once you start experimenting with this codebase yourself.\n\n## Building\n\nThe space partitioning insertion is extremenly slow for debug builds.\nIf you want to generate more than 10k particles doing a release build\nis mandatory.\n\nBecause the crate has link time optimizations enabled the final build\nstep may be noticeably slow.\n\n```console\n\u003e cargo build --release\n```\n\n## Running\n\nBuilds will be in the `./target` folder.\n\n```console\n\u003e target/release/rdla render --display\n```\n\n### Cloud Rendering\n\n\u003e “Hold on to you lug nuts it’s time for an overhaul!”\n\u003e\n\u003e – Stanley Ipkiss, ‘The Mask’.\n\nTo render in the cloud register at\n[3delight.com](https://www.3delight.com/), open the 3Delight Display app\nand log in with your credentials.\n\nOnce you have done this all that is needed to launch a render in the\ncloud is to add the `--cloud` flag.\n\n```console\n\u003e target/release/rdla render --cloud --display\n```\n\n## Command Line Interface\n\nThe app creates \u0026 renders point clouds based on diffusion limited\naggregation.\n\n```usage\nUSAGE:\n    rdla [OPTIONS] [SUBCOMMAND]\n\nFLAGS:\n    -h, --help       Prints help information\n    -V, --version    Prints version information\n\nOPTIONS:\n    -c, --config \u003cFILE\u003e    Sets a custom config file (default: ./rdla.toml)\n    -p, --particles \u003cN\u003e    Number of particles to generate (default: 1000)\n\nSUBCOMMANDS:\n    dump      Dump the result into an .nsi stream or into a Stanford .ply file\n    help      Prints this message or the help of the given subcommand(s)\n    render    Render an image of result with 3Delight\n```\n\n### dump Subcommand\n\nDump the result into an `.nsi` stream or into a Stanford `.ply` file.\n\n```\nUSAGE:\n    rdla dump \u003cFILE\u003e\n\nFLAGS:\n    -h, --help       Prints help information\n    -V, --version    Prints version information\n\nARGS:\n    \u003cFILE\u003e    File name of dump; extension determines format to use\n```\n\n### render Subcommand\n\nRender an image of the point cloud with 3Delight.\n\n```\nUSAGE:\n    rdla render [FLAGS] [FILE]\n\nFLAGS:\n        --cloud      Render using 3Delight Cloud\n    -d, --display    Open a 3Delight Display\n    -h, --help       Prints help information\n    -V, --version    Prints version information\n\nARGS:\n    \u003cFILE\u003e    Image file name to render to (default: out.exr)\n```\n\n## Config File\n\nThe app looks for a config file named `rdla.toml` in the current\ndirectory.\n\nThis can be overridden with the `--config` flag.\n\n```toml\n[aggregation]\n    show_progress = true\n    random_seed = 42\n    particles = 10000\n    # Spacing can be changed over the iteration.\n    # The 1st value is used for the first particle\n    # placed and the last for the last particle.\n    # In between, spacing is linearly interpolated.\n    spacing = [1.0, 1.0]\n    attraction_distance = 3.0\n    repulsion_distance = 1.0\n    stubbornness = 0\n    stickiness = 1.0\n\n    [aggregation.start_shape]\n        # Try using \"ring\".\n        shape = \"point\"\n        # \"ring\" diameter.\n        diameter = 0\n        # No. of particles on\n        # start shape.\n        particles = 1\n\n[particle]\n    # Scale can be changed over the iteration.\n    # The 1st value is used for the first particle\n    # placed and the last for the last particle.\n    # In between,scale is linearly interpolated.\n    scale = [2.0, 2.0]\n    # A wavefront OBJ (converted to triangles for now)\n    # to instace instead of a sphere particle.\n    instance_geo = \"\" # \"assets/cube.obj\"\n    subdivision = true\n\n[material]\n    color = [0.5, 0.6, 0.8]\n    roughness = 0.3\n    metallic = 1.0\n    specular_level = 0.8\n\n[environment]\n    texture = \"assets/artist_workshop_1k.tdl\"\n    intensity = 1.2\n\n[nsi_render]\n    # Images are square\n    resolution = 2048\n    shading_samples = 100\n    oversampling = 20\n    bucket_order = \"circle\"\n\n    [nsi_render.output]\n        file_name = \"out.exr\"\n        display = false\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fvirtualritz%2Frust-diffusion-limited-aggregation","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fvirtualritz%2Frust-diffusion-limited-aggregation","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fvirtualritz%2Frust-diffusion-limited-aggregation/lists"}