Skip to content

Commit

Permalink
Updated readme to include mesh encoder example
Browse files Browse the repository at this point in the history
  • Loading branch information
gwihlidal committed Jan 13, 2019
1 parent d91e0c9 commit cfa5094
Showing 1 changed file with 14 additions and 1 deletion.
15 changes: 14 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -34,12 +34,25 @@ extern crate meshopt;

## Example

Currently there is only a single monolithic `demo` example, which runs nearly the entire feature matrix. In the near future I will make a straight forward `tool` example that shows the minimal calls to perform mesh optimization in a typical game engine pipeline. In `demo`, the `opt_complete` routine is the approach to get 100% optimal GPU performance. Further CPU improvements can be chosen through the various packing and encoding routines.
### demo

This is a single monolithic `demo` example, which runs nearly the entire feature matrix. In `demo`, the `opt_complete` routine is the approach to get 100% optimal GPU performance. Further CPU improvements can be chosen through the various packing and encoding routines.

```shell
cargo run --release --example demo
```

### encoder

The `encoder` example shows the minimal calls to perform mesh optimization in a typical game engine pipeline, and serializes the mesh into a format that is compatible with the WebAssembly loader and THREE.js viewer experiment that exists in the `meshoptimizer` repository.

* https://github.com/zeux/meshoptimizer/blob/master/tools/OptMeshLoader.js
* https://github.com/zeux/meshoptimizer/blob/master/demo/index.html

```shell
cargo run --release --example encoder -- --input pirate.obj --output pirate.optmesh
```

## Pipeline

When optimizing a mesh, you should typically feed it through a set of optimizations (the order is important!):
Expand Down

0 comments on commit cfa5094

Please sign in to comment.