{"id":24072983,"url":"https://github.com/markusmoenig/rpu_old","last_synced_at":"2025-04-28T15:37:37.469Z","repository":{"id":50745555,"uuid":"519052251","full_name":"markusmoenig/RPU_OLD","owner":"markusmoenig","description":"A procedural 2D and 3D scene definition language with integrated scripting and shaders.","archived":false,"fork":false,"pushed_at":"2022-08-29T03:57:57.000Z","size":5057,"stargazers_count":7,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2024-05-01T23:43:56.950Z","etag":null,"topics":["procedural","programming-languages","rendering-2d-graphics","rendering-3d-graphics","rust","scripting-language","shaders"],"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/markusmoenig.png","metadata":{"files":{"readme":"Readme.md","changelog":null,"contributing":null,"funding":".github/FUNDING.yml","license":"License.txt","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null},"funding":{"github":"markusmoenig"}},"created_at":"2022-07-29T02:16:37.000Z","updated_at":"2024-03-14T10:12:37.000Z","dependencies_parsed_at":"2023-01-16T17:01:06.681Z","dependency_job_id":null,"html_url":"https://github.com/markusmoenig/RPU_OLD","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/markusmoenig%2FRPU_OLD","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/markusmoenig%2FRPU_OLD/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/markusmoenig%2FRPU_OLD/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/markusmoenig%2FRPU_OLD/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/markusmoenig","download_url":"https://codeload.github.com/markusmoenig/RPU_OLD/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":233227582,"owners_count":18644424,"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":["procedural","programming-languages","rendering-2d-graphics","rendering-3d-graphics","rust","scripting-language","shaders"],"created_at":"2025-01-09T17:24:38.059Z","updated_at":"2025-01-09T17:24:38.650Z","avatar_url":"https://github.com/markusmoenig.png","language":"Rust","funding_links":["https://github.com/sponsors/markusmoenig"],"categories":[],"sub_categories":[],"readme":"RPU is a procedural 2D and 3D scene definition language with integrated scripting and shaders. RPU is under active and early stages of development.\n\nRPU utilizes a software renderer and is aimed at 2D and 3D content creation as well as rendering pretty pictures.\n\nSee below for examples.\n\n## Goals\n\n* Create 2D and 3D content for visualization or games by modeling with analytical and SDF primitives.\n* Create procedural textures including material attributes and normals for both high-quality as well as retro experiences.\n* Creating an ecosystem for sharing RPU content (materials, objects, scenes) via an integrated database.\n* Render pretty pictures utlilizing various renderers.\n\n## Non-Goals\n\n* Although I will use RPU for rendering dungeons and scenes for my retro RPG creator [Eldiron](https://github.com/markusmoenig/Eldiron) it is not aimed at being a realtime renderer.\n* RPU will output meshes for procedural 3D content but will not process them or model with meshes.\n\n## Usage\n\nYou can use RPU in various ways:\n\n* Edit RPU files with your favourite editor and use rpuc to compile them, view your content and save it to disk.\n* An upcoming *RPU Creator* app will provide an integrated IDE for working with your RPU files featuring context help and live previews.\n* Embed RPU source files in your app or game and create images live via the RPU crate.\n\n## Not for Artists\n\nRPU is meant as a tool for programmers and is not artist friendly by design. It is meant to be a tool which empowers developers to create their own art for their projects.\n\n## Examples\n\n# Texture Creation\n\nLet's start with a solid dark beige color.\n\n```rust\nTexture*       // The * star outputs this texture.\n    Color\n        color = #a9957b\n```\n![Dungeon](images/bricks0.png)\n\nThe texture has a solid color layer of a dark beige color.\n\nIn the next step we add a noise layer and pixelate the texture 60%.\n\n```rust\nTexture*\n    pixelate = 60.0\n    Color\n        color = #a9957b\n    Noise\n        color = #444444\n        scale = F2(1.0, 1.0)\n```\n\n![Dungeon](images/bricks1.png)\n\nThe noise color is blended on the background. By default the noise layer uses *Perlin* noise.\n\nNow lets add some bricks:\n\n```rust\nTexture*\n    pixelate = 60.0\n    Color\n        color = #a9957b\n    Bricks\n        color = #bc4a3c\n    Noise\n        color = #444444\n        scale = F2(1.0, 1.0)\n```\n\n![Dungeon](images/bricks2.png)\n\nThis creates a tileable brick layer on top of the color layer. The noise is applied as the last step.\n\nLayers, like the brick and noise layers in this example, have many different options which are explained in detail in the upcoming RPU book.\n\nAlso textures can contain material attributes and can output material and normal maps, to be documented soon.\n\n# Simple Dungeon\n\nLet's take the simple texture we created and apply it to a basic dungeon scene. For this we add a camera a voxel, and a 3D grid.\n\n```rust\nPinhole\n    origin = F3(3.0, 0.5, 9.5)\n    center = F3(3.0, 0.5, 0.0)\n\nTexture\n    name = \"Bricks\"\n    pixelate = 60.0\n    Color\n        color = #a9957b\n    Bricks\n        color = #BC4A3C\n    Noise\n        color = #444444\n        scale = F2(1.0, 1.0)\n\nVoxel'a\n    texture = \"Bricks\"\n\nGrid3D\n:    a\n:aaa a\n:\n: a  a\n: a  a\n: a  a\n```\n\nNotice that we removed the * from the texture, now RPU renders the last layout in the source which in this case is a 3D grid. The grid has one level of tiles in the xz plane.\n\n![Dungeon](images/dungeon.png)\n\n### Sprites\n\nIn the last step, lets add an image based monster to the scene. We call them sprites.\n\n```rust\nPinhole\n    origin = F3(3.0, 0.5001, 9.5)\n    center = F3(3.0, 0.5, 0.0)\n\nTexture\n    name = \"Bricks\"\n    pixelate = 60.0\n    Color\n        color = #a9957b\n    Bricks\n        color = #BC4A3C\n    Noise\n        color = #444444\n        scale = F2(1.0, 1.0)\n\nTexture\n    name = \"Monster\"\n    data = \"iVBORw0KGgoAAAANSUhEUgAAABgAAAAYCAYAAADgdz34AAAABGdBTUEAALGPC/xhBQAAACBjSFJNAAB6JgAAgIQAAPoAAACA6AAAdTAAAOpgAAA6mAAAF3CculE8AAAAUGVYSWZNTQAqAAAACAACARIAAwAAAAEAAQAAh2kABAAAAAEAAAAmAAAAAAADoAEAAwAAAAEAAQAAoAIABAAAAAEAAAAYoAMABAAAAAEAAAAYAAAAAPDoW7MAAAFZaVRYdFhNTDpjb20uYWRvYmUueG1wAAAAAAA8eDp4bXBtZXRhIHhtbG5zOng9ImFkb2JlOm5zOm1ldGEvIiB4OnhtcHRrPSJYTVAgQ29yZSA2LjAuMCI+CiAgIDxyZGY6UkRGIHhtbG5zOnJkZj0iaHR0cDovL3d3dy53My5vcmcvMTk5OS8wMi8yMi1yZGYtc3ludGF4LW5zIyI+CiAgICAgIDxyZGY6RGVzY3JpcHRpb24gcmRmOmFib3V0PSIiCiAgICAgICAgICAgIHhtbG5zOnRpZmY9Imh0dHA6Ly9ucy5hZG9iZS5jb20vdGlmZi8xLjAvIj4KICAgICAgICAgPHRpZmY6T3JpZW50YXRpb24+MTwvdGlmZjpPcmllbnRhdGlvbj4KICAgICAgPC9yZGY6RGVzY3JpcHRpb24+CiAgIDwvcmRmOlJERj4KPC94OnhtcG1ldGE+Chle4QcAAAF2SURBVEgN3VRBboMwEFyq/gepB/IeDlTlBX0KUTnkPfEhUl7kegxrxtY6cEgusRRYdmdnvGMrIm+1hk48fhhqGjqP396AjON+7fvUQIn1+zL30nZjFEJunF2jNbxV/HZ3cndTyLhUBtfsJOKTQKqugZOxETf50J+EVATkG3EfqAO2sj44j52oMvL9cIll5EGodmzkGwZA9C7TxLb4yCaAJa2I/2q7hIAI7LKWboDtCmZm0DQB71wR2CkWhH83i2OMHJZi4sf6YK7Mu04mr42YwmpmIo0ZC4v4TNIEAHOByUtfgeUcY5kDuGwCJLAwyRIt9iD+u3o5NeeYvvof+T4trSxUkgNsCkSW9cG2cR5xaUdZx/euAECWyBFy9GbXFInaYitqGCu/OwGfh0Vg+c64hwL8/1ROoNcZZHzvmRxxdk3LIn8zIceMseLDAnqosKScxiLW3GEBbXjqGweMc7AO+lHt0CZAzIdca9rDvdyilwvUJn9a/h+9kLeXa8PDYAAAAABJRU5ErkJggg==\"\n\nVoxel'a\n    texture = \"Bricks\"\n\nSprite\n    texture = \"Monster\"\n    position = F3(2.0, 0.0, 5.0)\n\nGrid3D\n:    a\n:aaa a\n:\n: a  a\n: a  a\n: a  a\n```\n\n![Sprite](images/sprite.png)\n\nScary isn't he ? We loaded the texture for the sprite from a JSON encoded PNG file and placed the sprite at the given location into the scene.\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmarkusmoenig%2Frpu_old","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmarkusmoenig%2Frpu_old","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmarkusmoenig%2Frpu_old/lists"}