-
Notifications
You must be signed in to change notification settings - Fork 1.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Converting Metallic Roughness and Albedo to traditional DiffSpecNorm? #2330
Comments
There is an appendix in an (archived!) extension that might be helpful. It points to some utility functions that are supposed to do this conversion. (I won't be able to help any further, but maybe the implementors or PBR experts will chime in here). |
I don't know what DiffSpecNorm means, but the appendix that @javagl pointed to is for a different PBR model with specular/glossiness maps. Since you say this older engine doesn't support PBR rendering, it will likely not translate well. That said, if you translate baseColor/metallic+roughness into diffuse/specular+glossiness as written in the code from the appendix, it will at least be closer to a traditional model (e.g., BlinnPhong). Here is a live version of the appendix for Babylon.js: https://bghgary.github.io/glTF/convert-between-workflows-bjs/ |
Sorry, without documentation on what lighting model this uses, I don't know if it's clearer :-/ |
I believe would be this one: https://docs.unrealengine.com/udk/Three/MaterialBasics.html#Enhanced%20Specular |
This article might be helpful. https://marmoset.co/posts/pbr-texture-conversion/#metaltospec However as bhgary indicated, pre-PBR lighting models are likely not easy to convert to. As I recall there was often an avoidance of performing lighting calculations in linear color space, which led artists to overcompensate with blue specular textures, to achieve neutral specular response on skin tones. There was also no standardization for lighting values, leading to ad-hoc texture values based on specific lighting conditions. |
I'm working on loading gltf models on an older engine that does not support PBR rendering, and I've been struggling on how to use the following texture maps:
https://github.com/KhronosGroup/glTF-Sample-Models/tree/master/2.0/DamagedHelmet/glTF
I undestand that
Diffuse
could be the result ofAlbedo
+AO
with a "burn" blend mode, but what aboutmetalRoughness
? How can that be used as a traditional grayscale specular map?The text was updated successfully, but these errors were encountered: