The material has the "isDoubleSided" bool parameter. Because some models have double-sided texture settings, the new bool parameter is added to determine whether glTF2 'doubleSided' is enabled. The default value of this parameter is false.
Before this change, the texture assignments for Occlusion, Roughness, and Metalness in the Stingray PBR material path were assumed to be single channel images where the R should be used to build a merged ORM texture. This precluded the use of prebuilt ORM textures.
This commit proposes a few changes:
* if the same texture is detected in all 3 channels, assume it already is ORM and just pass through.
* when combining textures, read R/G/B for O/R/M rather than R/R/R. This allows merging of prebuild ORM textures.
This caused https://github.com/facebookincubator/FBX2glTF/issues/218
in ways that I honestly don't fully understand, and I believe only under
Windows, with Release-level optimisation turned on.
It's possible we should drop all these initializer lists, and replace
them with simple and explicit initialising constructors.
Fixes#218.
Merge code from @shrinktofit that allows control over where temporary files are created.
(Most commonly the .fbm directory where the SDK extracts embedded resources.)
Lifted from comment in source:
Individual animations are often concatenated on the timeline, and the
only certain way to identify precisely what interval they occupy is to
depth-traverse the entire animation stack, and examine the actual keys.
There is a deprecated concept of an "animation take" which is meant to
provide precisely this time interval information, but the data is not
actually derived by the SDK from source-of-truth data structures, but
rather provided directly by the FBX exporter, and not sanity checked.
Some exporters calculate it correctly. Others do not. In any case, we
now ignore it completely.
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.