warrenm / GLTFKit2

A glTF 2.0 asset loader and exporter for Objective-C and Swift.
MIT License
159 stars 29 forks source link

Roughness and Specular maps seem to be off #17

Closed opchronatron closed 2 years ago

opchronatron commented 2 years ago

When exporting a .glb from blender I am coming across the issue of the material being extremely metallic See image 1\ Screen Shot 2022-04-17 at 3 15 42 PM

In the first version of GLTFKit it seems to be working. image 2

Screen Shot 2022-04-17 at 3 15 15 PM

It also seems to be working in the online gltfviewer image 3 Screen Shot 2022-04-17 at 3 20 22 PM

Any advice on what might be wrong?

p.s here is the blender material node

Screen Shot 2022-04-17 at 3 16 30 PM

warrenm commented 2 years ago

If you're using a specular-glossiness workflow, that isn't fully supported. I'm still curious why it appears so shiny by default. If you can share this model or another model that exhibits this issue privately to warren@fourspace.co, I'll take a closer look.

opchronatron commented 2 years ago

I’ll send you the models tonight! Appreciate the help!

warrenm commented 2 years ago

Thanks for sending those over; they made it much easier to track down. It turns out that we weren't mapping the PBR metallic/roughness factors over to SceneKit correctly. This should be looking much better as of 589ef13.

Screen Shot 2022-04-19 at 10 44 38 AM
opchronatron commented 2 years ago

Wow, that was fast! We are pulling now and going to test. Really appreciate the help <3

warrenm commented 2 years ago

This issue will be automatically closed in 7 days if no further reply is received.

opchronatron commented 2 years ago

Worked perfectly! https://twitter.com/benmayorwhite/status/1517094376001970176?s=20&t=QQXyXqVufTLzYL6aMshMRw

warrenm commented 2 years ago

Brilliant!