-
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
glTF 2.0 #20
glTF 2.0 #20
Conversation
Yes, this will not output 1.0. I think keeping the old converter as a 1.0 branch is a good solution. |
From the outset the code looks really nice and organized. Before getting too deep into the code I tried out some different cases and had some notes: README notes:
Other notes:
|
Agreed
Good catch
What do you mean by this?
The way it is now, this is very doable. I've been shopping around for a modern c++ argument parsing library with low overhead, and I'll keep this in mind while I'm looking. I will make this change to the existing code though.
Agreed
Agreed
I'm using OpenCOLLADA for most URI resolution so I'll take a look and make sure it is doing what it is supposed to be doing. If not, it would be pretty straightforward to add a few small path utilities to make the output more uniform.
Agreed
Yes that is part of the spec as far as I'm aware since we don't reference by id anymore.
When is this happening? This was written to match the 1.0 KHR_materials_common in the current sample models. As far as I know 2.0 KHR_materials_common hasn't converged yet.
Good catch
Yes it should be removed.
Agreed.
I was working off of what was currently merged into the 2.0 spec branch. Looking now, it looks like this change hasn't been made yet. This will definitely change, especially given that objects don't have ids anymore so the buffer can't be found by name
I haven't done Cesium Air. Do we want to add it to the sample models?
We do actually, but not the ids. Maybe we should set the name to the id if a collada name isn't present.
Right now it does not. I'm not totally clear on when this, or the invert transparency code is necessary, so currently it is omitted. If I have a test case, I will add support.
What model is this happening in? That is not expected behavior |
@lasalvavida great progress! @lilleyse great review.
This is getting close, just small changes from the extension: KhronosGroup/glTF#828 |
* Added argparse to gitmodules * Fixed tests * Added travis config * Use https submodules for travis build * Just build for now * cmake needs a dir * Do directory management in script * Use more recent cmake * Added Travis badge to README * Fixed glTF logo * Update README.md * Run Unit tests in Travis * Fix CMake test build * Build before testing * Use c++11 * Force gcc and g++ version * Use ceil instead of std::ceil for compatibility * Add cmath and remove redundant base64 chars * Include algorithm header * include cmath header * Added lstdc++fs compile flag * Use gcc and g++ 5.3 * gcc-5 ? * Fix env version * Use fopen * Install libstdc++fs package * So close * Try to fix linker error * Update README.md * Update README.md * Update README.md * Build libCOLLADA2GLTF and COLLADA2GLTF-bin * Fix windows build * First cut at automatic release builds * master -> current to avoid confusion * Tweaked travis git commands * Second try * Only modify tag from master and only zip binaries in current * Third times the charm * Added space to if block * Split up the two if blocks * Add semicolons to if-blocked commands * Try to fix deploy key * A few tweaks, zip instead of tar.gz * Junk paths on deployed zip * Fix windows release build and add appveyor config * Rename build-dir, it already exists on appveyor * Prevent build dir collisions * Use bash env variables * Try cmake-build * Semicolons * Try separate lines * Recurse submodules * Fixed yaml syntax * Try it in the install section * Use https for submodules * Clean up regex * Call through powershell * Don't escape slashes * Preserve encoding * Work out of cmake-build * Specify generator for cmake * Put generator in the right place * Different generators for x86 and x64 * Put generator first * Platform should be Win32 not x86 * Fix variables for test_script * Needs a dot slash * Try it without the echo * Backslashes * Try variable syntax * Use cmd for test script * Fix variables * Use powershell for tests? * Try just bin * Alright, let's try this * I think I've got it this time * Don't need to prepend cmake-build * Variables in quotes * Try with cmd * Escape backslashes * Clean yaml * Make artifacts for all builds * Fix 7z command * Fix built-zip path * Bundle each lib * Fix a typo * Should be arparse.lib * Added build badges, hopefully fixed deploy * Put current build on 'latest' tag; caching * Updated README, fixed caching for appveyor * Gitmodules change was unnecessary * Just cache build, caching raw dependencies doesn't make sense since we have download them anyway * Check if cmake-build exists * Reload cache on appveyor changes as well * Make CI compatible with 1.0 branch * Update README.md * Windows: copy files before zipping to junk paths * Add release to zips to avoid naming collision * Fix flags order * Double escape for * Missed a percent sign * Fix hardcoded branch string * Missing semicolon * Cleaning up some warnings * Fixes for binary GLTF and better handling of textures * Fix build
Updated. I addressed most of your comments. Binary glTF 2.0 spec has been merged, and this has been updated to match. I'm using std::filesystem::path for path operations; output directories will be created, and referenced files will always be created in the same directory as the glTF, so separator characters don't need to be considered. I've added argparse, a lightweight argument parser, so this now has a nice clean help and usage message. You can pass input and output files implicitly without the flags. If a collada name is not present for nodes, materials, or meshes, the collada original id will be set as the name. Fixed the binary and separate crash. If an image cannot be resolved, the name of the image file is placed as the uri, and conversion continues. Still TODO KHR_materials_common and PBR spec changes (i.e. GLSL will probably be an extension) once they converge completely. |
Oh this also includes an appveyor and travis config from my fork for CI. The secure keys will have to be updated to run on here if we want to enable that. |
Thanks @lasalvavida. Can you please merge in master? What do you think about replacing this with a new PR that merges into a new |
I am closing this PR as I've created a 2.0 branch that we will do final review on when it is time to replace the 1.0 converter. |
The build for the 2.0 branch is not working right now.
|
Thanks @lilleyse, it looks like I lost the OpenCOLLADA submodule in the migration. I've added it back now, and the build is working for me; let me know if you still have any issues. |
All good now, thanks for the quick fix 👍 |
Large-scale refactor for glTF 2.0 support in the C++ model converter. Note: 2.0 is still changing and this PR will likely change a bit more before it is finalized.
Sample models seem to be in good shape coming through this so far; code-base is much more modular and maintainable.
Adds support for binary glTF export as well.
@pjcozzi, @lexaknyazev