Git Product home page Git Product logo

gltfutility's Introduction

Discord GitHub issues GitHub license

GLTFUtility

Allows you to import and export glTF files during runtime and in editor. glTF is a new opensource 3d model transmission format which supports everything you'll ever need from a format in Unity. Read more about glTF here

2019-04-01_00-46-27 image image

What makes GLTFUtility different?

Focusing on simplicity and ease of use, GLTFUtility aims to be an import-and-forget solution, keeping consistency with built-in functionality.

Installation

Using Unity Package Manager (Help)
  1. "com.siccity.gltfutility": "https://github.com/siccity/gltfutility.git"
Using git
  1. Get Newtonsoft.JSON from one of these sources
  2. Clone GLTFUtility by itself or as a submodule
    • Clone into your assets folder git clone [email protected]:Siccity/GLTFUtility.git
    • Add repo as submodule git submodule add [email protected]:Siccity/GLTFUtility.git Assets/Submodules/GLTFUtility
Manual download
  1. Get Newtonsoft.JSON from the asset store
  2. Download GLTFUtility-master.zip and extract to your project assets

Features

System

  • Editor import
  • Editor export
  • Runtime import API
  • Runtime export API
  • GLTF format
  • GLB format
  • Multithreading
  • URP #75
  • HDRP #73
  • LWRP

Spec

  • Static mesh (with submeshes)
  • UVs (up to 8 channels)
  • Normals
  • Tangents
  • Vertex colors
  • Materials (metallic/specular, opaque/mask/blend)
  • Textures (embedded/external)
  • Remote textures (during async only)
  • Rig
  • Avatar/Mask #70
  • Animations (multiple)
  • Morph targets (with experimental names)
  • Cameras

Extensions

  • KHR_texture_transform (partial support)
  • KHR_materials_pbrSpecularGlossiness
  • KHR_lights_punctual #25
  • KHR_draco_mesh_compression #27

Known issues

  • ArgumentNullException: Value cannot be null in build but not in editor.
    • This is most likely due to shaders being stripped from the build. To fix this, add the GLTFUtility shaders to the Always Included Shaders list in Graphic Settings.

Runtime import API

// Single thread
using Siccity.GLTFUtility;

void ImportGLTF(string filepath) {
   GameObject result = Importer.LoadFromFile(filepath);
}
// Multithreaded
using Siccity.GLTFUtility;

void ImportGLTFAsync(string filepath) {
   Importer.ImportGLTFAsync(filepath, new ImportSettings(), OnFinishAsync);
}

void OnFinishAsync(GameObject result) {
   Debug.Log("Finished importing " + result.name);
}

gltfutility's People

Contributors

siccity avatar daverin avatar semantic-release-bot avatar kibsgaard avatar bilke avatar elhacker avatar codetako-ball avatar eusthenopteron avatar leon avatar lucasmontec avatar lucassel avatar ntc avatar squishypandadev avatar tboogh avatar tfmertz avatar alex-shch avatar cpetry avatar ozgurozansen avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.