When you click on texture settings while inspecting an imported GLB mesh in sandbox.babylonjs.com there’s a field called Level which controls the brightness of the texture applied.
However, when I change this setting and then export the GLTF in sandbox, the setting does not get exported. I know this since after importing back the exported mesh in sandbox the setting goes back to the default value of 1.
How can I export the texture’s level setting from the GLTF exporter?
There is for some specific textures like normal maps which has a normal scale parameter in glTF. But either way, we could bake the texture to do it. I don’t think we support this property when exporting right now, so this would be a feature request.
But either way, we could bake the texture to do it.
@bghgary IIUC your are suggesting modify the texture file directly outside of babylon sandbox environment so that it mimics the setting Level = 2 in the sandbox editor. What would be the equivalent of Level in an image editing program like imagemagick or gimp (or even blender for that matter)?
Does the Level in sandbox refer to the alpha level? Sorry if my question doesn’t make sense, I’m trying to figure out how to do this outside of sandbox now that I understand sandbox doesn’t support it.
I don’t think we support this property when exporting right now, so this would be a feature request.
Many folks might use the sandbox environment to adjust their models. Blender, etc. are more feature rich to do the same task but IMHO being a SWE myself and not being intuitively comfortable with Blender’s style of thinking yet, I feel this new feature request will be really helpful to engineers who are using sandbox to cleanup / modify models so they pop. I was successfully able to change the metalness, etc. to great benefit and it really made the model pop. Something that I wouldn’t know how to do with blender, etc.
I wasn’t suggesting this before, but you can modify the texture manually and it should work. Level just multiplies against the values in the image. The only possible issue is sRGB, so you might have to convert the colors to linear before doing the multiplication.
I would caution using the sandbox to modify models. Babylon.js glTF import/export is lossy to a certain extent depending on the model. glTF does not map to Babylon.js 1:1. glTF is intended to be the last-mile format.