-
Notifications
You must be signed in to change notification settings - Fork 53
Support compressed meshes via meshopt #190
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Reviewable status: 0 of 8 files reviewed, 1 unresolved discussion
src/index.js
line 10 at r1 (raw file):
import {GLTFLoader} from 'three/examples/jsm/loaders/GLTFLoader.js'; import {KTX2Loader} from 'three/examples/jsm/loaders/KTX2Loader.js'; import {MeshoptDecoder} from 'three/examples/jsm/libs/meshopt_decoder.module.js';
This file has a different license than threejs (three has vendored it).
The license is suitable and compatible (MIT license), but it does require that we redistribute the license text when we redistribute the code. (See https://github.com/zeux/meshoptimizer/blob/master/LICENSE.md.)
Therefore, somehow or another, we need to get that license text into the THIRD_PARTY_LICENSES.json summary file.
Possibly it would be easier to pull in the decoder directly from our package.json
somehow, instead of the three copy? I don't know.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Reviewable status: 0 of 8 files reviewed, 3 unresolved discussions (waiting on @wrangelvid)
a discussion (no related file):
Digging into the API, I guess this is adding support for the EXT_meshopt_compression
extension documented at https://github.com/KhronosGroup/glTF/blob/main/extensions/2.0/Vendor/EXT_meshopt_compression/README.md.
We should at least mention the extension name in the commit message.
test/meshfile_object_gltf.html
line 15 at r1 (raw file):
var viewer = new MeshCat.Viewer(document.getElementById("meshcat-pane")); let gltf_contents = `
Meshcat needs to support glTF files both with and without the meshopt compression. Therefore, this PR should add a new test case, not remove any existing test cases.
There is an existing test case meshfile_object_gltf_optimized
which was added for testing a different compression extension (KHR_texture_basisu). Now that we have two different compression schemes in play, probably that test case should be renamed for clarity.
da184d4
to
ba41585
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Reviewable status: 0 of 10 files reviewed, 1 unresolved discussion (waiting on @jwnimmer-tri)
a discussion (no related file):
Previously, jwnimmer-tri (Jeremy Nimmer) wrote…
Digging into the API, I guess this is adding support for the
EXT_meshopt_compression
extension documented at https://github.com/KhronosGroup/glTF/blob/main/extensions/2.0/Vendor/EXT_meshopt_compression/README.md.We should at least mention the extension name in the commit message.
Done.
src/index.js
line 10 at r1 (raw file):
Previously, jwnimmer-tri (Jeremy Nimmer) wrote…
This file has a different license than threejs (three has vendored it).
The license is suitable and compatible (MIT license), but it does require that we redistribute the license text when we redistribute the code. (See https://github.com/zeux/meshoptimizer/blob/master/LICENSE.md.)
Therefore, somehow or another, we need to get that license text into the THIRD_PARTY_LICENSES.json summary file.
Possibly it would be easier to pull in the decoder directly from our
package.json
somehow, instead of the three copy? I don't know.
Done.
test/meshfile_object_gltf.html
line 15 at r1 (raw file):
Previously, jwnimmer-tri (Jeremy Nimmer) wrote…
Meshcat needs to support glTF files both with and without the meshopt compression. Therefore, this PR should add a new test case, not remove any existing test cases.
There is an existing test case
meshfile_object_gltf_optimized
which was added for testing a different compression extension (KHR_texture_basisu). Now that we have two different compression schemes in play, probably that test case should be renamed for clarity.
Done.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This seems good on paper now.
Reviewed 1 of 8 files at r1, 9 of 9 files at r2, all commit messages.
Reviewable status:complete! all files reviewed, all discussions resolved (waiting on @wrangelvid)
ba41585
to
5f343d5
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Reviewed 1 of 1 files at r3, all commit messages.
Reviewable status: all files reviewed, 2 unresolved discussions (waiting on @wrangelvid)
a discussion (no related file):
Working
The Drake bump RobotLocomotion/drake#22935 needs to be approved prior to merging this PR.
a discussion (no related file):
Working
I need to cross-check that I can repro the minified dist file locally.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Reviewed all commit messages.
Reviewable status: all files reviewed, 2 unresolved discussions (waiting on @wrangelvid)
Let's wait on #189 before merging this.
This change is