Skip to content

Commit be627fa

Browse files
author
Pär Winzell
committed
Minor README updates.
- Better 'tar' invocation that doesn't require GNU tar. - No need for GIT_LFS_SKIP_SMUDGE anymore. - Apply VSCode's MarkDown formatting suggestions.
1 parent 1d73569 commit be627fa

File tree

1 file changed

+40
-24
lines changed

1 file changed

+40
-24
lines changed

README.md

+40-24
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
# FBX2glTF
2+
23
[![License](https://img.shields.io/badge/License-BSD%203--Clause-blue.svg)](https://opensource.org/licenses/BSD-3-Clause)
34

45
This is a command line tool for converting 3D model assets on Autodesk's
@@ -17,11 +18,13 @@ Bleeding-edge binaries for Windows may be found [here](https://ci.appveyor.com/p
1718
## Running
1819

1920
The tool can be invoked like so:
21+
2022
```
2123
> FBX2glTF ~/models/butterfly.fbx
2224
```
2325

2426
Or perhaps, as part of a more complex pipeline:
27+
2528
```
2629
> FBX2glTF --binary --draco --verbose \
2730
--input ~/models/source/butterfly.fbx \
@@ -33,6 +36,7 @@ There are also some friendly & hands-on instructions available [over at Facebook
3336
### CLI Switches
3437

3538
You can always run the binary with --help to see what options it takes:
39+
3640
```
3741
FBX2glTF 0.9.7: Generate a glTF 2.0 representation of an FBX model.
3842
Usage: FBX2glTF [OPTIONS] [FBX Model]
@@ -106,7 +110,7 @@ Some of these switches are not obvious:
106110
- `--compute-normals` controls when automatic vertex normals should be computed
107111
from the mesh. By default, empty normals (which are forbidden by glTF) are
108112
replaced. A choice of 'missing' implies 'broken', but additionally creates
109-
normals for models that lack them completely.
113+
normals for models that lack them completely.
110114
- `--no-flip-v` will actively disable v coordinat flipping. This can be useful
111115
if your textures are pre-flipped, or if for some other reason you were already
112116
in a glTF-centric texture coordinate system.
@@ -116,7 +120,7 @@ Some of these switches are not obvious:
116120
will be chosen by default if you supply none of the others. Material switches
117121
are documented further below.
118122
- If you supply any `-keep-attribute` option, you enable a mode wherein you must
119-
supply it repeatedly to list *all* the vertex attributes you wish to keep in
123+
supply it repeatedly to list _all_ the vertex attributes you wish to keep in
120124
the conversion process. This is a way to trim the size of the resulting glTF
121125
if you know the FBX contains superfluous attributes. The supported arguments
122126
are `position`, `normal`, `tangent`, `color`, `uv0`, and `uv1`.
@@ -144,10 +148,12 @@ all of which are automatically downloaded and/or built.
144148
build system will not successfully locate any other version.
145149

146150
### Linux and MacOS X
151+
147152
Your development environment will need to have:
153+
148154
- build essentials (gcc for Linux, clang for Mac)
149155
- cmake
150-
- python 3.* and associated pip3/pip command
156+
- python 3.\* and associated pip3/pip command
151157
- zstd
152158

153159
Then, compilation on Unix machines will look something like:
@@ -165,11 +171,11 @@ else
165171
fi
166172
167173
# Fetch Project
168-
> GIT_LFS_SKIP_SMUDGE=1 git clone https://github.com/facebookincubator/FBX2glTF.git
174+
> git clone https://github.com/facebookincubator/FBX2glTF.git
169175
> cd FBX2glTF
170176
171177
# Fetch and unpack FBX SDK
172-
> curl -sL "${FBXSDK_TARBALL}" | tar xz --strip-components=1 --wildcards */sdk
178+
> curl -sL "${FBXSDK_TARBALL}" | tar xz --strip-components=1 --include */sdk/
173179
# Then decompress the contents
174180
> zstd -d -r --rm sdk
175181
@@ -198,10 +204,11 @@ versions of the IDE are unlikely to successfully build the tool.
198204

199205
Note that the `CMAKE_BUILD_TYPE` variable from the Unix Makefile system is
200206
entirely ignored here; it is when you open the generated solution that
201-
you will be choose one of the canonical build types — *Debug*,
202-
*Release*, *MinSizeRel*, and so on.
207+
you will be choose one of the canonical build types — _Debug_,
208+
_Release_, _MinSizeRel_, and so on.
203209

204210
## Conversion Process
211+
205212
The actual translation begins with the FBX SDK parsing the input file, and ends
206213
with the generation of the descriptive `JSON` that forms the core of glTF, along
207214
with binary buffers that hold geometry and animations (and optionally also
@@ -213,13 +220,14 @@ process happens in reverse when we construct meshes and materials that conform
213220
to the expectations of the glTF format.
214221

215222
### Animations
223+
216224
Every animation in the FBX file becomes an animation in the glTF file. The
217225
method used is one of "baking": we step through the interval of time spanned by
218226
the animation, keyframe by keyframe, calculate the local transform of each
219227
node, and whenever we find any node that's rotated, translated or scaled, we
220228
record that fact in the output.
221229

222-
Beyond skeleton-based animation, *Blend Shapes* are also supported; they are
230+
Beyond skeleton-based animation, _Blend Shapes_ are also supported; they are
223231
read from the FBX file on a per-mesh basis, and clips can use them by varying
224232
the weights associated with each one.
225233

@@ -228,6 +236,7 @@ drawback of creating potentially very large files. The more complex the
228236
animation rig, the less avoidable this data explosion is.
229237

230238
There are three future enhancements we hope to see for animations:
239+
231240
- Version 2.0 of glTF brought us support for expressing quadratic animation
232241
curves, where previously we had only had linear. Not coincidentally, quadratic
233242
splines are one of the key ways animations are expressed inside the FBX. When
@@ -257,33 +266,37 @@ old workflow often contain baked lighting of the type that would arise naturally
257266
in a PBR environment.
258267

259268
Some material settings remain well supported and transfer automatically:
260-
- Emissive constants and textures
261-
- Occlusion maps
262-
- Normal maps
269+
270+
- Emissive constants and textures
271+
- Occlusion maps
272+
- Normal maps
263273

264274
This leaves the other traditional settings, first of Lambert:
265-
- Ambient — this is anathema in the PBR world, where such effects should
266-
emerge naturally from the fundamental colour of the material and any ambient
267-
lighting present.
268-
- Diffuse — the material's direction-agnostic, non-specular reflection,
269-
and additionally, with Blinn/Phong:
270-
- Specular — a more polished material's direction-sensitive reflection,
271-
- Shininess — just how polished the material is; a higher value here yields a
272-
more mirror-like surface.
275+
276+
- Ambient — this is anathema in the PBR world, where such effects should
277+
emerge naturally from the fundamental colour of the material and any ambient
278+
lighting present.
279+
- Diffuse — the material's direction-agnostic, non-specular reflection,
280+
and additionally, with Blinn/Phong:
281+
- Specular — a more polished material's direction-sensitive reflection,
282+
- Shininess — just how polished the material is; a higher value here yields a
283+
more mirror-like surface.
273284

274285
(All these can be either constants or textures.)
275286

276287
#### Exporting as Unlit
288+
277289
If you have a model was constructed using an unlit workflow, e.g. a photogrammetry
278290
capture or a landscape with careful baked-in lighting, you may choose to export
279291
it using the --khr-materials-common switch. This incurs a dependency on the glTF
280-
extension 'KHR_materials_unlit; a client that accepts that extension is making
292+
extension 'KHR_materials_unlit; a client that accepts that extension is making
281293
a promise it'll do its best to render pixel values without lighting calculations.
282294

283295
**Note that at the time of writing, this glTF extension is still undergoing the
284296
ratification process**
285297

286298
#### Exporting as Metallic-Roughness PBR
299+
287300
Given the command line flag --pbr-metallic-roughness, we throw ourselves into
288301
the warm embrace of glTF 2.0's PBR preference.
289302

@@ -296,6 +309,7 @@ that route should be digested propertly by FBX2glTF.
296309
when hooked up to Maya.)
297310

298311
## Draco Compression
312+
299313
The tool will optionally apply [Draco](https://github.com/google/draco)
300314
compression to the geometric data of each mesh (vertex indices, positions,
301315
normals, per-vertex color, and so on). This can be dramatically effective
@@ -309,16 +323,18 @@ viewer that is willing and able to decompress the data.
309323
ratification process.**
310324

311325
## Future Improvements
326+
312327
This tool is under continuous development. We do not have a development roadmap
313328
per se, but some aspirations have been noted above. The canonical list of active
314329
TODO items can be found
315330
[on GitHub](https://github.com/facebookincubator/FBX2glTF/labels/enhancement).
316331

317-
318332
## Authors
319-
- Pär Winzell
320-
- J.M.P. van Waveren
321-
- Amanda Watson
333+
334+
- Pär Winzell
335+
- J.M.P. van Waveren
336+
- Amanda Watson
322337

323338
## License
339+
324340
FBX2glTF is licensed under the [3-clause BSD license](LICENSE).

0 commit comments

Comments
 (0)