{"id":17133151,"url":"https://github.com/maierfelix/momo","last_synced_at":"2025-07-14T10:40:49.563Z","repository":{"id":90988007,"uuid":"221030753","full_name":"maierfelix/momo","owner":"maierfelix","description":"A Vulkan RTX Path Tracer","archived":false,"fork":false,"pushed_at":"2019-11-27T17:14:36.000Z","size":429,"stargazers_count":70,"open_issues_count":0,"forks_count":1,"subscribers_count":6,"default_branch":"master","last_synced_at":"2025-04-13T06:53:30.554Z","etag":null,"topics":["rtx","vulkan"],"latest_commit_sha":null,"homepage":"","language":"JavaScript","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/maierfelix.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,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2019-11-11T17:09:32.000Z","updated_at":"2025-03-21T18:57:29.000Z","dependencies_parsed_at":null,"dependency_job_id":"1c64e3f4-7c12-48b2-93ab-9662b5bb74b0","html_url":"https://github.com/maierfelix/momo","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/maierfelix/momo","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/maierfelix%2Fmomo","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/maierfelix%2Fmomo/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/maierfelix%2Fmomo/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/maierfelix%2Fmomo/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/maierfelix","download_url":"https://codeload.github.com/maierfelix/momo/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/maierfelix%2Fmomo/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":265281040,"owners_count":23739860,"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":["rtx","vulkan"],"created_at":"2024-10-14T19:29:27.343Z","updated_at":"2025-07-14T10:40:49.555Z","avatar_url":"https://github.com/maierfelix.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# momo\n\nThis project allows to render photorealistic images. The rendering process is accelerated using NVIDIA's new [RTX technology](https://developer.nvidia.com/rtx), which drastically reduces the necessary time to render high-quality images.\n\n## Screenshots:\n\n| Meet Mat |\n:-------------------------:|\n\u003ca href=\"https://www.youtube.com/watch?v=ZClWLdzJWUg\"\u003e\u003cimg src=\"https://i.imgur.com/b8IoouL.png\" height=\"292\"\u003e\u003c/a\u003e\n\n| Bedroom |\n:-------------------------:|\n\u003ca\u003e\u003cimg src=\"https://i.imgur.com/Sr7mL1W.png\" height=\"282\"\u003e\u003c/a\u003e\n\n| Living Room |\n:-------------------------:|\n\u003ca\u003e\u003cimg src=\"https://i.imgur.com/ThC0mio.png\" height=\"282\"\u003e\u003c/a\u003e\n\nScenes are downloaded from [blendswap](https://www.blendswap.com/)\n\n## TODO:\n\n - Transmissive Material support\n - Glass shader\n - HDR environment probes\n - Optix AI Denoiser (recently got Vulkan interopability)\n - HTML5 based GUI using [*azula*](https://github.com/maierfelix/azula)\n - Validate Clearcoat Parameter\n\n## API:\n\nSee [this](https://github.com/maierfelix/momo/blob/master/main.mjs) file for an example on how to use the API.\n\nTo create a new instance of momo, use:\n\n````js\nlet momo = new Momo();\nawait momo.create();\n````\n\nTo start the path tracing process:\n\n````js\nmomo.execute();\n````\n\n### Loading Resources:\n\n#### Momo.prototype.loadGeometryFile\n\nThis method allows to read a geometry file from a path. Currently there is only support for Wavefront *OBJ* files.\n\n| Name | Type | Description |\n| :--- | :--- | :--- |\n| path | *String* | Path to the geometry file to load |\n\n````js\nlet Quad = momo.loadGeometryFile(\"assets/models/quad.obj\");\n````\n\n#### Momo.prototype.loadTextureFile\n\nThis method allows to read a texture file from a path. There is support for *JPG* and *PNG* files.\n\n| Name | Type | Description |\n| :--- | :--- | :--- |\n| path | *String* | Path to the texture file to load |\n\n````js\nlet Texture = momo.loadTextureFile(\"assets/textures/white.png\");\nlet Texture = momo.loadTextureFile(\"assets/textures/white.jpg\");\n````\n\n#### Momo.prototype.createTextureFromColor\n\nThis method allows to manually create a texture.\n\n| Name | Type | Description |\n| :--- | :--- | :--- |\n| color | *Array* | Array describing the color for the texture |\n| width | *Number* | Width of the texture |\n| height | *Number* | Height of the texture |\n\n````js\nlet RedTexture = momo.createTextureFromColor({\n  color: [255, 0, 0],\n  width: 128,\n  height: 128\n});\n````\n\n### Scene Description:\n\nThere are multiple methods to describe a scene. Note that Momo has an instancing oriented style, meaning that it recommended to re-use geometry and materials.\n\n#### Transforms\n\nA transform has the following layout:\n\n| Name | Type | Description |\n| :--- | :--- | :--- |\n| scale | *Object* | The scaling of an Object |\n| rotation | *Object* | The rotation of an Object (in degree) |\n| translation | *Object* | The translation of an Object |\n\n```js\nlet transform = {\n  scale: { x: 0.0, y: 0.0, z: 0.0 },\n  rotation: { x: 0.0, y: 0.0, z: 0.0 },\n  translation: { x: 0.0, y: 0.0, z: 0.0 }\n};\n```\n\nTransforms are used across multiple locations in the API.\n\n#### Materials\n\n| Name | Type | Description |\n| :--- | :--- | :--- |\n| albedo | *Object* | In *SRGB* space |\n| normal | *Object* | In *SRGB* space |\n| metalRoughness | *Object* | In *SRGB* space, *R-Channel* metalness, *G-Channel* roughness |\n| color | *Array* | |\n| metalness | *Number* |  |\n| specular | *Number* |  |\n| roughness | *Number* |  |\n| specularTint | *Number* |  |\n| sheenTint | *Number* |  |\n| sheen | *Number* |  |\n| clearcoatGloss | *Number* |  |\n| clearcoat | *Number* |  |\n| subsurface | *Number* |  |\n\n```js\n// Material without using textures\nlet Material0 = Demo.addMaterial({\n  color: [248, 122, 122],\n  metalness: 0.175,\n  roughness: 0.1,\n  specular: 0.75,\n  sheen: 0.35,\n  sheenTint: 0.78\n});\n\n// Material with textures\nlet albedo = Demo.loadTextureFile(\"assets/textures/albedo.jpg\");\nlet normal = Demo.loadTextureFile(\"assets/textures/normal.jpg\");\nlet metalRoughness = Demo.loadTextureFile(\"assets/textures/metal_roughness.jpg\");\nlet Material1 = Demo.addMaterial({\n  albedo,\n  normal,\n  metalRoughness,\n  specular: 0.5,\n  sheen: 0.25,\n  sheenTint: 0.38\n});\n```\n\nMaterials are used across multiple locations in the API.\n\n#### Mesh Instancing:\n\nAfter loading a geometry file using *loadGeometryFile*, you can now start adding mesh instances of that geometry to your scene.\n\n| Name | Type | Description |\n| :--- | :--- | :--- |\n| transform | *Object* | An Object describing the transformation of the instance |\n| material | *Object* | Object reference to a material |\n\n```js\nQuad.addMeshInstance({\n  transform,\n  material\n});\n```\n\n#### Emitter Instancing:\n\nSimilar to mesh instancing, you can also add an emitter instance of the geometry which is then interpreted as a light source.\n\n| Name | Type | Description |\n| :--- | :--- | :--- |\n| transform | *Object* | An Object describing the transformation of the instance |\n| material | *Object* | Object reference to a material with only a color property |\n\n```js\nQuad.addEmitterInstance({\n  transform,\n  material\n});\n```\n\nNote that the only valid property of an Emitter's material is a `color` property, which describes the color and the energy of the light (The color isn't clamped to 0-255 range).\n\n```js\nQuad.addEmitterInstance({\n  transform,\n  material: Demo.addMaterial({ color: [800, 600, 400] })\n});\n```\n\n## WebAssembly:\n\nThis project uses the following WebAssembly ports of popular C/C++ libraries:\n\n - [*jpeg-turbo*](https://www.npmjs.com/package/@cwasm/jpeg-turbo) - For reading JPEG files\n - [*lodepng*](https://www.npmjs.com/package/@cwasm/lodepng) - For reading PNG files\n - [*tolw*](https://www.npmjs.com/package/tolw) - For reading OBJ files\n\nNote that when reading large Object or Texture files, the memory usage gets quite high. That's because of a WebAssembly limitation where it's not possible to actually free/shrink WebAssembly memory, you can only grow it. This can be bypassed by e.g. destroying the entire WebAssembly module after each operation.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmaierfelix%2Fmomo","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmaierfelix%2Fmomo","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmaierfelix%2Fmomo/lists"}