• Stars
    star
    210
  • Rank 187,585 (Top 4 %)
  • Language Mathematica
  • License
    MIT License
  • Created almost 10 years ago
  • Updated over 4 years ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

FBX glTF importer/exporter plug-in and converter.

glTF is the runtime asset format for WebGL, OpenGL ES, and OpenGL.

glTF is a draft specification, it may change before ratification. Everyone is encouraged to provide feedback on the specification and contribute to the open-source converter. Please create issues with your feedback.

Specification

glTF Specification 1.0

Converter

glTF is an open-source command-line pipeline tool that converts FBX file (and any file format that FBX can read such as obj, collada, ...) to glTF.

FBX importer/exporter plug-in

IO-glTF is an open-source FBX importer/exporter plug-in that converts FBX file (and any file format that FBX can read such as obj, collada, ...) to glTF.
This plug-in can be used by any FBX based application to import/export glTF files.

Dependencies

This sample is dependent of the following 3rd party extension:

  • The Casablanca C++ RESTful SDK - version 2.4.0.1

  • The FBX C++ SDK - version 2015.1

  • For building on Mac OSX, and Linux, you also need cmake which is also required for the Casablanca C++ RESTful SDK.
    However, Casablanca requires version 2.8 (or later), while the glTF converter is setup to use version 3.1, you may install version 3.1 or change the cmake files header back to 2.8.

Build the solution

Windows

Required: Visual Studio 2013 (should work with Visual Studio 2012 too, but not tested)

  1. Download and install the FBX SDK

  2. Clone or download the FBX-glTF source code

  3. Load the glTF.sln solution file in Visual Studio 2013

  4. Optional: if you did not install FBX at the standard location or use a version different from 2015.1, open the solution Property Manager and edit the User Macro FBX_SDK to point to the root of your FBX SDK. Another way is to edit the Fbx.props file and manually change the path before step 2.

  5. Build the FBX-glTF solution. NuGet will install 'casablanca' for you upon building.

Mac OSX

Required: Mac OSX Maverick or Yosemite, Xcode 6.1.1

  1. Download and install the FBX SDK

  2. Clone or download the FBX-glTF source code

  3. Download and compile 'casablanca' on your machine. Instructions here

  4. Install ‘casablanca’ on your system by running ‘sudo make install’

  5. Recommended: Create a folder with the name you want, and go in that directory

  6. Optional: Copy the CMakeConfigExample.txt file and rename it as CMakeCache.txt in your build folder, and edit the FBX path entry. That will avoid you to type the parameters below.

  7. Execute:

    a. For a release build: cmake .. -DCMAKE_BUILD_TYPE=Release -DFBX_SDK=<path to FBX>

    b. For a debug build: cmake .. -DCMAKE_BUILD_TYPE=Debug -DFBX_SDK=<path to FBX>

    or simply ‘cmake ..’ if you followed step 6.

Note: on Mac OSX, the FBX SDK installs by default in /Applications/Autodesk/FBX SDK/2015.1

Linux

Required: gcc 4.8+ (tested on Ubuntu Linux 14.04 Desktop)

  1. Download and install the FBX SDK

  2. Clone or download the FBX-glTF source code

  3. Download and compile 'casablanca' on your machine. Instructions here

  4. Install ‘casablanca’ on your system by running ‘sudo make install’

  5. Recommended: Create a folder with the name you want, and go in that directory

  6. Optional: Copy the CMakeConfigExample.txt file and rename it as CMakeCache.txt in your build folder, and edit the FBX path entry. That will avoid you to type the parameters below.

  7. Execute:

    a. For a release build: cmake .. -DCMAKE_BUILD_TYPE=Release -DFBX_SDK=<path to FBX>

    b. For a debug build: cmake .. -DCMAKE_BUILD_TYPE=Debug -DFBX_SDK=<path to FBX>

    or simply ‘cmake ..’ if you followed step 6.

Usage Instructions

For Windows, the files will be located in FBX-glTF\x64\Release or FBX-glTF\x64\Debug

For both Mac OXS and Linux, the files will be located in FBX-glTF/<your cmake folder>/Release or FBX-glTF//Debug

Usage: glTF [-h] [-v] [-t] [-l] [-e] [-o ] -f <input file>

-f/--file        - file to convert to glTF [string] 
-o/--output      - path of output directory [string]
-n/--name        - override the scene name [string]
-c/--copy        - copy all media to the target directory (cannot be combined with --embed)
-e/--embed       - embed all resources as Data URIs (cannot be combined with --copy)
-h/--help        - this message
-v/--version     - version

Typical command:

