Git Product home page Git Product logo

unitygltf's Introduction

UnityGLTF

UnityGLTF: Build Status

GLTFSerialization: Build status

Join the chat at https://gitter.im/KhronosGroup/UnityGLTF

Unity3D library for importing and exporting GLTF 2.0 assets.

The goal of this library is to support the full glTF 2.0 specification and enable the following scenarios:

  • Run-time import of glTF 2.0 files
  • Run-time export of glTF 2.0 files
  • Design-time import of glTF 2.0 files
  • Design-time export of glTF 2.0 files

The library will be modularized such that it can be extended to support additional capabilities in Unity or support additional extensions to the glTF specification. The library was designed to work with Unity 5.6 and above, but is currently only tested/maintained/supported with Unity 2018 and above.

Current Status

Work Items and Issues targeting a 1.0 release of the library can be found in Road to 1.0

Getting Started

  • This section is dedicated to those who wish to contribute to the project. This should clarify the main project structure without flooding you with too many details.
  • UnityGLTF project is divided into two parts: the GLTFSerializer (Visual Studio Solution), and the Unity Project (which is the package we wish to make available to users).
  • Basic Rundown: The GLTFSerializer is a C# DLL implemented to facilitate serialization of the Unity asset model, and deserialization of GLTF assets.

  • Structure:

    • Each GLTF schemas (Buffer, Accessor, Camera, Image...) extends the basic class: GLTFChildOfRootProperty. Through this object model, each schema can have its own defined serialization/deserialization functionalities, which imitate the JSON file structure as per the GLTF specification.
    • Each schema can then be grouped under the GLTFRoot object, which represents the underlying GLTF Asset. Serializing the asset is then done by serializing the root object, which recursively serializes all individual schemas. Deserializing a GLTF asset is done similarly: instantiate a GLTFRoot, and parse the required schemas.
  • Building: You will need to build this library into the Plugins folder of the core Unity project:

    1. Open GLTFSerialization\GLTFSerialization.sln and compile for release. This will put the binaries in UnityGLTF\Assets\UnityGLTF\Runtime\Plugins.
    2. Open the Unity project located in UnityGLTF\.
      • If the meta file gets overridden, the binaries in UnityGLTF\Assets\UnityGLTF\Runtime\Plugins should be configured for everything but UWP. The binaries in UnityGLTF\Assets\UnityGLTF\Runtime\Plugins\UWP should be configured for UWP.
  • Unity Version Be sure that the Unity release you have installed on your local machine is at least the version configured for the project (using a newer version is supported). You can download the free version here. You can run this project simply by opening the directory as a project on Unity.
  • Project Components The Unity project offers two main functionalities: importing and exporting GLTF assets. These functionalities are primarily implemented in GLTFSceneImporter and GLTFSceneExporter.

The Server-Side Build

For details on the automated server-side builds and how to update them, see \scripts\ServerBuilds.md.

Examples

  1. Clone or download the repository (including submodules).
  2. Open up the Unity project and run any of the example scenes in Assets/GLTF/Examples OR run the main scene in Assets and use the Model List component to dynamically switch between models.

unitygltf's People

Contributors

robertlong avatar sbtron avatar stevenvergenz avatar adammitchell-ms avatar mhochk avatar johncopicms avatar sohailshafii avatar rpspicer avatar hybridherbst avatar rferrese avatar botrif avatar azakariamsft avatar aidinabedi avatar keveleigh avatar ei2kpi-ptc avatar kknsy avatar ziedbha avatar jamesgk avatar amenzies avatar ziugy avatar naostranms avatar lilyvelour avatar dave-hill avatar infinitydelta avatar michielbos avatar zl3388 avatar rawnsley avatar stephenhodgson avatar gitter-badger avatar tombums 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.