Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
51 changes: 41 additions & 10 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,15 +1,42 @@
<p align="center">
<a href="https://mtlx.ben3d.ca" target="_blank" rel="noopener noreferrer">
<img alt="mtlx logo" src="https://raw.githubusercontent.com/bhouston/mtlx/main/assets/logo.webp" height="96">
</a>
</p>
<br/>
<p align="center">
<a href="https://npmjs.com/package/mtlx-core"><img src="https://img.shields.io/npm/v/mtlx-core.svg" alt="npm package"></a>
<a href="https://www.npmtrends.com/mtlx-core"><img src="https://img.shields.io/npm/dw/mtlx-core.svg" alt="npm downloads"></a>
<a href="https://codecov.io/gh/bhouston/mtlx"><img src="https://codecov.io/gh/bhouston/mtlx/branch/main/graph/badge.svg" alt="coverage"></a>
<a href="https://discord.gg/wzQWaBBxup"><img src="https://img.shields.io/badge/chat-discord-blue?style=flat&logo=discord" alt="discord chat"></a>
<a href="https://mtlx.ben3d.ca/docs/"><img src="https://img.shields.io/badge/docs-read-blue?style=flat" alt="documentation"></a>
</p>
<br/>

# mtlx

<img src="https://raw.githubusercontent.com/bhouston/mtlx/main/assets/logo.webp" alt="mtlx logo" width="96">
> View, edit, validate, and ship MaterialX materials on the web.

- 🎨 Interactive 3D Material Preview
- 🧩 Drop-In Web Component
- 🕸️ Node Graph Editing
- ✅ Validation and Inspection
- 📦 Portable `.mtlx.zip` Packages
- 💻 CLI and VS Code Extension

