GithubHelp home page GithubHelp logo

afeiya / fbx-gltf-conv Goto Github PK

View Code? Open in Web Editor NEW

This project forked from cocos/fbx-gltf-conv

0.0 0.0 0.0 211 KB

A FBX to glTF file format converter.

License: MIT License

C++ 96.98% C 0.09% PowerShell 0.94% CMake 1.98%

fbx-gltf-conv's Introduction

FBX-glTF-conv

This is a FBX to glTF file format converter.

How to use

You can find the latest release in releases page.

To convert, run the executable at command line:

> FBX-glTF-conv <source-FBX-file> --out <glTF-files-out-dir>

There are some options, run the executable without any arguments:

> FBX-glTF-conv

This is a FBX to glTF file format converter.
Usage:
  FBX-glTF-conv [OPTION...] positional parameters

      --fbm-dir arg             The directory to store the embedded media.
      --out                     The output path to the .gltf or .glb file.
                                Defaults to
                                `<working-directory>/<FBX-filename-basename>.gltf`
      --no-flip-v               Do not flip V texture coordinates.
      --unit-conversion arg       -

                                - `hierarchy-level` Do unit conversion at
                                  - `disabled` Disable unit
                                conversion. This may cause the generated glTF
                                does't conform to glTF specification. (default:
                                geometry-level)
      --no-texture-resolution   Do not resolve textures.
      --prefer-local-time-span  Prefer local time spans recorded in FBX file
                                for animation exporting. (default: true)
      --animation-bake-rate arg
                                Animation bake rate(in FPS). (default: 30)
      --texture-search-locations arg
                                Texture search locations. These path shall be
                                absolute path or relative path from input
                                file's directory.
      --verbose                 Verbose output.
      --log-file arg            Specify the log file(logs are outputed as
                                JSON). If not specified, logs're printed to
                                console

Build

To build this tool, the followings are required:

This is a CMake project, just build it in normal CMake build process. However you need to indicate the FBXSDK's location and vcpkg toolchain file:

> cmake -DCMAKE_TOOLCHAIN_FILE="<path-to-vcpkg>/scripts/buildsystems/vcpkg.cmake" -DFbxSdkHome:STRING="<path-to-FBX-SDK-home>"

If problems encountered, you may file an issue or reference to the CI build script.

Why

This tool is essentially used as a part of the Cocos Creator. In former, Cocos Creator supports FBX file format through the excellent FBX2glTF.

But Cocos team has to find another approach because:

  • FBX2glTF store the glTF result files onto disk and Creator read the files. This is the only way that Creator can communicate with FBX2glTF. File system I/O is slow.
  • Author of FBX2glTF is tired.
  • FBX is complex and all exporters working for it are buggy. We usually need to fix strange issues. It's hard to sync fixes between Cocos and Facebook.

Features

  • ๐Ÿ—ธ Geometries

    • ๐Ÿ—ธ Meshes
  • ๐Ÿ—ธ Materials

    • ๐Ÿ—ธ Lambert and Phong
  • ๐Ÿ—ธ Textures and images

    • ๐Ÿ—ธ Image formats: JPEG, PNG
  • ๐Ÿ—ธ Skinning

    • โŒ› Cluster mode: additive
  • ๐Ÿ—ธ Blend shapes(Morph targets)

  • ๐Ÿ—ธ Animations

    • ๐Ÿ—ธ Node transform animations(Skeletal animations)

    • ๐Ÿ—ธ Blend shape animations(Morph animations)

  • ๐Ÿ—ธ Scene hierarchy

    • โŒ› FBX specific node inherit types: RrSs, Rrs
  • โŒ› Cameras

  • โŒ› Lights

๐Ÿ—ธ Supported โŒ› Not finished

Thanks

Again, the FBX is complex and specification-less. In development, we often reference from or are inspired from the following predecessors:

fbx-gltf-conv's People

Contributors

shrinktofit avatar afeiya 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.