-
Notifications
You must be signed in to change notification settings - Fork 158
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
VC demo flying boxes #146
Comments
I’ve encountered this same issue with my own custom renderer, parsing via cgltf. |
If I remember correctly, this is a problem with the source COLLADA model of the conversion. (If possible, it is hoped that the white box will be modified to be transparent for the official glTF sample, as it is a source of confusion.) |
We should probably remove this model from the sample repository until the issue can be fixed, I think. Filed KhronosGroup/glTF-Sample-Assets#71. |
I don't want to remove it too much because I like this model, which has a lot of cool cameras inside it. @javagl Do you have any ideas? |
I do find this to be a good demonstration model, flying boxes
notwithstanding. Perhaps it’s sufficient to add a description to a README
of sorts for this model, until such time that the Collada to GLTF
conversion issue can be addressed.
…On Wed, 21 Oct 2020 at 11:26, cx20 ***@***.***> wrote:
I don't want to remove it too much because I like this model, which has a
lot of cool cameras inside it.
@javagl <https://github.com/javagl> Do you have any ideas?
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub
<#146 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AEV2YYCDTFLIEMM2XWRQKJ3SL2ZNRANCNFSM4ERRT5VA>
.
|
This is an ancient issue. Some context: KhronosGroup/glTF#576 and KhronosGroup/glTF-Sample-Models#8 I also like the model for its complexity with geometry, textures, animations, and ... last but not least, because it is one of the few (if not the only) model that has multiple cameras in it. It would be a pity to remove it. Maybe we can figure out the reason for the boxes. (I'd start with re-generating it from the source if that hasn't been done recently). I wrote up a few points in the second issue linked above, but would definitely need a refresher and a chunk of time to look closer into this. (Adding a comment in the README like "Yeah, there may be some boxes, we're working on that" could be OK, just to make clear that it has this small issue and it might not be the fault of the rendering engine - but I'm not sure about the latter, it has been too long...) |
The idea of adding comments to the README as an interim response sounds like a good one. |
I found white "pbrMetallicRoughness": {
"baseColorFactor": [
1.0,
1.0,
1.0,
1.0
],
"metallicFactor": 0.0
}, I confirmed that the red box is displayed by changing the color of index However, I did not know how to make it transparent. I will have to look into it. (Back to work now that my lunch break is over.) |
Great hint! 😁 I wrote a script to hunt these meshes down, it looks like any material without a texture is "bad". Here's a fixed version of the model... import { Mesh, NodeIO, Primitive, Root } from '@gltf-transform/core';
const io = new NodeIO();
const doc = io.read('../glTF-Sample-Models/2.0/VC/glTF-Binary/VC.glb');
const root = doc.getRoot();
root.listMaterials()
.filter((mat) => !mat.getBaseColorTexture())
.forEach((mat) => {
for (const prim of mat.listParents() as Primitive[]) {
if (prim instanceof Root) continue;
prim.listParents()
.filter((mesh: Mesh) => mesh.listPrimitives().length === 1)
.forEach((mesh) => mesh.dispose());
prim.dispose();
}
mat.dispose();
});
root.listAccessors()
.filter((accessor) => accessor.listParents().length === 1)
.forEach((accessor) => accessor.dispose());
io.write('/Users/donmccurdy/Desktop/VC-fixed.glb', doc); It does leave some empty nodes behind, but they're not rendered at least. We could update the sample directly this way, I guess? But ideally we want to be able to easily reproduce it from the source (COLLADA) model... |
@donmccurdy Thanks! I have confirmed that the white box has been removed in your modified model. I think this model looks good. Your tools are great too. BTW, It's not a big deal, but the camera numbers identified by the Viewer seem to be different from the ones I tested before. |
For what it's worth, I believe that high-quality glTF samples are worth far more than maintaining a collection of raw outputs from this COLLADA2GLTF tool. I'm fine with a Blender project or whatever replacing COLLADA as the source material for this model. The glTF sample repo should show the best-case glTFs, and if that case doesn't come out of this converter raw, so be it. |
(We should still fix the bugs in this converter of course, but the samples for testing that don't need to be in the spotlight over in the sample repo if the output isn't ideal). |
I rechecked @donmccurdy' modified VC-fixed.glb model and noticed that in addition to the
|
Hm, is the jet supposed to have an opaque grey windshield hiding that detailed interior? 😅 I guess ideally the windshields would use alpha blend? Or even transmission, but that seems a bit too high-fidelity for this scene. The model could use some help from a technical artist, perhaps. One more issue raised in KhronosGroup/glTF#1982, the model has an occlusion texture that it probably shouldn't. |
^Continuing discussion in KhronosGroup/glTF-Sample-Assets#71. |
Moving this issue over from KhronosGroup/glTF#576 —
We're not sure if the issue is in the underlying COLLADA model or COLLADA2GLTF, but the VC sample model has boxes attached to many nodes:
Issue appears in both three.js and BabylonJS.
The text was updated successfully, but these errors were encountered: