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.