Commit Graph

24 Commits

Author SHA1 Message Date
Pär Winzell be627fa228 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.
2019-10-09 09:35:37 -07:00
Pär Winzell 3c08169510 Prepare patch release 0.9.7. 2019-08-10 09:33:02 -07:00
Pär Winzell b9c7d0a400
Tweak shell script snippet in README.
Fixes #214.
2019-08-08 08:54:39 -07:00
Mr.B b09bdef836 Add Facebook official document into README (#216)
Add Facebook official document into README
2019-07-29 15:00:15 -07:00
Pär Winzell 5b475476ba Don't clobber README.md on de-tar. 2019-06-01 12:54:56 -07:00
Pär Winzell 25ef9167ed Simplify build, document it somewhat. 2019-06-01 12:48:16 -07:00
Pär Winzell a89b7d526f
Update README.md 2019-06-01 11:37:39 -07:00
Pär Winzell 6b8490a6ae
Update README.md 2019-05-07 17:27:22 -07:00
Pär Winzell 4b501431fe
License -> BSD (#186)
Relicense FBX2glTF as BSD.
2019-05-03 16:13:18 -07:00
Pär Winzell 7dd8438c78
Embrace Conan, use it to grab boost::filesystem. (#180)
With this, we are able to get rid of all the increasingly broken file
system utility code, and trust boost::filesystem to handle all the
cross-platform complexity.

The first version of this PR centred around C++17 & std::filesystem,
but support remains too elusive; it seems works out of the box in
Visual Studio (especially 2019), but is entirely missing from the Mac
dclang, and even with GCC 8.0 it requires an explicit '-l c++fs'.

Luckily the std:: version is almost exactly the boost:: version (not
surprising) so when the world's caught up, we can ditch Boost and go
all stdlib.

Setting up Conan requires a bit of work; we'll want to document the
details in the README.
2019-04-19 23:54:11 -07:00
Simon 4bb4bdbac1 animation framerate option 2019-04-18 09:24:38 -07:00
Pär Winzell b8d587d2c7
Add link to bleeding-edge builds. 2019-02-25 09:31:15 -08:00
Pär Winzell bdcf16f042
Trivial typo fix.
Thanks to @ale64bit for pointing this out.
2018-08-19 18:24:16 -07:00
Darío Hereñú 447333a16a Typo on string #239, #241, #244 2018-04-26 07:21:02 -07:00
Pär Winzell 93d1385b1e
Fix typo & markdown error. 2018-03-18 09:42:04 -07:00
Par Winzell da5d606c93 Documentation tweaks. 2018-02-19 20:15:01 -08:00
Pär Winzell fdf7bb3336 Support for Stingray PBS material definitions (#47)
This adds the first FBX PBR import path. Materials that have been
exported via the Stingray PBS preset should be picked up as native
metallic/roughness, and exported essentially 1:1 to the glTF output.

In more detail, this commit:
- (Re)introduces the STB header libraries as a dependency. We currently
use it for reading and writing images. In time we may need a more
dedicated PNG compression library.
- Generalizes FbxMaterialAccess to return different subclasses of
  FbxMaterialInfo; currently FbxRoughMetMaterialInfo and
  FbxTraditionalMaterialInfo.
  - FbxTraditionalMaterialInfo is populated from the canonical
    FbxSurfaceMaterial classes.
  - FbxRoughMetMaterialInfo is currently populated through the Stingray
    PBS set of properties, further documented in the code.
- RawMaterial was in turn generalized to feature a pluggable,
  type-specific RawMatProps struct; current implementations are,
  unsurprisingly, RawTraditionalMatProps and RawMetRoughMatProps. These
  are basically just lists of per-surface constants, e.g. diffuseFactor or
  roughness.
- In the third phase, glTF generation, the bulk of the changes are
  concerned with creating packed textures of the type needed by e.g. the
  metallic-roughness struct, where one colour channel holds roughness and
  the other metallic. This is done with a somewhat pluggable "map source
  pixels to destination pixel" mechanism. More work will likely be needed
  here in the future to accomodate more demanding mappings.

There's also a lot of code to convert from one representation to
another. The most useful, but also the least well-supported conversion,
is from old workflow (diffuse, specular, shininess) to
metallic/roughness. Going from PBR spec/gloss to PBR met/rough is hard
enough, but we go one step sillier and treat shininess as if it were
glossiness, which it certainly isn't. More work is needed here! But it's
still a fun proof of concept of sorts, and perhaps for some people it's
useful to just get *something* into the PBR world.
2017-11-30 22:23:50 -08:00
Pär Winzell 5eb36702b5
Make blend shape normals/tangents opt-in. (#40)
The FBX SDK absolutely claims that there is a normal layer to each
FbxShape, with non-trivial data, even when the corresponding FBX file,
upon visual inspection, explicitly contains nothing but zeroes. The only
conclusion I can draw is that the SDK is computing normals from
geometry, without being asked to, which seems kind of sketchy.

These computed normals are often not at all what the artist wanted, they
take up a lot of space -- often pointlessly, since if they're computed,
we could just as well compute them on the client -- and at least in the
case of three.js their inclusion uses up many of the precious 8 morph
target slots in the shader.

So, they are now opt-in, at least until we can solve the mystery of just
what goes on under the hood in the SDK.
2017-11-14 14:36:44 -08:00
Pär Winzell 7f8746f56e
Minor README tweaks. 2017-11-09 20:15:00 -08:00
Pär Winzell 9ae36088b4
Blend Shape / Morph Target Support (#33)
This adds blend shape / morph target functionality.

At the FBX level, a mesh can have a number of deformers associated with it. One such deformer type is the blend shape. A blend shape is a collection of channels, which do all the work. A channel can consist of a single target shape (the simple case) or multiple (a progressive morph). In the latter case, the artist has created in-between shapes, the assumption being that linear interpolation between a beginning shape and an end shape would be too crude. Each such target shape contains a complete set of new positions for each vertex of the deformed base mesh.

(It's also supposed to be optionally a complete set of normals and tangents, but I've yet to see that work right; they always come through as zeroes. This is something to investigate in the future.)

So the number of glTF morph targets in a mesh is the total number of FBX target shapes associated with channels associated with blend shape deformers associated with that mesh! Yikes.

The per-vertex data of each such target shape is added to a vector in RawVertex. A side effect of this is that vertices that participate in blend shapes must be made unique to the mesh in question, as opposed to general vertices which are shared across multiple surfaces.

Blend Shape based animations become identical glTF morph target animations..

Fixes #17.
2017-11-05 00:06:24 -07:00
Pär Winzell dfb026033d Document the new v-flipping default. (#22)
The READMEs need updating, too.
2017-10-22 16:43:20 -07:00
Pär Winzell e0e81404f9 Multiple tweaks to README. (#19)
Update README.md with recent developments, add various relevant links to the GitHub project, clean up the language, various misc line edits.
2017-10-21 10:45:56 -07:00
Par Winzell c194843239 More helpful README update. 2017-10-19 09:15:25 -07:00
Par Winzell 276a0dfb86 Initial commit. 2017-10-13 01:55:11 -07:00