facebookincubator / FBX2glTF

A command-line tool for the conversion of 3D model assets on the FBX file format to the glTF file format.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

invalid output of merged ao_met_rough when no ao supplied

rdpeake opened this issue · comments

if you supply a model which does not have an occlusion map, but do have met and rough - the combined result at

aoMetRoughTex = textureBuilder.combine(
seems to produce an invalid output for the ao_met_rough file

suggest changing

const float occlusion = (*pixels[0])[0];

with

const float occlusion = (*pixels[0])[0] * (hasOcclusionMap ? 1 : 0);

or use the props object if that is supported for occlusion in place of the ending 0

This turned out to be invalid due to a difference in what input files i was actually using