gltf-insight
is a C++11 based data insight tool for glTF 2.0 model.
For example, you can display and tweak animation prameters this tool(since glTF 2.0 spec does not allow ASCII serialization for animation parameters)
gltf-insight
also could be another reference viewer for glTF animation and PBR shading.
More to say, gltf-insight
also could be used for playground and reference implementation for your glTF extension.
gltf-insight
uses TinyGLTF for load/save glTF model and ImGUI for GUI.
Work-in-progress.
general:
-
KHR_draco_mesh_compression
Note: This is supported directly inside tinygltf
material:
-
KHR_materials_unlit
-
KHR_materials_pbrSpecularGlossiness
(TODO only suport fallback to metal_roughness ATM. Dedicated shader needed) -
KHR_texture_transform
lighting:
-
EXT_lights_image_based
Latest coninious build are available for Linux (AppImage) and Windows (portable exe). Both are 64bit
- CMake 3.5 or later
- C++11 compiler
- clang: 3.9 or later
- OpenGL 3.3
- Windows
- Linux
- Ubuntu 16.04
- CentOS7
- macOS
-
Load and display glTF assets
- glTF files with external resources
- glTF files with embeded resources
- glb files (binary glTF with enclosed resources)
- Any of the above with darco mesh compression TODO
- Partial support for VRM avatars (simply treated as a standard glTF binary)
-
glTF animation evaluation This program can play the animations defined in a glTF asset by the following mean
- morph - Software blending between any number of morph targets
- skin - Hardware blending with max 4 joints attributes per vertex
- skin - Software blending (TODO in software we could do it between an arbitrary number of joints per vertex)
- TODO animation editing features
-
Data visualization
- Skinning weights
Every source dependencies is either enclosed within the source code, or is pulled from submodules. These dependences also uses subomudles. You will need to get them recursively. This command should get you up and running:
git submodule update --init --recursive
In the genral case, just run CMake to generate a build system for your own environment. Some scripst are provided to facilitate the setup.
Please run vcsetup.bat
to generate project files.
You can use cmd //c
to call batch file from a mintty terminal.
cmd //c vcsetup.bat
Makefiles for building the program can easilly be generated by CMake after a (recursive) clone of this repository.
mkdir build
cd buid
cmake ..
make
This assume that you have the necessary X11 and OpenGL developement libraries on your system. Here's some hints on what to install on some distributions we have tested:
You may need to install a few dependencies :
sudo apt install git cmake mesa-common-dev libgl1-mesa-dev libxrandr-dev libxcb-xinerama0 libxinerama-dev libxcursor-dev libxi-dev
You can use cmake3 package and You may need to install a few dependencies :
sudo yum install git cmake3 libX11-devel libXrandr-devel libXinerama-devel libXcursor-devel
This program is buildable as a WebAssembly WebGL 2.0 application using Emscripten.
You will need to install the latest emsdk
tools. Then in a shell in the emscriten environement. Windows users will need GNU Mac. You can get Minimal GNU for Windows via emsdk:
emsdk install mingw-4.6.2-32bit
emsdk activate mingw-4.6.2-32bit
Then, you can use emscriptem's emcmake wrapper to easilly tell CMake to build with emscriptem:
mkdir build
cd build
emcmake cmake ..
cmake --build .
GLTF_INSIGHT_USE_NATIVEFILEDIALOG
: Use NativeFileDialog https://github.com/mlabbe/nativefiledialog instead of ImGuiFileDialog for file browser. Requires GTK3(and pkg-config) on Linux.
- PBR shading(in CPU)
- Animation curve display : ocornut/imgui#786
- Edit animation parameters in GUI
- Better GUI for animations.
- CPU skinning.
- Draco compressed mesh support. https://github.com/google/draco
- NOTE that Draco fails to compile with gcc4.8(CentOS7 default)
- basis_universal texture compression support. https://github.com/binomialLLC/basis_universal
- export of morphed/skinned mesh as a simple OBJ file (and as a sequence of OBJs for animations)
MIT license
gltf-insight is built upon the following open-source projects:
- TinyGLTF : MIT license
- json.hpp : MIT license
- stb_image libraries : Public domain
- glad : MIT license
- glfw : zlib/png license
- glm : MIT license
- ImGUI : MIT license
- ImGuiFileDialog : MIT license
- dirent for Win32 : MIT license
- cppoptparse : Copyright (c) 2010 Johannes Weißl. MIT license.
- ionicons icon helper header : zlib licence
- ionic framework icon font : MIT
- Roboto icons : Apache 2
- nativefiledialog : ZLIB license.
“glTF and the glTF logo are trademarks of the Khronos Group Inc.”