-
Notifications
You must be signed in to change notification settings - Fork 250
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
Added KHR_materials_common materials/techniques/shaders to addDefaults #55
Conversation
…e addDefaults stage.
@lilleyse can you please do an initial review here? |
…ith empty string uris
Updated. When testing assimp exported gltf (gltf without techniques) we ran into a problem where cesium's Unfortunately assimp exported gltfs still don't seem to work, but the test case we've been using is also weird. It has buffer views for indices, positions, normals, and uvs but they all point at the same buffer and all have offset 0. Very strange. See attached. |
For assimp, have you tried just the box COLLADA model, https://github.com/KhronosGroup/glTF/tree/master/sampleModels/Box/collada |
I gave it a try, but it seems to have the same problem with the bufferViews. It actually runs into the same error in the pipeline and when I try to view it in the online COLLADA to glTF convertor. |
What about using a simple OBJ file with assimp, perhaps from https://github.com/SaschaWillems/Vulkan/tree/master/models Just trying to understand if it is the assimp importer or assimp glTF exporter. |
I tried it with a basic cube and with hammardillo, but it seems to be the same problem, |
I'm pretty sure it's in the assimp gltf exporter. I'm going to try and take a look at their code. |
If you figure it out in a reasonable amount of time, open a pull request; otherwise, some an issue to the assimp repo and include sample data and simple instructions to reproduce it. |
@@ -0,0 +1,300 @@ | |||
"use strict"; |
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.
Talked offline, but you use Cesium's defined
, defaultValue
, and WebGLConstants
instead for modelMaterialsCommon
.
…onstants, adjusted some KHR_materials_common items, fixed some logic errors
Ok. Updated! |
Nice, looks good! |
@pjcozzi this is ready whenever you want to look |
typeof(value[3]) === 'number') { | ||
return value; | ||
} | ||
} |
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.
To follow our style guide, just write
return [0, 0, 0, 1];
And drop the else
; it is not needed.
Looks like test coverage could be improve a good bit: https://coveralls.io/github/AnalyticalGraphicsInc/gltf-pipeline?branch=materialsStageKHR |
…increase coverage and validity.
Updated! Apparently I misunderstood |
@lilleyse please merge when ready. |
Looks ready to me. |
I deleted the branch. @lilleyse please delete branches after merging just like the Cesium repo. |
Ah forgot, thanks! |
@JoshuaStorm and I wrote this to have
defaultMaterials
try to match the existing gltf material values to one of theKHR_materials_common
materials, apply the appropriate extension, and then pass the gltf tomodelMaterialsCommon
at the end ofaddDefaults
.Also added some tests to
addDefaultsSpec
.See #1