Open csubagio opened 4 years ago
Hi @csubagio!
Thank you for your pull request and welcome to our community.We require contributors to sign our Contributor License Agreement, and we don't seem to have you on file.
In order for us to review and merge your code, please sign at https://code.facebook.com/cla. If you are contributing on behalf of someone else (eg your employer), the individual CLA may not be sufficient and your employer may need to sign the corporate CLA.
If you have received this in error or have any questions, please contact us at cla@fb.com. Thanks!
Thank you for signing our Contributor License Agreement. We can now accept your code for this (and any) Facebook open source project. Thanks!
Hey all! First off, thanks for writing this super handy converter. Great stuff!
This PR is a little rethink about how to pack the ORM textures in the Stingray material pipeline. Right now, the code assumes that each texture will be a grayscale single channel input, and attempts to build a packed RGB ORM texture out of each texture's red channel. This unfortunately precludes using an ORM already built elsewhere, if you assign the same ORM texture to all 3 slots, you get the AO red channel from all 3 sources copied into the R, G, and B of the remixed texture!
My suggested pivot in this PR:
Outside of that, I have two questions/comments:
Why does the texture packer premultiply the uniform roughness and metalness values into the texture? Given that the uniforms are passed forward too, this may surprise some downstream users. This should probably at least be documented.
It's relatively rare in my experience, but it's not super unlikely that some artists may want to use separate maps for ORM. Specifically, it's possible you may need a higher resolution occlusion map, and can happily accept much lower resolution metallness & roughness maps. Given that both FBX and gltf can handle this definition, it may be nice to support it in the future.
Thanks! Chris.