Skip to content

Ybalrid/gltf-insight

 
 

Repository files navigation

glTF 2.0 data insight tool Build Status Build status

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.

Status

Work-in-progress.

glTF extension support:

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

Requirements

  • CMake 3.5 or later
  • C++11 compiler
    • clang: 3.9 or later
  • OpenGL 3.3

Supported platforms

  • Windows
  • Linux
    • Ubuntu 16.04
    • CentOS7
  • macOS

Features

  • 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

Setup

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

Build

In the genral case, just run CMake to generate a build system for your own environment. Some scripst are provided to facilitate the setup.

Windows + Visual Studio 2017

Please run vcsetup.bat to generate project files.

From a git for Windows(mintty)

You can use cmd //c to call batch file from a mintty terminal.

cmd //c vcsetup.bat

Linux and macOS

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:

On Ubuntu

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

On CentOS7

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

Emscripten (WebGL version)

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 .

Build options

TODO

License

MIT license

Third party licenses

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.”

About

C++11 based glTF 2.0 data insight tool

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • C 57.7%
  • Hack 28.4%
  • C++ 12.3%
  • CMake 1.0%
  • GLSL 0.5%
  • Shell 0.1%