glTF -f MyFBXorDAEfile -o MyOutputDirectory -n NewName -c

Example:

cd FBX-glTF\models\duck
glTF -f duck.fbx -o ..\..\three.js\models\duck -n duck -c
cd ..\au
glTF -f au.fbx -o ..\..\three.js\models\au -c
glTF -f au3.fbx -o ..\..\three.js\models\au3 -e

Viewing results using Three.js

  1. Install Node.js on your computer

  2. Open a node terminal

  3. Go in directory FBX-glTF/Three.js

  4. Execute: npm install

  5. Execute: node serve.js

  6. Launch your internet favourite browser and browse to http://localhost


License

This sample is licensed under the terms of the MIT License. Please see the LICENSE file for full details.

Written by

Cyrille Fauvel (Autodesk Developer Network)
http://www.autodesk.com/adn
http://around-the-corner.typepad.com/

More Repositories

1

extract.autodesk.io

A sample showing how to extract viewables from the Autodesk OSS storage to your local machine
JavaScript
117
star
2

Maya-PyQt-Scripts

Scripts to easily build PyQt for Maya
Shell
42
star
3

FBX-iOS-ImportScene

FBX SDK iOS ImportScene example
C++
35
star
4

OPMNetExt

an AutoCAD OPM extension module for .NET developers
C++
35
star
5

forge.commandline-curl

Authorization and file translation demo: Demonstrates Autodesk Forge API authorization and translation process using cURL
Shell
12
star
6

AutoCAD-Property_Palette_in_Depth

Presentation and Sample from AU on The AutoCAD Property Palette
12
star
7

Pier9.IoT

Node.js Server app for the Pier 9 IoT viewer
JavaScript
9
star
8

node-red-node-forge

Node-RED nodes to help with the Autodesk Forge API - https://forge.autodesk.com/
HTML
8
star
9

google-cardboard-vr

Research project for a google carboard and Oculus Rift VR experience (presented at AU 2014)
JavaScript
7
star
10

extract-php-view.and.data.api

A PHP sample showing how to extract viewables from the Autodesk OSS storage to your local machine
JavaScript
6
star
11

ObjectARX-DeepClone

ObjectARX DeepClone samples for the DeepClone white paper
C++
5
star
12

ARVR-Toolkit-Unity

Autodes Forge ARVR-Toolkit Unity plugin
C#
5
star
13

ForgeArVr

Hololens experiments using Forge
C#
5
star
14

FBX-glTF-Service

An online FBX-glTF converter WEB service
JavaScript
5
star
15

MayaMathNode

A Maya Mathematical DG Node
Python
4
star
16

propertyServer

Forge Model PropertyServer to workaround the Model Derivative API limitations
JavaScript
4
star
17

Console-PHP

a PHP Console Sample using the Autodesk ReCap Photo webservice
PHP
3
star
18

Bangalore-Hackathon

Bangalore AngelHack project - Spring 2014
Objective-C
2
star
19

forge-yaml

YAML projects for the Autodesk Forge project
JavaScript
2
star
20

forge-csharp-sdk-test

forge-csharp-sdk-test
C#
2
star
21

WpfCSharp

A C# WPF Sample with oAuth / Viewer / ReCap libraries
C#
2
star
22

forge.oauth2-js

Asynchronous Node.js library for the Autodesk Forge oAuth2 implementation
JavaScript
2
star
23

Console-Cpp

a CPP Console Sample using the Autodesk ReCap Photo webservice
C++
2
star
24

Recap-iOS

an iOS Sample using the Autodesk ReCap Photo webservice
Objective-C
2
star
25

forge-api.typescript

Autodesk Forge API typescript definitions
TypeScript
2
star
26

forge.oss-js

Asynchronous Javascript/Node.js library for the Autodesk Forge OSS API
JavaScript
2
star
27

forge.model.derivative-js

Asynchronous Javascript/Node.js library for the Autodesk Forge Model Derivative API
JavaScript
2
star
28

forge.data.management-js

Asynchronous Javascript/Node.js library for the Autodesk Forge Data Management API
JavaScript
1
star
29

MIT-ARVR-Hackathon-Workshop

MIT ARVR Hackathon Workshop material
JavaScript
1
star
30

PlougonvelinHeroku

Public Heroku WEB site for private access to my House IoT Project
CSS
1
star
31

promises-all-limit

Run all promises in serie/parallelLimit/parallel and returns results for all.
JavaScript
1
star
32

aps-cli

APS cli utility
TypeScript
1
star
33

weebly

A weebly widget using Autodesk View & Data API 3d viewer
JavaScript
1
star