mtlx is a set of TypeScript and JavaScript tools for working with [MaterialX](https://materialx.org) materials. Work with loose `.mtlx` files or portable `.mtlx.zip` archives in the browser, terminal, or VS Code.

[![Documentation](https://img.shields.io/badge/docs-website-blue)](https://mtlx.ben3d.ca/docs/)
[![CI](https://github.com/bhouston/mtlx/actions/workflows/ci.yml/badge.svg)](https://github.com/bhouston/mtlx/actions/workflows/ci.yml)
[![npm downloads](https://img.shields.io/npm/dm/mtlx-core.svg)](https://www.npmjs.com/package/mtlx-core)
[![npm version](https://img.shields.io/npm/v/mtlx-core.svg)](https://www.npmjs.com/package/mtlx-core)
[![Coverage](https://codecov.io/gh/bhouston/mtlx/branch/main/graph/badge.svg)](https://codecov.io/gh/bhouston/mtlx)
[![Discord](https://img.shields.io/badge/discord-join-5865F2?logo=discord&logoColor=white)](https://discord.gg/wzQWaBBxup)
[Read the Docs to Learn More](https://mtlx.ben3d.ca/docs/).

TypeScript and JavaScript tools for viewing, editing, validating, and delivering [MaterialX](https://materialx.org) materials. Work with loose `.mtlx` files or portable `.mtlx.zip` archives in the browser, terminal, or VS Code.
## Packages

| Package | Version (click for changelogs) |
| -------------------------------------------------- | :---------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| [mtlx-core](packages/core) | [![mtlx-core version](https://img.shields.io/npm/v/mtlx-core.svg?label=%20)](https://github.com/bhouston/mtlx/releases) |
| [mtlx-viewer](packages/viewer) | [![mtlx-viewer version](https://img.shields.io/npm/v/mtlx-viewer.svg?label=%20)](https://github.com/bhouston/mtlx/releases) |
| [mtlx-cli](packages/cli) | [![mtlx-cli version](https://img.shields.io/npm/v/mtlx-cli.svg?label=%20)](https://github.com/bhouston/mtlx/releases) |
| [mtlx-sdk](packages/sdk) | [![mtlx-sdk version](https://img.shields.io/npm/v/mtlx-sdk.svg?label=%20)](https://github.com/bhouston/mtlx/releases) |
| [mtlx-vscode-extension](packages/vscode-extension) | [![mtlx-vscode-extension version](https://img.shields.io/open-vsx/v/benhouston3d/mtlx-vscode-extension.svg?label=%20)](https://github.com/bhouston/mtlx/releases) |

[Try the viewer](https://mtlx.ben3d.ca/viewer/) · [Open the editor](https://mtlx.ben3d.ca/editor/) · [Get started](https://mtlx.ben3d.ca/docs/quick-start/)

Expand Down Expand Up @@ -53,9 +80,13 @@ mtlx transform material.mtlx -o material.mtlx.zip --profile web

Node tools require Node.js 22+. Browser rendering needs GPU-backed WebGPU or WebGL2. Validation covers selected document rules; preview support follows Three.js's MaterialX loader.

## Contribute
## Releases

See [RELEASING.md](RELEASING.md) for release instructions.

## Contribution

Read [CONTRIBUTING.md](CONTRIBUTING.md) for setup and the issue → branch → PR workflow. Full guides and API references live on the [documentation website](https://mtlx.ben3d.ca/docs/); release instructions are in [RELEASING.md](RELEASING.md).
See [Contributing Guide](CONTRIBUTING.md).

## License

Expand Down
36 changes: 28 additions & 8 deletions packages/cli/README.md
Original file line number Diff line number Diff line change
@@ -1,15 +1,31 @@
<p align="center">
<a href="https://mtlx.ben3d.ca" target="_blank" rel="noopener noreferrer">
<img alt="mtlx logo" src="https://raw.githubusercontent.com/bhouston/mtlx/main/assets/logo.webp" height="96">
</a>
</p>
<br/>
<p align="center">
<a href="https://npmjs.com/package/mtlx-cli"><img src="https://img.shields.io/npm/v/mtlx-cli.svg" alt="npm package"></a>
<a href="https://www.npmtrends.com/mtlx-cli"><img src="https://img.shields.io/npm/dw/mtlx-cli.svg" alt="npm downloads"></a>
<a href="https://codecov.io/gh/bhouston/mtlx"><img src="https://codecov.io/gh/bhouston/mtlx/branch/main/graph/badge.svg" alt="coverage"></a>
<a href="https://discord.gg/wzQWaBBxup"><img src="https://img.shields.io/badge/chat-discord-blue?style=flat&logo=discord" alt="discord chat"></a>
<a href="https://mtlx.ben3d.ca/docs/cli/"><img src="https://img.shields.io/badge/docs-read-blue?style=flat" alt="documentation"></a>
</p>
<br/>

# mtlx-cli

<img src="https://raw.githubusercontent.com/bhouston/mtlx/main/assets/logo.webp" alt="mtlx logo" width="96">
> Inspect, validate, preview, and package MaterialX from your terminal.

- ✅ Validate Materials
- 👀 Preview in a Browser
- 📦 Package for the Web
- 🖼️ Render PNG Previews
- ☁️ MTLX.ai Hosted Materials

[![npm](https://img.shields.io/npm/v/mtlx-cli.svg)](https://www.npmjs.com/package/mtlx-cli)
[![Documentation](https://img.shields.io/badge/docs-website-blue)](https://mtlx.ben3d.ca/docs/cli/)
[![CI](https://github.com/bhouston/mtlx/actions/workflows/ci.yml/badge.svg)](https://github.com/bhouston/mtlx/actions/workflows/ci.yml)
[![npm downloads](https://img.shields.io/npm/dm/mtlx-cli.svg)](https://www.npmjs.com/package/mtlx-cli)
[![Coverage](https://codecov.io/gh/bhouston/mtlx/branch/main/graph/badge.svg)](https://codecov.io/gh/bhouston/mtlx)
[![Discord](https://img.shields.io/badge/discord-join-5865F2?logo=discord&logoColor=white)](https://discord.gg/wzQWaBBxup)
Includes the `mtlx` and `mtlx-ai` commands for local files and the MTLX.ai service.

Inspect, validate, preview, and package MaterialX from your terminal. Includes the `mtlx` and `mtlx-ai` commands for local files and the MTLX.ai service.
[Read the Docs to Learn More](https://mtlx.ben3d.ca/docs/cli/).

```sh
npm install --global mtlx-cli
Expand Down Expand Up @@ -42,6 +58,10 @@ mtlx download alice/copper -o copper.mtlx.zip

Read the [CLI guide](https://mtlx.ben3d.ca/docs/cli/) for conversion workflows and options, or the [agent guide](https://mtlx.ben3d.ca/docs/agents/) for MCP integration. Run `mtlx --help` or `mtlx <command> --help` for terminal help.

## Contribution

See [Contributing Guide](https://github.com/bhouston/mtlx/blob/main/CONTRIBUTING.md).

## License

MIT
Expand Down
36 changes: 28 additions & 8 deletions packages/core/README.md
Original file line number Diff line number Diff line change
@@ -1,15 +1,31 @@
<p align="center">
<a href="https://mtlx.ben3d.ca" target="_blank" rel="noopener noreferrer">
<img alt="mtlx logo" src="https://raw.githubusercontent.com/bhouston/mtlx/main/assets/logo.webp" height="96">
</a>
</p>
<br/>
<p align="center">
<a href="https://npmjs.com/package/mtlx-core"><img src="https://img.shields.io/npm/v/mtlx-core.svg" alt="npm package"></a>
<a href="https://www.npmtrends.com/mtlx-core"><img src="https://img.shields.io/npm/dw/mtlx-core.svg" alt="npm downloads"></a>
<a href="https://codecov.io/gh/bhouston/mtlx"><img src="https://codecov.io/gh/bhouston/mtlx/branch/main/graph/badge.svg" alt="coverage"></a>
<a href="https://discord.gg/wzQWaBBxup"><img src="https://img.shields.io/badge/chat-discord-blue?style=flat&logo=discord" alt="discord chat"></a>
<a href="https://mtlx.ben3d.ca/docs/core/"><img src="https://img.shields.io/badge/docs-read-blue?style=flat" alt="documentation"></a>
</p>
<br/>

# mtlx-core

<img src="https://raw.githubusercontent.com/bhouston/mtlx/main/assets/logo.webp" alt="mtlx logo" width="96">
> Parse, validate, package, and transform MaterialX in TypeScript.

- 🌐 Browser and Node Support
- ✅ Document Validation Reports
- 📦 `.mtlx.zip` Packaging
- 🖼️ Texture Resizing and Conversion
- 🕸️ Headless Graph Editing

[![npm](https://img.shields.io/npm/v/mtlx-core.svg)](https://www.npmjs.com/package/mtlx-core)
[![Documentation](https://img.shields.io/badge/docs-website-blue)](https://mtlx.ben3d.ca/docs/core/)
[![CI](https://github.com/bhouston/mtlx/actions/workflows/ci.yml/badge.svg)](https://github.com/bhouston/mtlx/actions/workflows/ci.yml)
[![npm downloads](https://img.shields.io/npm/dm/mtlx-core.svg)](https://www.npmjs.com/package/mtlx-core)
[![Coverage](https://codecov.io/gh/bhouston/mtlx/branch/main/graph/badge.svg)](https://codecov.io/gh/bhouston/mtlx)
[![Discord](https://img.shields.io/badge/discord-join-5865F2?logo=discord&logoColor=white)](https://discord.gg/wzQWaBBxup)
The root API works with bytes and text in browsers and Node. Filesystem and texture-processing helpers use separate Node-only imports.

Parse, validate, package, and transform MaterialX in TypeScript or JavaScript. The root API works with bytes and text in browsers and Node; filesystem and texture-processing helpers use separate Node-only imports.
[Read the Docs to Learn More](https://mtlx.ben3d.ca/docs/core/).

```sh
npm install mtlx-core
Expand Down Expand Up @@ -41,6 +57,10 @@ Node.js 22+ is required for Node helpers. Installing the package includes native

See the [core guide](https://mtlx.ben3d.ca/docs/core/) for the document model, headless graph editing, transforms, and [API reference](https://mtlx.ben3d.ca/docs/api/core/).

## Contribution

See [Contributing Guide](https://github.com/bhouston/mtlx/blob/main/CONTRIBUTING.md).

## License

MIT
Expand Down
36 changes: 28 additions & 8 deletions packages/sdk/README.md
Original file line number Diff line number Diff line change
@@ -1,15 +1,31 @@
<p align="center">
<a href="https://mtlx.ben3d.ca" target="_blank" rel="noopener noreferrer">
<img alt="mtlx logo" src="https://raw.githubusercontent.com/bhouston/mtlx/main/assets/logo.webp" height="96">
</a>
</p>
<br/>
<p align="center">
<a href="https://npmjs.com/package/mtlx-sdk"><img src="https://img.shields.io/npm/v/mtlx-sdk.svg" alt="npm package"></a>
<a href="https://www.npmtrends.com/mtlx-sdk"><img src="https://img.shields.io/npm/dw/mtlx-sdk.svg" alt="npm downloads"></a>
<a href="https://codecov.io/gh/bhouston/mtlx"><img src="https://codecov.io/gh/bhouston/mtlx/branch/main/graph/badge.svg" alt="coverage"></a>
<a href="https://discord.gg/wzQWaBBxup"><img src="https://img.shields.io/badge/chat-discord-blue?style=flat&logo=discord" alt="discord chat"></a>
<a href="https://mtlx.ben3d.ca/docs/sdk/"><img src="https://img.shields.io/badge/docs-read-blue?style=flat" alt="documentation"></a>
</p>
<br/>

# mtlx-sdk

<img src="https://raw.githubusercontent.com/bhouston/mtlx/main/assets/logo.webp" alt="mtlx logo" width="96">
> Typed TypeScript client for the MTLX.ai REST API.

- 🔎 Search Hosted Materials
- ⬆️ Upload Packages
- 👤 Users, Comments, Notifications
- 🧰 Standalone Functions
- 🟦 Fully Typed

[![npm](https://img.shields.io/npm/v/mtlx-sdk.svg)](https://www.npmjs.com/package/mtlx-sdk)
[![Documentation](https://img.shields.io/badge/docs-website-blue)](https://mtlx.ben3d.ca/docs/sdk/)
[![CI](https://github.com/bhouston/mtlx/actions/workflows/ci.yml/badge.svg)](https://github.com/bhouston/mtlx/actions/workflows/ci.yml)
[![npm downloads](https://img.shields.io/npm/dm/mtlx-sdk.svg)](https://www.npmjs.com/package/mtlx-sdk)
[![Coverage](https://codecov.io/gh/bhouston/mtlx/branch/main/graph/badge.svg)](https://codecov.io/gh/bhouston/mtlx)
[![Discord](https://img.shields.io/badge/discord-join-5865F2?logo=discord&logoColor=white)](https://discord.gg/wzQWaBBxup)
A JavaScript and TypeScript client for the [MTLX.ai](https://mtlx.ai) REST API, built from standalone functions.

Typed JavaScript and TypeScript client for the [MTLX.ai](https://mtlx.ai) REST API. Search hosted materials, upload packages, and work with users, comments, and notifications through standalone functions.
[Read the Docs to Learn More](https://mtlx.ben3d.ca/docs/sdk/).

```sh
npm install mtlx-sdk
Expand All @@ -25,6 +41,10 @@ console.log(assets);

Keep secret tokens on the server. See the [SDK guide](https://mtlx.ben3d.ca/docs/sdk/) for authentication, uploads, schemas, and the [API reference](https://mtlx.ben3d.ca/docs/api/sdk/).

## Contribution

See [Contributing Guide](https://github.com/bhouston/mtlx/blob/main/CONTRIBUTING.md).

## License

MIT
Expand Down
36 changes: 28 additions & 8 deletions packages/viewer/README.md
Original file line number Diff line number Diff line change
@@ -1,15 +1,31 @@
<p align="center">
<a href="https://mtlx.ben3d.ca" target="_blank" rel="noopener noreferrer">
<img alt="mtlx logo" src="https://raw.githubusercontent.com/bhouston/mtlx/main/assets/logo.webp" height="96">
</a>
</p>
<br/>
<p align="center">
<a href="https://npmjs.com/package/mtlx-viewer"><img src="https://img.shields.io/npm/v/mtlx-viewer.svg" alt="npm package"></a>
<a href="https://www.npmtrends.com/mtlx-viewer"><img src="https://img.shields.io/npm/dw/mtlx-viewer.svg" alt="npm downloads"></a>
<a href="https://codecov.io/gh/bhouston/mtlx"><img src="https://codecov.io/gh/bhouston/mtlx/branch/main/graph/badge.svg" alt="coverage"></a>
<a href="https://discord.gg/wzQWaBBxup"><img src="https://img.shields.io/badge/chat-discord-blue?style=flat&logo=discord" alt="discord chat"></a>
<a href="https://mtlx.ben3d.ca/docs/material-viewer/"><img src="https://img.shields.io/badge/docs-read-blue?style=flat" alt="documentation"></a>
</p>
<br/>

# mtlx-viewer

<img src="https://raw.githubusercontent.com/bhouston/mtlx/main/assets/logo.webp" alt="mtlx logo" width="96">
> Embed interactive MaterialX previews in any website.

- 🧩 `<material-viewer>` Web Component
- ⚛️ Optional React Wrapper
- 🎥 Orbit Controls and Lighting
- 🎛️ Built-In Settings Panel
- 📸 Screenshot Export

[![npm](https://img.shields.io/npm/v/mtlx-viewer.svg)](https://www.npmjs.com/package/mtlx-viewer)
[![Documentation](https://img.shields.io/badge/docs-website-blue)](https://mtlx.ben3d.ca/docs/material-viewer/)
[![CI](https://github.com/bhouston/mtlx/actions/workflows/ci.yml/badge.svg)](https://github.com/bhouston/mtlx/actions/workflows/ci.yml)
[![npm downloads](https://img.shields.io/npm/dm/mtlx-viewer.svg)](https://www.npmjs.com/package/mtlx-viewer)
[![Coverage](https://codecov.io/gh/bhouston/mtlx/branch/main/graph/badge.svg)](https://codecov.io/gh/bhouston/mtlx)
[![Discord](https://img.shields.io/badge/discord-join-5865F2?logo=discord&logoColor=white)](https://discord.gg/wzQWaBBxup)
Works in plain HTML and any framework. Load one script from a CDN or import it from npm, then add the element.

Embed interactive MaterialX previews in any website with `<material-viewer>`. Works in plain HTML and any framework, with orbit controls, lighting, a settings panel, loading progress, and screenshot export. React is optional.
[Read the Docs to Learn More](https://mtlx.ben3d.ca/docs/material-viewer/).

## Plain HTML

Expand Down Expand Up @@ -48,6 +64,10 @@ import { MaterialViewer } from 'mtlx-viewer/react';

See the [element guide and live demo](https://mtlx.ben3d.ca/docs/material-viewer/) for attributes, events, camera controls, and screenshots, or the [viewer integration guide](https://mtlx.ben3d.ca/docs/viewer/) for React and lower-level Three.js APIs. Preview support follows Three.js's MaterialX loader.

## Contribution

See [Contributing Guide](https://github.com/bhouston/mtlx/blob/main/CONTRIBUTING.md).

## License

MIT
Expand Down
34 changes: 28 additions & 6 deletions packages/vscode-extension/README.md
Original file line number Diff line number Diff line change
@@ -1,13 +1,31 @@
<p align="center">
<a href="https://mtlx.ben3d.ca" target="_blank" rel="noopener noreferrer">
<img alt="mtlx logo" src="https://raw.githubusercontent.com/bhouston/mtlx/main/assets/logo.webp" height="96">
</a>
</p>
<br/>
<p align="center">
<a href="https://marketplace.visualstudio.com/items?itemName=benhouston3d.mtlx-vscode-extension"><img src="https://img.shields.io/open-vsx/v/benhouston3d/mtlx-vscode-extension.svg" alt="open vsx version"></a>
<a href="https://open-vsx.org/extension/benhouston3d/mtlx-vscode-extension"><img src="https://img.shields.io/open-vsx/dt/benhouston3d/mtlx-vscode-extension.svg" alt="open vsx downloads"></a>
<a href="https://codecov.io/gh/bhouston/mtlx"><img src="https://codecov.io/gh/bhouston/mtlx/branch/main/graph/badge.svg" alt="coverage"></a>
<a href="https://discord.gg/wzQWaBBxup"><img src="https://img.shields.io/badge/chat-discord-blue?style=flat&logo=discord" alt="discord chat"></a>
<a href="https://mtlx.ben3d.ca/docs/vscode/"><img src="https://img.shields.io/badge/docs-read-blue?style=flat" alt="documentation"></a>
</p>
<br/>

# Mtlx Viewer for MaterialX

<img src="https://raw.githubusercontent.com/bhouston/mtlx/main/assets/logo.webp" alt="mtlx logo" width="96">
> Preview, inspect, and package MaterialX inside VS Code.

- 🎨 Interactive 3D Preview
- 🕸️ Node Graph Tab
- ✅ Validation Report
- 🔄 Refreshes on Save
- 📦 Pack and Unpack `.mtlx.zip`

[![Documentation](https://img.shields.io/badge/docs-website-blue)](https://mtlx.ben3d.ca/docs/vscode/)
[![CI](https://github.com/bhouston/mtlx/actions/workflows/ci.yml/badge.svg)](https://github.com/bhouston/mtlx/actions/workflows/ci.yml)
[![Coverage](https://codecov.io/gh/bhouston/mtlx/branch/main/graph/badge.svg)](https://codecov.io/gh/bhouston/mtlx)
[![Discord](https://img.shields.io/badge/discord-join-5865F2?logo=discord&logoColor=white)](https://discord.gg/wzQWaBBxup)
Open `.mtlx` or `.mtlx.zip` files for an interactive 3D preview, node graph, and validation report. Saving a material or its textures refreshes the preview.

Preview, inspect, and package MaterialX without leaving VS Code. Open `.mtlx` or `.mtlx.zip` files for an interactive 3D preview, node graph, and validation report. Saving a material or its textures refreshes the preview.
[Read the Docs to Learn More](https://mtlx.ben3d.ca/docs/vscode/).

![Material preview and node graph in VS Code](https://raw.githubusercontent.com/bhouston/mtlx/main/assets/extension.gif)

Expand All @@ -21,6 +39,10 @@ Requires desktop VS Code 1.85+ with GPU acceleration. Preview support follows Th

See the [extension guide](https://mtlx.ben3d.ca/docs/vscode/) for settings, custom lighting and models, conversion workflows, and troubleshooting.

## Contribution

See [Contributing Guide](https://github.com/bhouston/mtlx/blob/main/CONTRIBUTING.md).

## License

MIT
Expand Down
Loading