Commit Graph

8 Commits

Author SHA1 Message Date
Par Winzell 4edf1889a1 Multiple fixes for transparency.
- alphaMode is only BLEND for transparent materials.
- We use RawMaterial.type to figure out what's transparent.
- FBX TransparencyFactor is not opacity, but 1.0-opacity.
- Treat vertex coloured materials as transparent
  - We should at least iterate over vertices here and see if any of them
    actually are transparent
- Sort triangles properly: transparent ones render last!
2017-10-17 21:06:18 -07:00
Par Winzell ee2ed24d2d Don't include empty extension info. 2017-10-17 20:47:34 -07:00
Par Winzell 3527b251e7 Fix build across all platforms. 2017-10-17 20:47:34 -07:00
Par Winzell d3a09308ac Do a better job resolving texture files.
- Nix GetFileFolder(). It was not helping. Always search for textures
- near the FBX file.
- Use RawTexture::name for the texture name and ::fileName for the
  inferred local filename path.
2017-10-17 20:47:34 -07:00
Par Winzell b5a7555133 Directories for NPM published binaries.
We may revisit this way of publishing releases, but for now let's make
sure these directories always exist.
2017-10-17 17:26:44 -07:00
Par Winzell e9067850e1 Break out material property & texture code.
Digging the property values and texture shadows thereof, associated with
a certain FbxSurfaceTexture, should clearly happen once per material,
not per polygon. Furthermore there is a pre-existing pattern of
Fbx-specific accessclasses in Fbx2Raw that we should follow.

Soon we'll be extracting more than Phong/Lambert properties here, and
then we'll need to do further refactoring.
2017-10-16 23:12:57 -07:00
Par Winzell e6cd0f012b Propertly transform UV coordinates.
We were mapping v to -v rather than 1-v, with fairly catastrophic
results. While fixing, take the trouble to introduce a more general
transformation mechanism than just an affine matrix.
2017-10-16 23:02:46 -07:00
Par Winzell 276a0dfb86 Initial commit. 2017-10-13 01:55:11 -07:00